Adoxio / xRM-Portals-Community-Edition

The definitive edition of Microsoft Open Source Portals, supported by the experts in portals.
MIT License
107 stars 60 forks source link

Weblinks - External URL is not rendering #72

Closed fainelia closed 5 years ago

fainelia commented 5 years ago

We have weblinks with external URLs, they shows up in the inline editing, but are not rendered on the page. if anyone have any ideas how to fix issue image

amervitz commented 5 years ago

This seems like it's a bug, you could try to fix it or wait for someone else to.

fainelia commented 5 years ago

We fixed the issue by adding three lins of code in WebLink.cs file in Adxstudio.Xrm project, the screenshot is below, may be one of the contributors can review and fix the bug: image

amervitz commented 5 years ago

Thanks. The code that assigns applicationPath.ExternalUrl before this code is executed is the likely culprit, we will look into this further, or you can if you'd like.

fainelia commented 5 years ago

Me again, how about this solution: one line of code in ContentMapUrlProvider.cs in Adxstudio.Xrm image

amervitz commented 5 years ago

This change looks good, I'd suggest this slight adjustment:

return string.IsNullOrWhiteSpace(path.ExternalUrl) ? ContextLanguageInfo.PrependLanguageCode(path) : path;

Please go ahead with submitting a pull request for this. Thanks!

amervitz commented 5 years ago

Closed by commit https://github.com/Adoxio/xRM-Portals-Community-Edition/commit/40dfab56f713e1e47b982b3b4ac88e67b4808b53