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

#   Javascript error when clicking on remove filter

##

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

Less More

- Posts: 217
- Thank you received: 4
-
-

7 years 3 months ago -  7 years 3 months ago [\#309190](#309190) by [FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")  *[Javascript error when clicking on remove filter](/forum/45-filters-search/897972-javascript-error-when-clicking-on-remove-filter#309190 "-- url of the page with the problem -- :   elodyprsteny.cz/snubni  -- HikaShop version -- : 4.2.0  Hello,  I experienced javascript errors when clicking &quot;remove filter&quot; for the patricular filter. Actually, this problem is only for 1 filter which is a checkboxes of custom fields. Please, check the link of my website and screenshots. This error caused that I can't remove filter.  Other buttons (remove filter) on this product page works as expected.  Thank you, Filip")* was created by *[FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")*

-- url of the page with the problem -- : [ elodyprsteny.cz/snubni](https://elodyprsteny.cz/snubni)
-- HikaShop version -- : 4.2.0

Hello,

I experienced javascript errors when clicking "remove filter" for the patricular filter. Actually, this problem is only for 1 filter which is a checkboxes of custom fields. Please, check the link of my website and screenshots. This error caused that I can't remove filter.

[ ![Snimekobrazovky2019-07-26v11.55.08.png](/forum/attachment/47367) ](/forum/attachment/47367 "...6v11.55.08.png")

[ ![Snimekobrazovky2019-07-26v11.54.56.png](/forum/attachment/47368) ](/forum/attachment/47368 "...6v11.54.56.png")

Other buttons (remove filter) on this product page works as expected.

Thank you,
Filip

- [ ![Snimekobrazovky2019-07-26v11.55.08.png](/forum/attachment/47367) ](/forum/attachment/47367 "...6v11.55.08.png") [ ](/forum/attachment/47367?download=1 "...6v11.55.08.png")
- [ ![Snimekobrazovky2019-07-26v11.54.56.png](/forum/attachment/47368) ](/forum/attachment/47368 "...6v11.54.56.png") [ ](/forum/attachment/47368?download=1 "...6v11.54.56.png")

Last edit: 7 years 3 months ago by [FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg5Nzk3Mi1qYXZhc2NyaXB0LWVycm9yLXdoZW4tY2xpY2tpbmctb24tcmVtb3ZlLWZpbHRlcj90bXBsPW1hcmtkb3du) 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: 86576
- Thank you received: 14320
-
-

7 years 3 months ago [\#309194](#309194) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Javascript error when clicking on remove filter](/forum/45-filters-search/897972-javascript-error-when-clicking-on-remove-filter#309194 "-- url of the page with the problem -- :   elodyprsteny.cz/snubni  -- HikaShop version -- : 4.2.0  Hello,  I experienced javascript errors when clicking &quot;remove filter&quot; for the patricular filter. Actually, this problem is only for 1 filter which is a checkboxes of custom fields. Please, check the link of my website and screenshots. This error caused that I can't remove filter.  Other buttons (remove filter) on this product page works as expected.  Thank you, Filip")*

Hi,

This looks like a customization issue:
[ monosnap.com/file/th7kaWZ5XUxt4BVR9ei4k1QBduYiWJ](https://monosnap.com/file/th7kaWZ5XUxt4BVR9ei4k1QBduYiWJ)
The input field which is referenced for the remove filter button seems to be commented out with HTML comment tags. And that's not in HikaShop by default.

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

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

Less More

- Posts: 217
- Thank you received: 4
-
-

7 years 3 months ago [\#309243](#309243) by [FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")  Replied by *[FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")* on topic *[Javascript error when clicking on remove filter](/forum/45-filters-search/897972-javascript-error-when-clicking-on-remove-filter#309243 "-- url of the page with the problem -- :   elodyprsteny.cz/snubni  -- HikaShop version -- : 4.2.0  Hello,  I experienced javascript errors when clicking &quot;remove filter&quot; for the patricular filter. Actually, this problem is only for 1 filter which is a checkboxes of custom fields. Please, check the link of my website and screenshots. This error caused that I can't remove filter.  Other buttons (remove filter) on this product page works as expected.  Thank you, Filip")*

Hello Nicolas,

Thank you very much. You are right, it was caused by my customization in classes/filter.php

I tried to remove " &gt; " before selected item and ", " after it. I already managed the first one, but I am not able to remove the comma, it always causes the same error. Maybe, could you advise me how to do that, please? I don't know how that works and why this error is occurring.

[ ![Snimekobrazovky2019-07-30v6.42.08.png](/forum/attachment/47384) ](/forum/attachment/47384 "...30v6.42.08.png")

Thank you in advance,
Filip

- [ ![Snimekobrazovky2019-07-30v6.42.08.png](/forum/attachment/47384) ](/forum/attachment/47384 "...30v6.42.08.png") [ ](/forum/attachment/47384?download=1 "...30v6.42.08.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg5Nzk3Mi1qYXZhc2NyaXB0LWVycm9yLXdoZW4tY2xpY2tpbmctb24tcmVtb3ZlLWZpbHRlcj90bXBsPW1hcmtkb3du) 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: 86576
- Thank you received: 14320
-
-

7 years 3 months ago [\#309249](#309249) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Javascript error when clicking on remove filter](/forum/45-filters-search/897972-javascript-error-when-clicking-on-remove-filter#309249 "-- url of the page with the problem -- :   elodyprsteny.cz/snubni  -- HikaShop version -- : 4.2.0  Hello,  I experienced javascript errors when clicking &quot;remove filter&quot; for the patricular filter. Actually, this problem is only for 1 filter which is a checkboxes of custom fields. Please, check the link of my website and screenshots. This error caused that I can't remove filter.  Other buttons (remove filter) on this product page works as expected.  Thank you, Filip")*

Hi,

If you check the displayInList function in class.filter, you'll see many commas after &lt;/a&gt; closing tags :
[ monosnap.com/file/8C59Yu2eHm4yr1aNJYnWMxTk4825xb](https://monosnap.com/file/8C59Yu2eHm4yr1aNJYnWMxTk4825xb)
These are the ones you want to delete. You don't want to remove other commas in that function, only the ones after these &lt;/a&gt; tags.

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

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

Less More

- Posts: 217
- Thank you received: 4
-
-

7 years 3 months ago [\#309366](#309366) by [FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")  Replied by *[FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")* on topic *[Javascript error when clicking on remove filter](/forum/45-filters-search/897972-javascript-error-when-clicking-on-remove-filter#309366 "-- url of the page with the problem -- :   elodyprsteny.cz/snubni  -- HikaShop version -- : 4.2.0  Hello,  I experienced javascript errors when clicking &quot;remove filter&quot; for the patricular filter. Actually, this problem is only for 1 filter which is a checkboxes of custom fields. Please, check the link of my website and screenshots. This error caused that I can't remove filter.  Other buttons (remove filter) on this product page works as expected.  Thank you, Filip")*

Hello Nicols,

thank you very much for advise. I tried it again, many times, but it doesn't work as you described. Please, check in this video:
[ www.loom.com/share/eff3851733d04c2cadd5d9a64bf31611](https://www.loom.com/share/eff3851733d04c2cadd5d9a64bf31611)

In function you are talking about, there is section commented with //DISPLAY FIELDS

I removed comma and space here:
$html.='&gt; &lt;a class="hikashop_filter_list_selected" style="font-weight:bold"&gt;'.JText::_($val[1]).'&lt;/a&gt;, '; and few lines under here
$html.='&gt; &lt;a class="hikashop_filter_list_selected" style="font-weight:bold"&gt;'.$value.'&lt;/a&gt;, ';

It looks that the comma is somehow tied with functionality to me. If you need to check, I sent you my backend and FTP access a few days ago.

Please, let me know what I can do with it.

Thank you very much for your help,
Filip

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

7 years 3 months ago [\#309374](#309374) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Javascript error when clicking on remove filter](/forum/45-filters-search/897972-javascript-error-when-clicking-on-remove-filter#309374 "-- url of the page with the problem -- :   elodyprsteny.cz/snubni  -- HikaShop version -- : 4.2.0  Hello,  I experienced javascript errors when clicking &quot;remove filter&quot; for the patricular filter. Actually, this problem is only for 1 filter which is a checkboxes of custom fields. Please, check the link of my website and screenshots. This error caused that I can't remove filter.  Other buttons (remove filter) on this product page works as expected.  Thank you, Filip")*

Hello Filip,

Thank you for your temporary FTP access, we just fixed it on your website.

We wish you a nice day,
Kind regards,
Mohamed Thelji

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

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

Less More

- Posts: 217
- Thank you received: 4
-
-

7 years 3 months ago [\#309385](#309385) by [FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")  Replied by *[FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")* on topic *[Javascript error when clicking on remove filter](/forum/45-filters-search/897972-javascript-error-when-clicking-on-remove-filter#309385 "-- url of the page with the problem -- :   elodyprsteny.cz/snubni  -- HikaShop version -- : 4.2.0  Hello,  I experienced javascript errors when clicking &quot;remove filter&quot; for the patricular filter. Actually, this problem is only for 1 filter which is a checkboxes of custom fields. Please, check the link of my website and screenshots. This error caused that I can't remove filter.  Other buttons (remove filter) on this product page works as expected.  Thank you, Filip")*

Hello,

I am really really sorry. Before you wrote, I updated Hikashop and maybe it rewrote your fix. Please, could you send me fixed file again, please?

Again, sorry for complications,

Thank you,
F.

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

7 years 3 months ago [\#309403](#309403) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Javascript error when clicking on remove filter](/forum/45-filters-search/897972-javascript-error-when-clicking-on-remove-filter#309403 "-- url of the page with the problem -- :   elodyprsteny.cz/snubni  -- HikaShop version -- : 4.2.0  Hello,  I experienced javascript errors when clicking &quot;remove filter&quot; for the patricular filter. Actually, this problem is only for 1 filter which is a checkboxes of custom fields. Please, check the link of my website and screenshots. This error caused that I can't remove filter.  Other buttons (remove filter) on this product page works as expected.  Thank you, Filip")*

Hello,

No problem, we just re-applied it on your website, so it should work fine again.

We wish you a nice day,
Kind regards,
Mohamed Thelji.

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

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

Less More

- Posts: 217
- Thank you received: 4
-
-

7 years 3 months ago [\#309459](#309459) by [FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")  Replied by *[FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")* on topic *[Javascript error when clicking on remove filter](/forum/45-filters-search/897972-javascript-error-when-clicking-on-remove-filter#309459 "-- url of the page with the problem -- :   elodyprsteny.cz/snubni  -- HikaShop version -- : 4.2.0  Hello,  I experienced javascript errors when clicking &quot;remove filter&quot; for the patricular filter. Actually, this problem is only for 1 filter which is a checkboxes of custom fields. Please, check the link of my website and screenshots. This error caused that I can't remove filter.  Other buttons (remove filter) on this product page works as expected.  Thank you, Filip")*

Thank you so much. It looks fine now! ![:-)](/media/kunena/emoticons/3.png ":-)")

Filip

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

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