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

#   Issue with Joomla Search display when searching by Product Code with slashes

##

- **[jazzmang](/forum/user/5807-jazzmang "View jazzmang's Profile")**
- [![jazzmang's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5807_2014-05-02.jpg)](/forum/user/5807-jazzmang "View jazzmang's Profile") Topic Author
- [ Offline](/forum/user/5807-jazzmang)

Less More

- Posts: 291
- Thank you received: 26
-
-
- [](http://www.interkan.net)
-

9 years 3 weeks ago [\#279721](#279721) by [jazzmang](/forum/user/5807-jazzmang "View jazzmang's Profile")  *[Issue with Joomla Search display when searching by Product Code with slashes](/forum/45-filters-search/892216-issue-with-joomla-search-display-when-searching-by-product-code-with-slashes#279721 "-- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.8.0 -- PHP version -- : 5.6.31 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : None  Search has been working fine but some where between the Joomla 3.8.0 and HikaShop 3.2.0 upgrades, we've found that if you now search for a product code that contains a slash (/).  e.g. SHIM/SET it long longer provides a link and the product name in the Joomla search results.  If you replace the slash (/) in the product doe with a dash (-) or just remove it, it works fine.  e.g. the product code SHIM-SET or GreenBook works just fine.  It was working before on the site in question for almost a year (originally built under 2.6.x) and we can replicate it under Joomla 3.8.0 and HikaShop 3.1.1 install as well. No one noticed until today as it is mostly the site owner that searches by product code or tells customs to search by code (when referencing a product).  Thus we don't think it is specific to HikaShop 3.2.0 but instead think it might be related to a Joomla 3.8.0 change that needs to be addressed.  I don't think it is simply filtering because a result does show (including it being tagged &quot;product&quot; and a description) but there is no actual link to the product itself.  Unfortunately I don't have any older Joomla sites to test on (nor do I want to because of security).  I'd test it on your demo site but looks like something is not setup correctly on your Search Module in the side bar (just generates a 404 error).")* was created by *[jazzmang](/forum/user/5807-jazzmang "View jazzmang's Profile")*

-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.8.0
-- PHP version -- : 5.6.31
-- Browser(s) name and version -- : any
-- Error-message(debug-mod must be tuned on) -- : None

Search has been working fine but some where between the Joomla 3.8.0 and HikaShop 3.2.0 upgrades, we've found that if you now search for a product code that contains a slash (/).

e.g. SHIM/SET it long longer provides a link and the product name in the Joomla search results.

If you replace the slash (/) in the product doe with a dash (-) or just remove it, it works fine.

e.g. the product code SHIM-SET or GreenBook works just fine.

It was working before on the site in question for almost a year (originally built under 2.6.x) and we can replicate it under Joomla 3.8.0 and HikaShop 3.1.1 install as well. No one noticed until today as it is mostly the site owner that searches by product code or tells customs to search by code (when referencing a product).

Thus we don't think it is specific to HikaShop 3.2.0 but instead think it might be related to a Joomla 3.8.0 change that needs to be addressed.

I don't think it is simply filtering because a result does show (including it being tagged "product" and a description) but there is no actual link to the product itself.

Unfortunately I don't have any older Joomla sites to test on (nor do I want to because of security).

I'd test it on your demo site but looks like something is not setup correctly on your Search Module in the side bar (just generates a 404 error).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ZpbHRlcnMtc2VhcmNoLzg5MjIxNi1pc3N1ZS13aXRoLWpvb21sYS1zZWFyY2gtZGlzcGxheS13aGVuLXNlYXJjaGluZy1ieS1wcm9kdWN0LWNvZGUtd2l0aC1zbGFzaGVzP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86309
- Thank you received: 14274
-
-

9 years 3 weeks ago -  9 years 3 weeks ago [\#279757](#279757) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Issue with Joomla Search display when searching by Product Code with slashes](/forum/45-filters-search/892216-issue-with-joomla-search-display-when-searching-by-product-code-with-slashes#279757 "-- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.8.0 -- PHP version -- : 5.6.31 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : None  Search has been working fine but some where between the Joomla 3.8.0 and HikaShop 3.2.0 upgrades, we've found that if you now search for a product code that contains a slash (/).  e.g. SHIM/SET it long longer provides a link and the product name in the Joomla search results.  If you replace the slash (/) in the product doe with a dash (-) or just remove it, it works fine.  e.g. the product code SHIM-SET or GreenBook works just fine.  It was working before on the site in question for almost a year (originally built under 2.6.x) and we can replicate it under Joomla 3.8.0 and HikaShop 3.1.1 install as well. No one noticed until today as it is mostly the site owner that searches by product code or tells customs to search by code (when referencing a product).  Thus we don't think it is specific to HikaShop 3.2.0 but instead think it might be related to a Joomla 3.8.0 change that needs to be addressed.  I don't think it is simply filtering because a result does show (including it being tagged &quot;product&quot; and a description) but there is no actual link to the product itself.  Unfortunately I don't have any older Joomla sites to test on (nor do I want to because of security).  I'd test it on your demo site but looks like something is not setup correctly on your Search Module in the side bar (just generates a 404 error).")*

Hi,

Thanks for your feedback on our demo website. That's a bug we already fixed. I've updated the demo website to get the patch.

But that won't help you. On our demo website, it's the HikaShop filter module that is used, and not the Joomla search module.
From what I can see that looks like a bug of Joomla's search system.
The $needle variable should have its slashes backslashed on the line:
$result-&gt;title = preg_replace("/\b($needle)\b/ui", $hl1 . "$1" . $hl2, htmlspecialchars($result-&gt;title, ENT_COMPAT, 'UTF-8'));
in the file components/com_search/views/search/view.html.php

Adding the line:
$needle = str_replace('/','\/',$needle);
just before it fixes the issue on my test website.

Last edit: 9 years 3 weeks ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ZpbHRlcnMtc2VhcmNoLzg5MjIxNi1pc3N1ZS13aXRoLWpvb21sYS1zZWFyY2gtZGlzcGxheS13aGVuLXNlYXJjaGluZy1ieS1wcm9kdWN0LWNvZGUtd2l0aC1zbGFzaGVzP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86309
- Thank you received: 14274
-
-

9 years 3 weeks ago [\#279760](#279760) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Issue with Joomla Search display when searching by Product Code with slashes](/forum/45-filters-search/892216-issue-with-joomla-search-display-when-searching-by-product-code-with-slashes#279760 "-- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.8.0 -- PHP version -- : 5.6.31 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : None  Search has been working fine but some where between the Joomla 3.8.0 and HikaShop 3.2.0 upgrades, we've found that if you now search for a product code that contains a slash (/).  e.g. SHIM/SET it long longer provides a link and the product name in the Joomla search results.  If you replace the slash (/) in the product doe with a dash (-) or just remove it, it works fine.  e.g. the product code SHIM-SET or GreenBook works just fine.  It was working before on the site in question for almost a year (originally built under 2.6.x) and we can replicate it under Joomla 3.8.0 and HikaShop 3.1.1 install as well. No one noticed until today as it is mostly the site owner that searches by product code or tells customs to search by code (when referencing a product).  Thus we don't think it is specific to HikaShop 3.2.0 but instead think it might be related to a Joomla 3.8.0 change that needs to be addressed.  I don't think it is simply filtering because a result does show (including it being tagged &quot;product&quot; and a description) but there is no actual link to the product itself.  Unfortunately I don't have any older Joomla sites to test on (nor do I want to because of security).  I'd test it on your demo site but looks like something is not setup correctly on your Search Module in the side bar (just generates a 404 error).")*

I've reported it there:
[ github.com/joomla/joomla-cms/issues/18220](https://github.com/joomla/joomla-cms/issues/18220)

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ZpbHRlcnMtc2VhcmNoLzg5MjIxNi1pc3N1ZS13aXRoLWpvb21sYS1zZWFyY2gtZGlzcGxheS13aGVuLXNlYXJjaGluZy1ieS1wcm9kdWN0LWNvZGUtd2l0aC1zbGFzaGVzP3RtcGw9bWFya2Rvd24=) 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.103 seconds

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

[](#top)
