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

#   Pagination issue

##

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

Less More

- Posts: 5
- Thank you received: 0
-
-

8 years 4 months ago [\#295304](#295304) by [aaiidd](/forum/user/31527-aaiidd "View aaiidd's Profile")  *[Pagination issue](/forum/26-product-category-display/895249-pagination-issue#295304 "-- HikaShop version -- : 3.5.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Google Chrome 67.0.3396.99  In the Categories listing, if I have more than 20 products, the pagination is visible at the bottom of the page, and I noticed that the link for the 2nd page (and all the others, actually) are not working properly...  What I see in the URL after clicking in the second page link is the following:  I managed to track the issue to the pagination file: &quot;administrator/components/com&#95;hikashop/helpers/pagination.php&quot; Inside the definition &quot;HK&#95;item&#95;active&quot;, I see this:  It seems to me that only this would be enough: array($this-&gt;&#95;link($b)),  With what I think could be enough, I get the following URL when clicking on the link for the second page:  I would like to confirm if this is a bug or not. If it is not a bug, why is the url containing javascript code?  Best regards, Victor")* was created by *[aaiidd](/forum/user/31527-aaiidd "View aaiidd's Profile")*

-- HikaShop version -- : 3.5.0
-- Joomla version -- : 3.8.8
-- PHP version -- : 5.4
-- Browser(s) name and version -- : Google Chrome 67.0.3396.99

In the Categories listing, if I have more than 20 products, the pagination is visible at the bottom of the page, and I noticed that the link for the 2nd page (and all the others, actually) are not working properly...

What I see in the URL after clicking in the second page link is the following: Code:

&lt;URLOfThePage&gt;?limitstart=20"%20onclick="javascript:%20var%20f%20=%20document.forms[

I managed to track the issue to the pagination file: "administrator/components/com_hikashop/helpers/pagination.php"
Inside the definition "HK_item_active", I see this: Code:

array($this-&gt;_link($b)."\" onclick=\"var f = document.forms['adminForm".$this-&gt;hikaSuffix.$this-&gt;form."']; f.limitstart".$this-&gt;hikaSuffix.".value=".$b."; f.submit();return false;"),

It seems to me that only this would be enough:
array($this-&gt;_link($b)),

With what I think could be enough, I get the following URL when clicking on the link for the second page: Code:

&lt;URLOfThePage&gt;?limitstart=20

I would like to confirm if this is a bug or not.
If it is not a bug, why is the url containing javascript code?

Best regards,
Victor

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

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

Less More

- Posts: 5
- Thank you received: 0
-
-

8 years 4 months ago [\#295306](#295306) by [aaiidd](/forum/user/31527-aaiidd "View aaiidd's Profile")  Replied by *[aaiidd](/forum/user/31527-aaiidd "View aaiidd's Profile")* on topic *[Pagination issue](/forum/26-product-category-display/895249-pagination-issue#295306 "-- HikaShop version -- : 3.5.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Google Chrome 67.0.3396.99  In the Categories listing, if I have more than 20 products, the pagination is visible at the bottom of the page, and I noticed that the link for the 2nd page (and all the others, actually) are not working properly...  What I see in the URL after clicking in the second page link is the following:  I managed to track the issue to the pagination file: &quot;administrator/components/com&#95;hikashop/helpers/pagination.php&quot; Inside the definition &quot;HK&#95;item&#95;active&quot;, I see this:  It seems to me that only this would be enough: array($this-&gt;&#95;link($b)),  With what I think could be enough, I get the following URL when clicking on the link for the second page:  I would like to confirm if this is a bug or not. If it is not a bug, why is the url containing javascript code?  Best regards, Victor")*

I found out that the template I was using had the character ' and " permuted when returning the value from the definition "pagination_item_active"

This doesn't work with Hikashop Code:

return "&lt;li&gt;&lt;a class='" . $cls . "' href='" . $item-&gt;link . "' title='" . $item-&gt;text . "'&gt;" . $item-&gt;text . "&lt;/a&gt;&lt;/li&gt;";

This DOES work with Hikashop Code:

return '&lt;li&gt;&lt;a class="' . $cls . '" href="' . $item-&gt;link . '" title="' . $item-&gt;text . '"&gt;' . $item-&gt;text . '&lt;/a&gt;&lt;/li&gt;';

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

8 years 4 months ago [\#295322](#295322) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Pagination issue](/forum/26-product-category-display/895249-pagination-issue#295322 "-- HikaShop version -- : 3.5.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Google Chrome 67.0.3396.99  In the Categories listing, if I have more than 20 products, the pagination is visible at the bottom of the page, and I noticed that the link for the 2nd page (and all the others, actually) are not working properly...  What I see in the URL after clicking in the second page link is the following:  I managed to track the issue to the pagination file: &quot;administrator/components/com&#95;hikashop/helpers/pagination.php&quot; Inside the definition &quot;HK&#95;item&#95;active&quot;, I see this:  It seems to me that only this would be enough: array($this-&gt;&#95;link($b)),  With what I think could be enough, I get the following URL when clicking on the link for the second page:  I would like to confirm if this is a bug or not. If it is not a bug, why is the url containing javascript code?  Best regards, Victor")*

Hi,

It is not a bug in HikaShop. It is a bug in the way the pagination is handled in the template.
Rename the file templates/YOUR_TEMPLATE/html/pagination.php in order to use the default pagination of Joomla, or switch to the default template of Joomla which has a pagination.php override and you'll see that in both case, it works fine.

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

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

Less More

- Posts: 5
- Thank you received: 0
-
-

8 years 4 months ago [\#295334](#295334) by [aaiidd](/forum/user/31527-aaiidd "View aaiidd's Profile")  Replied by *[aaiidd](/forum/user/31527-aaiidd "View aaiidd's Profile")* on topic *[Pagination issue](/forum/26-product-category-display/895249-pagination-issue#295334 "-- HikaShop version -- : 3.5.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 5.4 -- Browser(s) name and version -- : Google Chrome 67.0.3396.99  In the Categories listing, if I have more than 20 products, the pagination is visible at the bottom of the page, and I noticed that the link for the 2nd page (and all the others, actually) are not working properly...  What I see in the URL after clicking in the second page link is the following:  I managed to track the issue to the pagination file: &quot;administrator/components/com&#95;hikashop/helpers/pagination.php&quot; Inside the definition &quot;HK&#95;item&#95;active&quot;, I see this:  It seems to me that only this would be enough: array($this-&gt;&#95;link($b)),  With what I think could be enough, I get the following URL when clicking on the link for the second page:  I would like to confirm if this is a bug or not. If it is not a bug, why is the url containing javascript code?  Best regards, Victor")*

Yeah, I know that now ![:)](/media/kunena/emoticons/3.png ":)")
After posting the first comment, I found out that the problem was in the template I'm using.
I changed the template and it's working fine now.

Thank you for the quick response, though. ![:)](/media/kunena/emoticons/3.png ":)")

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

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