[Skip to main content](#vessel-content)

#   Cannot Access Protected Property

##

- **[jbrull](/forum/user/65386-jbrull "View jbrull's Profile")**
- [![jbrull's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/65386-jbrull "View jbrull's Profile") Topic Author
- [ Offline](/forum/user/65386-jbrull)

Less More

- Posts: 10
- Thank you received: 2
-
-

4 years 7 months ago [\#341149](#341149) by [jbrull](/forum/user/65386-jbrull "View jbrull's Profile")  *[Cannot Access Protected Property](/forum/26-product-category-display/904320-cannot-access-protected-property#341149 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.2 -- PHP version -- : 8.1.0 -- Browser(s) name and version -- : Any -- Error-message(debug-mod must be tuned on) -- : Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params  Hello again,  I created a Search filter menu item function per instructions I found on this forum and in the associated documentation. Unfortunately, I'm getting an error upon trying to Search on the front end: &quot;Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params&quot;  In an attempt to fix that, I broke my breadcrumbs - they don't follow the shop items, although sometimes it does and it'll stick on a particular item and not change. I've looked up this issue and have adjusted my SEF settings in HikaShop, but to no avail. I didn't mess with any CSS/PHP, but I also am not aware of any changes I made to breadcrumbs prior to the problem appearing.  Apologies that I cannot provide more information, as I'm not sure where to look. I've checked the logs and have tried inspecting the elements, but nothing stands out. I've attached the debug log for the error to this post - if there's anything else you need, please let me know. My website should be attached to this post.  Lastly, I'm wondering if it's normal to see so many &quot;Deprecated&quot; errors with debug enabled.  Thanks.")* was created by *[jbrull](/forum/user/65386-jbrull "View jbrull's Profile")*

-- HikaShop version -- : 4.5.1
-- Joomla version -- : 4.1.2
-- PHP version -- : 8.1.0
-- Browser(s) name and version -- : Any
-- Error-message(debug-mod must be tuned on) -- : Cannot access protected property Joomla\CMS\Menu\MenuItem::$params

Hello again,

I created a Search filter menu item function per instructions I found on this forum and in the associated documentation. Unfortunately, I'm getting an error upon trying to Search on the front end: "Cannot access protected property Joomla\CMS\Menu\MenuItem::$params"

In an attempt to fix that, I broke my breadcrumbs - they don't follow the shop items, although sometimes it does and it'll stick on a particular item and not change. I've looked up this issue and have adjusted my SEF settings in HikaShop, but to no avail. I didn't mess with any CSS/PHP, but I also am not aware of any changes I made to breadcrumbs prior to the problem appearing.

Apologies that I cannot provide more information, as I'm not sure where to look. I've checked the logs and have tried inspecting the elements, but nothing stands out. I've attached the debug log for the error to this post - if there's anything else you need, please let me know. My website should be attached to this post.

Lastly, I'm wondering if it's normal to see so many "Deprecated" errors with debug enabled.

Thanks.

- [ ![DebugLog.jpg](/forum/attachment/54733) ](/forum/attachment/54733 "DebugLog.jpg") [ ](/forum/attachment/54733?download=1 "DebugLog.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQzMjAtY2Fubm90LWFjY2Vzcy1wcm90ZWN0ZWQtcHJvcGVydHk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

4 years 7 months ago [\#341157](#341157) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Cannot Access Protected Property](/forum/26-product-category-display/904320-cannot-access-protected-property#341157 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.2 -- PHP version -- : 8.1.0 -- Browser(s) name and version -- : Any -- Error-message(debug-mod must be tuned on) -- : Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params  Hello again,  I created a Search filter menu item function per instructions I found on this forum and in the associated documentation. Unfortunately, I'm getting an error upon trying to Search on the front end: &quot;Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params&quot;  In an attempt to fix that, I broke my breadcrumbs - they don't follow the shop items, although sometimes it does and it'll stick on a particular item and not change. I've looked up this issue and have adjusted my SEF settings in HikaShop, but to no avail. I didn't mess with any CSS/PHP, but I also am not aware of any changes I made to breadcrumbs prior to the problem appearing.  Apologies that I cannot provide more information, as I'm not sure where to look. I've checked the logs and have tried inspecting the elements, but nothing stands out. I've attached the debug log for the error to this post - if there's anything else you need, please let me know. My website should be attached to this post.  Lastly, I'm wondering if it's normal to see so many &quot;Deprecated&quot; errors with debug enabled.  Thanks.")*

Hi,

Thank you. The screenshot of the callstack is great.
This error happens due to a compatibilty issue with Joomla 4 when displaying a categories listing module with a specific set of settings.
In the file components/com_hikashop/views/category/tmpl/listing_list.php try changing the code: Code:

$hkParams = $menuItem-&gt;params-&gt;get('hk_product',false);

to: Code:

$category_params = $menuItem-&gt;getParams(); $hkParams = $category_params-&gt;get('hk_product',false);

That should hopefully fix the error.

The following user(s) said Thank You: [jbrull](/forum/user/65386-jbrull "View jbrull's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQzMjAtY2Fubm90LWFjY2Vzcy1wcm90ZWN0ZWQtcHJvcGVydHk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jbrull](/forum/user/65386-jbrull "View jbrull's Profile")**
- [![jbrull's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/65386-jbrull "View jbrull's Profile") Topic Author
- [ Offline](/forum/user/65386-jbrull)

Less More

- Posts: 10
- Thank you received: 2
-
-

4 years 7 months ago [\#341188](#341188) by [jbrull](/forum/user/65386-jbrull "View jbrull's Profile")  Replied by *[jbrull](/forum/user/65386-jbrull "View jbrull's Profile")* on topic *[Cannot Access Protected Property](/forum/26-product-category-display/904320-cannot-access-protected-property#341188 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.2 -- PHP version -- : 8.1.0 -- Browser(s) name and version -- : Any -- Error-message(debug-mod must be tuned on) -- : Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params  Hello again,  I created a Search filter menu item function per instructions I found on this forum and in the associated documentation. Unfortunately, I'm getting an error upon trying to Search on the front end: &quot;Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params&quot;  In an attempt to fix that, I broke my breadcrumbs - they don't follow the shop items, although sometimes it does and it'll stick on a particular item and not change. I've looked up this issue and have adjusted my SEF settings in HikaShop, but to no avail. I didn't mess with any CSS/PHP, but I also am not aware of any changes I made to breadcrumbs prior to the problem appearing.  Apologies that I cannot provide more information, as I'm not sure where to look. I've checked the logs and have tried inspecting the elements, but nothing stands out. I've attached the debug log for the error to this post - if there's anything else you need, please let me know. My website should be attached to this post.  Lastly, I'm wondering if it's normal to see so many &quot;Deprecated&quot; errors with debug enabled.  Thanks.")*

Nicolas,

Thank you. I've changed the statement to the one you provided. The search function appears to work perfectly now.

I'm curious: is it normal to have so many deprecations with Debug Site turned on; is it because I'm using Joomla 4.1.2? Will these impact the performance of my site at all - is it something I should seek a fix for? For example:

*"Deprecated: preg\_match(): Passing null to parameter #2 ($subject) of type string is deprecated in x/x/x/x"
"Deprecated: htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated in x/x/x/x"*

Apologies to pile onto this thread, but the code change did not fix the issues I am having with breadcrumbs in HikaShop areas. I can't really explain what it's doing ... it'll seemingly show breadcrumbs as if it were on a random item's product page. Other times it doesn't show beyond "Home / Shop." They also don't extend out when moving through categories. They appear to work as expected outside of HikaShop modules. As I mentioned, I've attempted 'fixes' I've found for general breadcrumb issues on this forum, such as altering SEF settings, such as Simplified Breadcrumbs, etc. I can't seem to find anything I've yet to try while I continue to scour the web.

I have a preproduction site (/preproduction) that I make changes to before altering the live site, and it doesn't have this issue. So it's very peculiar, as I wouldn't have made a change to the live site that could've caused it without also affecting my preproduction site.

Any ideas how to approach this issue? I'm not seeing anything on Debug or my site's logs (with Log Everything enabled).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQzMjAtY2Fubm90LWFjY2Vzcy1wcm90ZWN0ZWQtcHJvcGVydHk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

4 years 7 months ago [\#341197](#341197) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Cannot Access Protected Property](/forum/26-product-category-display/904320-cannot-access-protected-property#341197 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.2 -- PHP version -- : 8.1.0 -- Browser(s) name and version -- : Any -- Error-message(debug-mod must be tuned on) -- : Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params  Hello again,  I created a Search filter menu item function per instructions I found on this forum and in the associated documentation. Unfortunately, I'm getting an error upon trying to Search on the front end: &quot;Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params&quot;  In an attempt to fix that, I broke my breadcrumbs - they don't follow the shop items, although sometimes it does and it'll stick on a particular item and not change. I've looked up this issue and have adjusted my SEF settings in HikaShop, but to no avail. I didn't mess with any CSS/PHP, but I also am not aware of any changes I made to breadcrumbs prior to the problem appearing.  Apologies that I cannot provide more information, as I'm not sure where to look. I've checked the logs and have tried inspecting the elements, but nothing stands out. I've attached the debug log for the error to this post - if there's anything else you need, please let me know. My website should be attached to this post.  Lastly, I'm wondering if it's normal to see so many &quot;Deprecated&quot; errors with debug enabled.  Thanks.")*

Hi,

1. The deprecated messages have nothing to do with your version of Joomla but your version of PHP.
They do not impact performances.
These are added by PHP to notify developers that things will change in the future and that they should modify their code to adapt to the changes to come.
So the deprecated messages you'll see on PHP 8.1 will potentially become warnings on PHP8.2 or PHP 9, and then potentially fatal errors on PHP 9 or 10.
They are purely for developers. So as a user, you can just ignore them.
The best is to report them to the developers concerned by the file path provided in the deprecated messages so that they are aware of them and can modify their code ( in HikaShop for example, we can't test all the possible cases on our end. That would be endless. So having such feedback is great to prepare for the future).

2. This looks like a caching issue with the breadcrumbs module. You need to deactivate the caching of that module as it needs to be dynamic or it won't work properly.

The following user(s) said Thank You: [jbrull](/forum/user/65386-jbrull "View jbrull's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQzMjAtY2Fubm90LWFjY2Vzcy1wcm90ZWN0ZWQtcHJvcGVydHk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jbrull](/forum/user/65386-jbrull "View jbrull's Profile")**
- [![jbrull's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/65386-jbrull "View jbrull's Profile") Topic Author
- [ Offline](/forum/user/65386-jbrull)

Less More

- Posts: 10
- Thank you received: 2
-
-

4 years 7 months ago [\#341204](#341204) by [jbrull](/forum/user/65386-jbrull "View jbrull's Profile")  Replied by *[jbrull](/forum/user/65386-jbrull "View jbrull's Profile")* on topic *[Cannot Access Protected Property](/forum/26-product-category-display/904320-cannot-access-protected-property#341204 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.2 -- PHP version -- : 8.1.0 -- Browser(s) name and version -- : Any -- Error-message(debug-mod must be tuned on) -- : Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params  Hello again,  I created a Search filter menu item function per instructions I found on this forum and in the associated documentation. Unfortunately, I'm getting an error upon trying to Search on the front end: &quot;Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params&quot;  In an attempt to fix that, I broke my breadcrumbs - they don't follow the shop items, although sometimes it does and it'll stick on a particular item and not change. I've looked up this issue and have adjusted my SEF settings in HikaShop, but to no avail. I didn't mess with any CSS/PHP, but I also am not aware of any changes I made to breadcrumbs prior to the problem appearing.  Apologies that I cannot provide more information, as I'm not sure where to look. I've checked the logs and have tried inspecting the elements, but nothing stands out. I've attached the debug log for the error to this post - if there's anything else you need, please let me know. My website should be attached to this post.  Lastly, I'm wondering if it's normal to see so many &quot;Deprecated&quot; errors with debug enabled.  Thanks.")*

Nicolas,

Thanks for the information. Per your request, here’s more information about those deprecations:

- *Deprecated: preg\_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/user/public\_html/administrator/components/com\_hikashop/helpers/image.php on line 793.*

- *Deprecated: htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated in /home/user/public\_html/administrator/components/com\_hikashop/classes/filter.php on line 1700.*

The module is set to its default - no cache. However, System Cache got turned on somehow; upon disabling it, everything appears fixed. Thanks again!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQzMjAtY2Fubm90LWFjY2Vzcy1wcm90ZWN0ZWQtcHJvcGVydHk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

4 years 7 months ago [\#341205](#341205) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Cannot Access Protected Property](/forum/26-product-category-display/904320-cannot-access-protected-property#341205 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 4.1.2 -- PHP version -- : 8.1.0 -- Browser(s) name and version -- : Any -- Error-message(debug-mod must be tuned on) -- : Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params  Hello again,  I created a Search filter menu item function per instructions I found on this forum and in the associated documentation. Unfortunately, I'm getting an error upon trying to Search on the front end: &quot;Cannot access protected property Joomla&#92;CMS&#92;Menu&#92;MenuItem::$params&quot;  In an attempt to fix that, I broke my breadcrumbs - they don't follow the shop items, although sometimes it does and it'll stick on a particular item and not change. I've looked up this issue and have adjusted my SEF settings in HikaShop, but to no avail. I didn't mess with any CSS/PHP, but I also am not aware of any changes I made to breadcrumbs prior to the problem appearing.  Apologies that I cannot provide more information, as I'm not sure where to look. I've checked the logs and have tried inspecting the elements, but nothing stands out. I've attached the debug log for the error to this post - if there's anything else you need, please let me know. My website should be attached to this post.  Lastly, I'm wondering if it's normal to see so many &quot;Deprecated&quot; errors with debug enabled.  Thanks.")*

Hi,

Thank you. Patches for both deprecated messages will be included in the next version of HikaShop.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQzMjAtY2Fubm90LWFjY2Vzcy1wcm90ZWN0ZWQtcHJvcGVydHk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.061 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
