Search
Other Sourcerer questions
Forum

Sourcerer Code Broken after Update Joomla 3 > 4

Geoff's Avatar Geoff
This code placed inside a chromeless module was successful in Joomla 3 -
{source}<?php
   $ucg_coverimage = JRequest::getVar('CoverImage'); 
   echo $ucg_coverimage;
?>{/source}

But now failing in Joomla 4, using Sourcerer 10.1.3 (PHP 8.1x}, with the error message "Class "JRequest" not found".

(Note: The page will load if I disable the Sourcerer plugin, obviously without the desired inserted text.)

Any advice to fix?

thanks,
Geoff
Peter van Westen's Avatar Peter van Westen ADMIN
Correct. You will have to update your php code to work with the Joomla 4+ php code base.

First hit on Google for "Joomla 4 JRequest" mentions:
forum.joomla.org/viewtopic.php?f=815&t=989199
Please post a rating at the Joomla! Extensions Directory
Geoff's Avatar Geoff
Got it, thanks Peter.
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription