"Random Image" module Crashes Joomla 3.8.8

Did you may have found a bug in Joomla! 3.x but aren't sure? This forum is the place to help figure out if the problem is a bug and how to report it. If you are an experienced Joomla! user and are certain that you have found a bug please use the Bug Tracker to submit your issue.
This forum is for discussion about bugs and to get help with reporting them to the Bug Tracker: https://issues.joomla.org

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
User avatar
Gasoline
Joomla! Explorer
Joomla! Explorer
Posts: 412
Joined: Tue Aug 23, 2005 10:33 am
Location: NL
Contact:

"Random Image" module Crashes Joomla 3.8.8

Postby Gasoline » Tue May 22, 2018 4:18 pm

After upgrading 50+ sites 2 went down with error:

Code: Select all

0 - Using $this when not in object context


If I disable Random Image module site works well.

All clean and tailormade templates by me. Only those 2 sites use the Random Image Module.
https://websitezeist.nl
Websites - Webshops - SEO
Fast, Safe & Hassle free!

User avatar
mbabker
Joomla! Hero
Joomla! Hero
Posts: 2150
Joined: Sun Feb 28, 2010 8:26 pm
Location: White Bear Lake, MN, USA
Contact:

Re: "Random Image" module Crashes Joomla 3.8.8

Postby mbabker » Tue May 22, 2018 4:20 pm

See https://github.com/joomla/joomla-cms/pull/20533 and other related forum threads.
Release Lead, CMS Maintainer, Framework Maintainer, Security Team Member, .org System Administrator

Manually updating Joomla? See https://gist.github.com/mbabker/d7bfb4e1e2fbc6b7815a733607f89281

User avatar
Gasoline
Joomla! Explorer
Joomla! Explorer
Posts: 412
Joined: Tue Aug 23, 2005 10:33 am
Location: NL
Contact:

Re: "Random Image" module Crashes Joomla 3.8.8

Postby Gasoline » Tue May 22, 2018 4:31 pm

mbabker wrote:See https://github.com/joomla/joomla-cms/pull/20533 and other related forum threads.


Yup, I found that already. That was the fix for me: https://github.com/joomla/joomla-cms/pull/20533/files
https://websitezeist.nl
Websites - Webshops - SEO
Fast, Safe & Hassle free!

Cre8iv
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed May 23, 2018 6:21 am

Re: "Random Image" module Crashes Joomla 3.8.8

Postby Cre8iv » Wed May 23, 2018 6:31 am

It seems realy the compilation from the relative path to the image/random folder for the random pics is depricated.
1. Copy Original File /modules/mod_random_image/tmpl/default.php to default_old.php
2. Use the Solution from line 13 to 19 as the Github-Link is given here.

Code: Select all

 <?php if ($link) : ?>
 <a href="<?php echo $link; ?>">
 <?php endif; ?>
   <?php echo JHtml::_('image', $image->folder . '/' . htmlspecialchars($image->name, ENT_COMPAT, 'UTF-8'), htmlspecialchars($image->name, ENT_COMPAT, 'UTF-8'), array('width' => $image->width, 'height' => $image->height)); ?>
 <?php if ($link) : ?>
 </a>
 <?php endif; ?>


It's a default module from Joomla-Core and I think the DEV-Team will actualize the Update-Pool for future Update Tasks so we don't will have any Problems.


Return to “Joomla! 3.x Bug Reporting”

Who is online

Users browsing this forum: No registered users and 5 guests