This is an Open Source add-on that improves the reviewing process and lets external users to view & review content items or whole projects without the need to access the Edit Mode. Created and maintained by Bartosz Sekuła and Grzegorz Wiecheć
Apache License 2.0
17
stars
15
forks
source link
external-review-component.js not loaded on external review pages #214
We have installed advanced reviews nuget package to our project, and we are having an issue with using the external review links, as we are getting 404 errors when trying to load .js and .cs files for adding comments etc. during external reviews.
When going to a review link, the javascript is being requested from
https://<DOMAIN>/EPiServer/advanced-cms-external-reviews/ClientResources/external-review-component.js
instead of
https://<DOMAIN>/EPiServer/advanced-cms-external-reviews/1.1.0/ClientResources/external-review-component.js
When cloning the project and running it locally, these files are loaded normally. The problem occurs when referencing .dlls from the nuget package. I believe this behaviour might be cause by PageEditController:
private static string GetJsScriptPath()
{
const string url = "ClientResources/external-review-component.js";
if (ModuleResourceResolver.Instance.TryResolvePath(typeof(PageEditController).Assembly, url,
out var jsScriptPath))
{
return jsScriptPath;
}
return
}
Instead of ModuleResourceResolver.Instance.TryResolvePath, use ModuleResourceResolver.Instance.TryResolveClientPath, as this appends the nuget package version to the url path.
To reproduce:
Clone this repo (use version 1.1.0, master branch)
Go through steps to build and pack it as a nuget package
Install the local nuget package to the Alloy.Sample project
Change the references in Startup.cs to reference nugetpackage instead of project references
Run the solution, log into CMS, create a external review "edit" link. Go to this link
requests for "external-review-component.js" should return 404
Hello!
We have installed advanced reviews nuget package to our project, and we are having an issue with using the external review links, as we are getting 404 errors when trying to load .js and .cs files for adding comments etc. during external reviews.
When going to a review link, the javascript is being requested from
https://<DOMAIN>/EPiServer/advanced-cms-external-reviews/ClientResources/external-review-component.js
instead ofhttps://<DOMAIN>/EPiServer/advanced-cms-external-reviews/1.1.0/ClientResources/external-review-component.js
When cloning the project and running it locally, these files are loaded normally. The problem occurs when referencing .dlls from the nuget package. I believe this behaviour might be cause by PageEditController:
Instead of
ModuleResourceResolver.Instance.TryResolvePath
, useModuleResourceResolver.Instance.TryResolveClientPath
, as this appends the nuget package version to the url path.To reproduce:
Is it possible to get this fixed?
Thanks!