NMND Posted February 5, 2023 Posted February 5, 2023 (edited) Does the Block Image Slider save images in the wrong dir or does it have the wrong baseimgurl set in the view script? The main page displays only an icon of a camera - the placeholder img - instead of the pic I uploaded. Checking the urls I get this: https://domain.tld/modules/homeslider/images/e6d5ad7d13bc588c9df3573b7de85786_hkelfilename01.png (on the main page) versus https://domain.tld/img/homeslider/e6d5ad7d13bc588c9df3573b7de85786_hkelfilename01.png (in the settings of the slider module) I'm thinking about just linking the two dirs in the ubuntu OS? Any advise? Product images work fine. Running thirtybees 1.4.0 on Ubuntu 20.04 with PHP 7.4 (FPM) Edited February 6, 2023 by NMND issue solved
datakick Posted February 6, 2023 Posted February 6, 2023 Module now keeps images in /img/homeslider directory. The default module template displays the image properly. However, if you theme has override for the template, it may be looking into wrong place for images. Edit file /themes/<theme>/modules/homeslider/homeslider.tpl and replace src="{$link->getMediaLink("`$smarty.const._MODULE_DIR_`homeslider/images/`$slide.image|escape:'htmlall':'UTF-8'`")}" with src="{$link->getMediaLink($slide.imageUrl)|escape:'htmlall':'UTF-8'}" As you can see, original implementation used hardcoded path to module directory. That's just wrong. New implementation simply displays the url that module provides. 1
NMND Posted February 6, 2023 Author Posted February 6, 2023 Good morning! That worked like a charm. Thank you very much! ❤️
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now