Js error when enabling HikaShop user synchronization plugin on Joomla 4

  • Posts: 31
  • Thank you received: 3
2 years 5 months ago #342326

-- HikaShop version -- : 4.5.1
-- Joomla version -- : 4.1.4
-- PHP version -- : 8

Hi,

I had an error in backend when creating posts in Easyblog. It was a JS error causing the impossibility to save the post.

The easyblog team identified the plugin from wich the problem arrived.

Here is their message :

It seems like the error is caused by the following plugin on your site, HikaShop user synchronization plugin. Once I disabled this plugin, the error is no longer shown. I have re-enabled back the plugin for now so that it will not break any functionality of the Hikashop component.

Specifically, the following function in the plugin is causing the composer page to load unnecessary Joomla scripts, onBeforeCompileHead

Hope you will correct it in a future release

Regards
Pascal

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 5 months ago #342329

Hi,

Thank you for your feedback.
Please add the code:

		$app = JFactory::getApplication();
		if($app->isClient('administrator')) {
			if(empty($_REQUEST['option']) || $_REQUEST['option'] != 'com_hikashop')
				return;
		}
just after the line:
public function onBeforeCompileHead(){
in the file plugins/system/hikashopuser/hikashopuser.php and that should avoid that conflict even with the HikaShop user synchronization plugin enabled.
Could you please confirm that this change fixes the problem ?

Last edit: 2 years 5 months ago by nicolas.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 5 months ago #342339

While testing the code I gave above, I found an issue with it.
I've modified my previous message with the correct code.

The following user(s) said Thank You: _Pascal_

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

  • Posts: 31
  • Thank you received: 3
2 years 5 months ago #342347

Yes that is correcting the problem
Thanks

The following user(s) said Thank You: nicolas

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 5 months ago #342350

Thanks for your feedback. We'll add that patch on our end.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum