Various Page Builder Addons Do Not Display Images From Joomla Articles - Question | JoomShaper

Various Page Builder Addons Do Not Display Images From Joomla Articles

D

danny

SP Page Builder 3 years ago

Hi guys,

I am using the Gazette template on a Joomla 3.9 build on top of php7.4. I have successfully been able to display various articles from different categories using various addons. Everything looks really attractive and nicely done. My only issue at this point is that none of the images are being displayed from the Joomla articles depending on which styles i select.

For example in the Articles addon, if i choose a style that has the thumbnail as the image in the site.php file for that addon, the images display. However, when i seletc another style that has the small or medium image set to display as shown in the site.php file, the images are not found and i have the following errors shown for example...

Notice: Undefined property: stdClass::$image_medium in /home1/chronpro/public_html/templates/shaper_gazette/sppagebuilder/addons/articles_slider/site.php on line 71

Notice: Undefined property: stdClass::$image_small in /home1/chronpro/public_html/templates/shaper_gazette/sppagebuilder/addons/articles/site.php on line 196

I found another support article that said that the images for these sizes are set in the Template > Blog area. So i enabled these settings and set the pixel sizes to the sizes recommended. However, the images still do not display.

I attempted to troubleshoot this by making sure to add an image to every image field i could find in the parameters for one of the articles being displayed. I cleared cache, etc. Still no images. The browser inspector shows that there is no url set for these article items either.

Any suggestions?

Thanks! I still love your templates and extensions :) (If you visit the site it will be reverted to the live version of an old template during the day so visitors can still use the site while i work on upgrades at night.)

1
5 Answers
D
danny
Accepted Answer
3 years ago #6581

Hi guys,

I was able to add support for the core joomla intro article images to be displayed in the addon modules. I'm sure there is a better place to change this such as in one of the classes that the site.php is extending.... but this works.

For example... In the site.php file for the articles addon around line 195 i editted the code to the following. (I'm using the Horizontal style for the articles displayed in the Articles addon aka "Article Slider" .)

                    } elseif($article_layout == "horizontal" || ($article_layout == "creative" && $key > 1)) {
                        $imagesArticle = json_decode($item->images);
                        $imageIntroURL = htmlspecialchars($imagesArticle->image_intro);
                        $image = $imageIntroURL;                    
                        //$image = $item->image_small;

It displays the images from the joomla intro article successfully for the horizontal style.

I added the following css to the image and it looks good.

img.sppb-img-responsive {
    object-fit: cover;
    width: 85px;
    height: 131px;
}

I'm running the latest version of page builder. If you could find a permanent fix for the image display issues i described in the first post that would be awesome. I attempted to set the blog images in the Template Blog parameters and add images to every field i could find in the article editor, but none are being displayed for any style in the sliders addon; except for styles that use the thumbnail parameter. It seems to be the case with the article slider addon and others as well.

Thanks!

1
Alex
Alex
Accepted Answer
3 years ago #6667

Hello Danny,

Do you have Lazy loading enabled? Your solution works for me except the lazy loading of the images.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 3 years ago #7032

Hi there,

Thanks for contacting us. Sorry for the inconvenience. Will you please provide me the Joomla administrator access to check the issue? I will check & get back to you soon.

-Thanks

0
Alex
Alex
Accepted Answer
3 years ago #7048

Are you asking me or Danny?

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 3 years ago #7051

@danny

0