productpage error with canonical url

  • Posts: 371
  • Thank you received: 11
  • Hikaserial Standard Hikashop Business
2 months 1 week ago #334289

-- HikaShop version -- : 4.4.3
-- Joomla version -- : 4.0.0-rc3
-- PHP version -- : 7.4.16
-- Error-message(debug-mod must be tuned on) -- : Cannot access protected property Joomla\CMS\Menu\MenuItem::$params

Hi,

I'm testing with Joomla 4 to be ready to upgrade as soon as everything's stable. Hikashop is doing well but I encountered an error when using canonical url's for products/categories. The error code is: Cannot access protected property Joomla\CMS\Menu\MenuItem::$params

Don't know if this is Joomla or Hikashop related, just reporting.

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

  • Posts: 73703
  • Thank you received: 11298
  • MODERATOR
2 months 1 week ago #334290

Hi,

Could you reproduce the problem with the "error reporting" and "debug mode" settings of the joomla configuration activated ?
It should display an error message with more information which will help us understand what's going on.

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

  • Posts: 371
  • Thank you received: 11
  • Hikaserial Standard Hikashop Business
2 months 1 week ago #334316

Hi,

No problem, here's the screenshot

Attachments:

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

  • Posts: 73703
  • Thank you received: 11298
  • MODERATOR
2 months 1 week ago #334323

Hi,

Thanks.
It looks to be something linked to the fact your using Joomla 4 and PHP7.4.
Change the code:

jimport('joomla.html.parameter');
			$category_params = new HikaParameter($menu->params);
to:
if(HIKASHOP_J30) {
				$category_params = $menu->getParams();
			} else {
				jimport('joomla.html.parameter');
				$category_params = new HikaParameter($menu->params);
			}
in the file components/com_hikashop/views/product/view.html.php
That should hopefully fix the problem.
Let us know how it goes so that we can include the modification on our end.

The following user(s) said Thank You: Matthijs

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

  • Posts: 371
  • Thank you received: 11
  • Hikaserial Standard Hikashop Business
2 months 1 week ago #334327

Hi,

Thanks, this solved the problem indeed.

After installing Hikashop and SP Pagebuilder, Joomla 4 only works with PHP 7.4. Versions 7.3 and 8.0 both give errors.

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

  • Posts: 73703
  • Thank you received: 11298
  • MODERATOR
2 months 1 week ago #334329

Hi,

Great. Thanks for the feedback. We'll add that on our end for the next version of HikaShop.
If you have other errors coming from HikaShop, do not hesitate to notify us about them like here so that we can fix them.

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

  • Posts: 371
  • Thank you received: 11
  • Hikaserial Standard Hikashop Business
2 months 1 week ago #334334

Hi,

No problem, will do.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum