MscrmTools / MscrmTools.SiteMapEditor

Manage the SiteMap with no XML edition
GNU General Public License v3.0
4 stars 6 forks source link

Vector Icon Bug #20

Closed ArtKarp closed 3 years ago

ArtKarp commented 4 years ago

When you create a sub area that is a URL, specify the vector and save it, the icon is not saved or uploaded. Also, if you import a sitemap that has a vector icon already in the sitemap it is not displayed when you select the sub area. This must be a UI issue because if you open a site map with a vIcon included and Update SiteMap, the icon is displayed correctly in in D365.

If you edit the site map using the model App Editor, it saves the vector icon selected to both "Icon=" and "VectorIcon=".

Then when you Load SiteMap in the XRM Toolbox SiteMap editor edit it an push it back, you loose the vector icons.

MscrmTools commented 4 years ago

@ArtKarp could you illustrate with a screenshot?

As for the icon not saved or uploaded, SiteMapEditor does not save or upload web resources. You need to add them separatly (using WebresourcesManager for example)

ArtKarp commented 4 years ago

The bug is that the xml isn't being saved by the editor. In fact, if you select a vector icon and then click to another sub area and back again, the vector field is now blank.

When you input a SVG web resource for a URL type of subarea this line is never uploaded to the server or exported to a file. If I manually add it to the xml file, open the file in SM editor and then upload it WITHOUT changing anything. The icon shows up as expected. When it is blank all you get is a clipboard icon.

This property is missing from the sitemap xml: VectorIcon="/WebResources/evx_/Common/Images/Nav_WebPageLink.svg"

image

image

image

ArtKarp commented 4 years ago

If this doesn't explain it, I am happy to schedule a conference call with you anytime.

ArtKarp commented 4 years ago

As a side note, your editor uploads encoded URLs correctly and they work. The model SM editor, removes all the encoding which makes the URL invalid. The encoding is required when you use a "Data=" parameter. So getting a working URL WITH an icon, currently, is a huge pain... 😭

MscrmTools commented 4 years ago

Thank you very much for all these details. I will fix this issue

ArtKarp commented 4 years ago

Great! Thank you.

MscrmTools commented 4 years ago

@ArtKarp Could you test with this version?

MsCrmTools.SiteMapEditor.zip

ArtKarp commented 4 years ago

Sure. Where do I install the dll?

ArtKarp commented 4 years ago

I copied the dll to here: C:\Users\\AppData\Roaming\MscrmTools\XrmToolBox\Plugins

Any other steps needed? How do I verify that the new dll is being used within toolbox?

I tried loading a sitemap from an online org and also importing a sitemap file. Both have a vector icon, but neither show up in the Vector Icon field for the sub area.

ArtKarp commented 4 years ago

I see the version on the main tools menu as SiteMap 1.2020.6.13. This matches the DLL product version. However, when I test it, I don't see any change. The problem is still as I described above. If it would help, I am happy to schedule a Zoom meeting.

ArtKarp commented 4 years ago

One other note. In testing today, I download a model app site map, not the default one. However, it seems that when I upload my custom model sitemap, it is overwriting the default one, not the custom one I downloaded.

ArtKarp commented 3 years ago

Just touching base on this. Any updates? Thanks

MscrmTools commented 3 years ago

Hi! no news so far. I need to find time to work on this. Not easy these days

ArtKarp commented 3 years ago

For anyone else trying to use/show SVGs for SiteMap URL links here is the workaround I have found to make this work:

  1. Connect to the org and Load SiteMap
  2. Save SiteMap
  3. Open and Edit the saved XML file (Notepad ++). Set the menu option "VectorIcon" URL to the web resource that you want to use

For example: VectorIcon="/WebResources/new_/Common/Images/MyGreatImage.svg" ("new" is used for example only)

  1. Save the edited XML file
  2. In the editor, choose Open SiteMap to load the edited xml file
  3. Then, Update SiteMap to upload your changes

Note: Don't edit anything in the editor while following this process.