xp icon indicating copy to clipboard operation
xp copied to clipboard

Image component rendering causes 404 page if referenced image is not available

Open sigdestad opened this issue 3 years ago • 4 comments

Customer struggled with a front page showing 404, even if everything seemed normal - and the page was published. It turned out the error was caused by the image component (no info in logs etc). The linked image had (due to a different bug) wrong permissions, and was thus not accessible from the live front-end.

Solution: Image component must be able to handle "null" for the referenced image "silently" by not rendering the image. It should not fail.

Also investigate how/why the page returned 404? Can a part override the errorcode of the entire page? Should this even be possible? It was hard to debug and figure out this one.

sigdestad avatar Jan 10 '22 08:01 sigdestad

Isn't Image component deprecated?

rymsha avatar Jan 18 '22 14:01 rymsha

Yes, but still in use by many. This should be a very simple "if null" check that we seem to be missing now.

sigdestad avatar Jan 18 '22 23:01 sigdestad

@rymsha wouldn't this be solved after your changes in rendering error handling?

alansemenov avatar Feb 23 '22 12:02 alansemenov

No.

rymsha avatar Feb 23 '22 13:02 rymsha