Errors with component EasySocial events from Stackideas

  • Posts: 1
  • Thank you received: 0
10 months 2 weeks ago #358052

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 5.0.1
-- PHP version -- : 8.2.14
-- Browser(s) name and version -- : Chrome 120.0.6099.129
-- Error-message(debug-mod must be tuned on) -- : plgFinderHikashopBridge::onFinderAfterSave(): Argument #1 ($event) must be of type Joomla\CMS\Event\Finder\AfterSaveEvent, Joomla\Event\Event given, called in /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/libraries/vendor/joomla/event/src/Dispatcher.php on line 454

Hello,

we are suddenly experiencing Hikashop related errors on our Joomla 5.0.1 page on component EasySocial from Stackideas when we try to create events on frontpage.

The error is:
error 0
plgFinderHikashopBridge::onFinderAfterSave(): Argument #1 ($event) must be of type Joomla\CMS\Event\Finder\AfterSaveEvent, Joomla\Event\Event given, called in /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/libraries/vendor/joomla/event/src/Dispatcher.php on line 454

The event itself has been created correctly.

When we try to publish the event in backend we do get error:

An error has occurred.
0 Joomla\Plugin\Finder\Content\Extension\Content::onFinderChangeState(): Argument #1 ($event) must be of type Joomla\CMS\Event\Finder\AfterChangeStateEvent, Joomla\Event\Event given, called in /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/libraries/vendor/joomla/event/src/Dispatcher.php on line 454


Because of this major issue, we have temporarily disabled HikaShop component and plugins but the error still happens on EasySocial.

We tried to de-install HikaShop solution completely on our website to see whether all will be fine, but in this case we are hitting error:

An error has occurred.
0 Undefined constant "JPATH_"


Therefore we currently do not have any solution and are completely stucked.


Best regards
Markus

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 months 2 weeks ago #358059

Hi,

The error message

plgFinderHikashopBridge::onFinderAfterSave(): Argument #1 ($event) must be of type Joomla\CMS\Event\Finder\AfterSaveEvent, Joomla\Event\Event given, called in /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/libraries/vendor/joomla/event/src/Dispatcher.php on line 454

indicates that an extension on your website is firing the event onFinderAfterSave providing it with an object of the class Joomla\Event\Event while HikaShop's finder (smart search) plugin expects it to be of class Joomla\CMS\Event\Finder\AfterSaveEvent
Simply disabling the HikaShop finder plugin via the Joomla plugins manager will remove the error.

However, the problem is not in the HikaShop finder plugin.
If you check the file plugins/finder/content/src/Extension/Content.php (which is the main file of the Joomla articles finder plugin (which indexes Joomla articles for the smart search), you can see on line 175 :
public function onFinderAfterSave(FinderEvent\AfterSaveEvent $event): void
And FinderEvent is actually an alias of Joomla\CMS\Event\Finder.
So the default content finder plugin of Joomla also expects Joomla\CMS\Event\Finder\AfterSaveEvent
Basically, that means that the problem is not on our end, but in the code which triggers the onFinderAfterSave event on your website.

We actually had a similar issue with HikaShop 5.0.0 because with Joomla 5, events now have specific event classes while before, it was the generic Joomla\Event\Event class.
So I think the issue comes from an extension which needs to be updated to support the new way of triggering these events on Joomla 5 I think.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum