PiTech 1.0.2 – Joomla 6 Compatibility Issue / JFactory Error - Question | JoomShaper

is live, now with multi-currency selling.

PiTech 1.0.2 – Joomla 6 Compatibility Issue / JFactory Error

M

Martin

Template 2 weeks ago

Hi guys,

am I missing something here, or is it really true that JoomShaper has been shipping a buggy PiTech template package for months while explicitly listing it as compatible with Joomla 6?

Installing pitech-template-1.0.2.zip on a clean Joomla 6 installation reproducibly results in:

[code] ClassNotFoundError

Attempted to load class "JFactory" from the global namespace. Did you forget a "use" statement? [/code]

The error comes from:

[code] /templates/pitech/error.php [/code]

Line 17:

[code] $doc = JFactory::getDocument(); [/code]

JFactory is legacy code and is no longer available like this in Joomla 6.

I find this rather difficult to understand, especially since PiTech 1.0.2 is officially advertised as compatible with Joomla 6, 5 and 4.

On the positive and constructive side, for anyone else running into this problem:

In:

[code] /templates/pitech/error.php [/code]

change:

[code] $doc = JFactory::getDocument(); [/code]

to:

[code] $doc = $app->getDocument(); [/code]

There are also additional legacy Joomla calls in the template, including JFactory and JURI, so the package really could use a proper Joomla 6 cleanup instead of relying on backward compatibility.

After replacing the outdated calls, PiTech 1.0.2 runs fine under Joomla 6.

I would very much appreciate it if JoomShaper could update the official package accordingly — especially when it is explicitly labelled as Joomla 6 compatible.

0
3 Answers
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 2 weeks ago #234029

Hi Martin,

Thank you for the detailed report and for sharing the workaround.

Could you please let us know which PHP version you are currently using on your Joomla 6 installation?

This information will help us reproduce and investigate the issue on our side.

Thanks!

0
M
Martin
Accepted Answer
2 weeks ago #234051

PHP 8.3 und 8.4

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 2 weeks ago #234057

Please, share the url where you see this issues.

Thanks

0