Open HitmanInWis opened 4 months ago
Potential solution is to simply check if $(dialogContentSelector)
is found, if not, exit the updateImageThumbnail
function.
Note that the thumbnail for the featured page image is still correctly showing (it is loading via standard image widget functionality) so this error is not technically preventing authors from doing anything they need to do.
Here's the solution that I believe is working for me.
Change the following code within updatePageImageThumbnail()
in image.js
var thumbnailConfigPath = $(dialogContentSelector).find(pageImageThumbnailSelector).attr(pageImageThumbnailConfigPathAttribute);
var thumbnailComponentPath = $(dialogContentSelector).find(pageImageThumbnailSelector).attr(pageImageThumbnailComponentPathAttribute);
to
var thumbnailElement = $(dialogContentSelector).find(pageImageThumbnailSelector)
if (thumbnailElement.size() === 0) {
return Promise.resolve();
}
var thumbnailConfigPath = thumbnailElement.attr(pageImageThumbnailConfigPathAttribute);
var thumbnailComponentPath = thumbnailElement.attr(pageImageThumbnailComponentPathAttribute);
Bug Present as of Version: 2.25.5-SNAPSHOT
When opening Page Properties there are requests to the server that result in HTTP 404 (Not Found) in the browser console. The URL looks like this: http://localhost:4502/mnt/overlay/wcm/core/content/sites/undefined.htmlundefined
This is coming from
updateImageThumbnail
inimage.js
- the function assumes we are in an actualimage
dialog (looking for the.cmp-image__editor
selector) and attempts to fetch the page image. Since the selector is not present,thumbnailConfigPath
andthumbnailComponentPath
end up null, and thus the fetch ofundefined.htmlundefined