Compatibilty plugin and hikaserial

  • Posts: 24
  • Thank you received: 1
  • Hikamarket Frontedition Hikaserial Standard Hikashop Business
3 days 18 hours ago #367138

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

  • Posts: 26234
  • Thank you received: 4036
  • MODERATOR
2 days 18 hours ago #367150

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:

class PlgContentSerialprivatecontent extends JPlugin {
By:
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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: Luchen6

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

  • Posts: 24
  • Thank you received: 1
  • Hikamarket Frontedition Hikaserial Standard Hikashop Business
2 days 17 hours ago #367151

Jerome,
Now I get the error
Class "JPluginHelper" not found on line 23.

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

  • Posts: 26234
  • Thank you received: 4036
  • MODERATOR
9 hours 43 minutes ago #367193

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

if(!class_exists('hikashopJoomlaPlugin')) return;
By
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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

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