Skip to main content

Compatibilty plugin and hikaserial

More
1 year 4 months ago #367138 by Luchen6
-- url of the page with the problem -- : www.volvokv.nl
-- HikaShop version -- : 5.6.1
-- HikaSerial version -- : 5.0.0
-- Joomla version -- : 5.3.0
-- PHP version -- : 8.3.14
-- Browser(s) name and version -- : Firefox
-- Error-message(debug-mod must be tuned on) -- : Class "JPlugin" not found.

When testing for not using the compatibility plugin I think there is an error for the plugin Serial Private Content - HikaSerial ; This plugin extends JPlugin an not hikaserialPlugin. After installing hikaserial in a test environment I cannot go to the plugins;

regards

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #367150 by Jerome
Hello,

HikaserialPlugin also extends from JPlugin.
Since "Serial Private Content" plugin is a "content" plugin, it cannot extends from HikaserialPlugin since HikaSerial core won't be load for that type of plugin.
Best is to use the HIkaShop Plugin abstraction interface.

In the "content/serialprivatecontent/serialprivatecontent.php" plugin, please replace:
Code:
class PlgContentSerialprivatecontent extends JPlugin {
By:
Code:
include_once(JPATH_ROOT.'/administrator/components/com_hikashop/pluginCompat.php'); if(!class_exists('hikashopJoomlaPlugin')) return; class PlgContentSerialprivatecontent extends hikashopJoomlaPlugin {
And it will fix the issue for that plugin.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: Luchen6

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #367151 by Luchen6
Jerome,
Now I get the error
Class "JPluginHelper" not found on line 23.

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #367193 by Jerome
Hello,

Sorry for the delay ; I'm working on a new release of HikaSerial for that.
There is another plugin in HikaSerial which can have the same kind of issue ; so I'm patching both for a new release.

In the plugin "serialprivatecontent", please replace
Code:
if(!class_exists('hikashopJoomlaPlugin')) return;
By
Code:
if(!class_exists('hikashopJoomlaPlugin')) return; if(HIKASHOP_J50 && !Joomla\CMS\Plugin\PluginHelper::isEnabled('behaviour', 'compat')) { $aliases = array ( 'JPluginHelper' => 'Joomla\CMS\Plugin\PluginHelper', 'JRegistry' => 'Joomla\Registry\Registry', 'JFactory' => 'Joomla\CMS\Factory', 'JText' => 'Joomla\CMS\Language\Text', ); foreach($aliases as $alias => $original) { if(!class_exists($alias)) class_alias($original, $alias); } }
And it should fix the issue with that plugin before the new release.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.166 seconds
Powered by Kunena Forum