DKarr Posted August 5 Share Posted August 5 When I add an image to the Backend Product Description, it uploads it to the server and records the dimensions and looks just fine. But it does not display it in Frontend Product. Looking at the source code I see the error. It is adding /shop/ to the image source. ie: <img alt="" src="/shop/images/corrector.jpg" style="width: 600px; height: 464px;" /> If I manually correct that to: <img alt="" src="images/corrector.jpg" style="width: 600px; height: 464px;" /> The image displays fine in the Frontend product but does not display in the Backend product and generates and error log: Error description:yii\base\InvalidRouteException: Unable to resolve the request "images/corrector.jpg". in /home/domain/public_html/shop/lib/vendor/yiisoft/yii2/base/Module.php:561 Quote At least 90% of my programming problems lie somewhere between my keyboard and my chair. Link to comment Share on other sites More sharing options...
darrin5698 Posted August 8 Share Posted August 8 It sounds like the issue is with the image path being incorrectly prefixed with /shop/ in the frontend, but not in the backend. This discrepancy could be due to a configuration issue or a bug in your CMS or store settings. To resolve this: Check Your CMS Configuration: Ensure that the base URL for media or image paths is set correctly in your CMS settings. Inspect Template or Theme Files: There might be hardcoded paths or specific configurations in your theme or template files that prepend /shop/ to the image URLs. Review these files to adjust the path settings. Review File Upload Code: If you have custom code handling image uploads, verify that it sets the correct paths for images in both the frontend and backend. Clear Caches: After making changes, clear any caches to ensure the updates are applied. If the problem persists, consult the documentation for your CMS or seek support from the CMS community or developer for a more specific fix. Quote Your Texas Benefits com Link to comment Share on other sites More sharing options...
DKarr Posted August 22 Author Share Posted August 22 I figured out that the problem is hidden in the code some where: it uploads the image to "shop/images" file but displays the url on the frontend as "shop/admin/images" file. Hopefully, this can be corrected in the next update. Meanwhile, I have added this to my list of work-around solutions/ignored errors. Quote At least 90% of my programming problems lie somewhere between my keyboard and my chair. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.