"Random Image" module Crashes Joomla 3.8.8

Did you find 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
Locked
User avatar
Gasoline
Joomla! Explorer
Joomla! Explorer
Posts: 468
Joined: Tue Aug 23, 2005 10:33 am
Location: NL

"Random Image" module Crashes Joomla 3.8.8

Post by 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.
Using Joomla since 2005.

deleted user

Re: "Random Image" module Crashes Joomla 3.8.8

Post by deleted user » Tue May 22, 2018 4:20 pm

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

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

Re: "Random Image" module Crashes Joomla 3.8.8

Post by 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
Using Joomla since 2005.

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

Re: "Random Image" module Crashes Joomla 3.8.8

Post by 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.


Locked

Return to “Joomla! 3.x Bug Reporting”