- Posts: 11
COMMUNITY FORUM
K2 pagination problem on multilingual site
- Sergey R
-
Topic Author
- Offline
- New Member
1. In English (main) - http://.../articles?start=5 - that is fine and works ok.
2. in Ukrainian - url is like http://.../ua/articles/category?start=5 and it doesnt work and returns 404 error (page not found). By manual removal of "/category" word from URL it also works fine.
Pls advise in which php file URL generation could be corrected in order to remove "/category" from URL.
Please Log in or Create an account to join the conversation.
- Sergey R
-
Topic Author
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- Sergey R
-
Topic Author
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
Please Log in or Create an account to join the conversation.
- Sergey R
-
Topic Author
- Offline
- New Member
- Posts: 11
What I've learned is that k2 using standard Joomla pagination located in /libraries/joomla/html/pagination.php.
I found line which creates url:
return "<a title=\"" . $item->text . "\" href=\"" . $item->link . "\" class=\"pagenav\">" . $item->text . "</a>";
so looks like $item is responsible for incorrect url generation, but I have little knowledge in php to understand rules of its creation and why it adds "/category" value to URL when language is not default one (not English), so dont know where changes have to be done to correct it.
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
Please Log in or Create an account to join the conversation.
- Sergey R
-
Topic Author
- Offline
- New Member
- Posts: 11
So category URL for each language differs only by language flag:
site.com/articles - EN
site.com/ua/articles - UA
site.com/ru/articles - RU.
with no 'category' word used in URL.
Technically menu item link request looks like
EN - index.php?option=com_k2&view=itemlist&layout=category&task=category&id=605
UA - index.php?option=com_k2&view=itemlist&layout=category&task=category&id=607
RU - index.php?option=com_k2&view=itemlist&layout=category&task=category&id=606
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
Thank you.
Please Log in or Create an account to join the conversation.
- Sergey R
-
Topic Author
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Hi. Since you are using a multi-lingual site ensure that:
1. You have correctly set up the multilingual features of Joomla!. Short guide at www.db8.nl/en/downloads/various-downloads/151-joomla-2-5-multilanguage-website
2. You have not modified the default pagination layout of Joomla! . The language variable needs to be at the pagination link.
Please Log in or Create an account to join the conversation.
- Sergey R
-
Topic Author
- Offline
- New Member
- Posts: 11
1. Multilingual setup looks and works fine.
2. To make sure that no manual mistake was put to file, I've Just downloaded latest Joomla 2.5 from official page, found pagination.php file and put it to /libraries/joomlja/html/ of my site - no changes in articles layout observed. And by the way there is no problem with language variable - it's assigned properly, there is strange '/category' which leads to 404 mistake.
Is there any ideas how to work it out? I've started to think about .htaccess modification, despite it's wrong way anyhow....
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- Sergey R
-
Topic Author
- Offline
- New Member
- Posts: 11
PS. Due to the fact that I was not able to attach the file via attachments form, you may find it using following link:
lint to file download page
file Screenshot of multilingual setup
Please Log in or Create an account to join the conversation.
- Sergey R
-
Topic Author
- Offline
- New Member
- Posts: 11
Is there any idea how to solve it?
Sergey
Please Log in or Create an account to join the conversation.
- Sergey R
-
Topic Author
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- Sergey R
-
Topic Author
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- Zdeněk Štěpánek
-
- Offline
- New Member
- Posts: 2
Please Log in or Create an account to join the conversation.