sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SharePoint Framework command set icon not rendered at every situation

Open mvdschaaks opened this issue 7 years ago • 14 comments

Category

  • [x Question
  • [ ] Typo
  • [x] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

Icon is rendered in every situation. Question is what may impact the rendering.

Observed Behavior

Sometimes code rendered for icon looks like this (src attribute not set):

<img src="" class="ms-Image-image ms-Image-image--contain ms-Image-image--portrait is-notLoaded is-fadeIn is-error image-323">

The icon is not rendered for some users in the tenant with the same permissions set as users that do see the icon.

Steps to Reproduce

Not possible because of this unpredictable behavior.

mvdschaaks avatar Feb 22 '19 19:02 mvdschaaks

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Feb 22 '19 19:02 msft-github-bot

Is this happening for custom command set buttons, or OOTB ones?

If custom, SPFx version?

Context as to the environment (SPO / SP onprem version)?

andrewconnell avatar Feb 22 '19 20:02 andrewconnell

It is a custom command set button. SPFX version: 1.7.1 and running in SPO. I tried different kinds of icon (setups): absolute URL to defined location, relative URL within the app catalog and base64 encoded variant. However that apparently does not have any impact.

mvdschaaks avatar Feb 24 '19 18:02 mvdschaaks

Experiencing this issue as well. Some users cannot see custom icons. When this happens the image tag matches the above i.e. blank src and has is-error is-notLoaded classes.

We experienced a similar issue with 64 bit encoded data uri method. For certain users, icon images were blank on some loads, the command set button completely non functional on others... so we tried using bundled svgs. Here are the details for svg method which we are using currently.

SPFX V 1.7.1, SPO, custom command set icons. We're using svgs (about 2kb each).

in manifest

"items": {
    "COMMAND_EXPORT": {
      "title": {
        "default": "Export as PDF"
      },
      "iconImageUrl": "/export.svg",
      "type": "command"
    },
    "COMMAND_COPY": {
      "title": {
        "default": "Copy as PDF"
      },
      "iconImageUrl": "/copy.svg",
      "type": "command"
    }
  }

in gulpfile

let copyIcons = build.subTask('copy-icons', function (gulp, buildOptions, done) {
    gulp.src('./**/*.svg')
        .pipe(gulp.dest('./temp/deploy'));
    done();
});
build.rig.addPostBuildTask(copyIcons);

svgs are kept in root of project i.e. image

Non-affected users see an image tag like:

<img src="https://tenant.sharepoint.com/sites/apps/ClientSideAssets/a6c763c8-6512-4220-9995-13c5eb3715c8/export.svg" class="ms-Image-image is-loaded ms-Image-image--portrait is-fadeIn image-607">

deanbot avatar Feb 26 '19 20:02 deanbot

Users experiencing the issue are set to see preview features in SharePoint! @mschaaks is that the case for you?

ref

deanbot avatar Feb 26 '19 21:02 deanbot

@deanbot I believe preview features are set at the organizational level within the tenant, however within the same tenant the issue occurs only for some accounts, which is a mistery to me.

mvdschaaks avatar Feb 27 '19 12:02 mvdschaaks

Any other suggestions ? At the time the situation still remains the same: only a few accounts experience the problem, so it is account related. At least i want to understand which account based relationship there is with the ability to render a command set button icon.

mvdschaaks avatar Mar 21 '19 06:03 mvdschaaks

hey Marc (@mschaaks) let me ask couple of questions here to try in getting a better picture of the issue:

  • where is the icon? is that part of the package or is it getting loaded from sowhere?
  • if this is part of the package, are you running CDN? if yes, is that default configuration (asset will be set to public) or you changed it?

basically I'm trying to figure out it that is something related to user permissions or it is CDN related.

Thanks, Luca

lucabandMSFT avatar Mar 26 '19 18:03 lucabandMSFT

I have a similar issue with iconImageUrl. Described steps here: https://github.com/SharePoint/sp-dev-docs/issues/3692

ystetsyuk avatar Mar 27 '19 15:03 ystetsyuk

Hi @deanbot. I discovered that it has something to do with a SPO release within the targeted release wave. Because this week both on my development tenant and on the tenant of the customer with targeted release users the problem went away magically. @lucabandMSFT the options I tried where local image within package (situated in app catalog site) and bit64 encoded string. I did not test out the CDN variant, maybe that one was able to circumvent the problem. It would be very helpful to consult a list of bugfixes done or planned coupled to issues mentioned here. @andrewconnell @VesaJuvonen : is this (already) possible ?

mvdschaaks avatar Apr 03 '19 05:04 mvdschaaks

Since it sounds like a fix addressed the issue and it's now rolling out in SPO, it's ok to close this issue, correct?

@mschaaks said:

It would be very helpful to consult a list of bugfixes done or planned coupled to issues mentioned here.

That's not currently done... good suggestion though. Maybe submit that as a user voice feature request: https://aka.ms/sp-dev-uservoice

andrewconnell avatar Apr 03 '19 09:04 andrewconnell

We are currently experiencing this issue (exactly as described above) across a number of our tenants (including ones which are not set to targeted release). Has this been reintroduced as a regression in a recent release?

Icons which were previously working are now no longer working. We have tried base64 encoded images and links to PNG files. We have a deployed version of an app in a tenant which has not been updated for ~30 days - the icon has previously worked in that and stopped working recently without us making any changes to the tenant or the deployed version of the application.

csgkeith avatar Apr 17 '19 12:04 csgkeith

We have a similar issue, but affecting images, not icons. Using the standard News web part, no images are visible in IE, and the class code includes "is-notLoaded is-error". This was working until very recently.

dg2000r avatar Apr 23 '19 15:04 dg2000r

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 25 '20 06:01 msft-github-bot