- Posts: 11
COMMUNITY FORUM
K2 pagination problem on multilingual site
- Sergey R
- Topic Author
- Offline
- New Member
Less
More
11 years 3 weeks ago - 11 years 3 weeks ago #117924
by Sergey R
K2 pagination problem on multilingual site was created by Sergey R
Have problem with URL generation of K2 category layout for languages other then main one:
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.
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
Less
More
- Posts: 11
11 years 1 week ago #117925
by Sergey R
Replied by Sergey R on topic Re: K2 pagination problem on multilingual site
look's like dead forum...
Please Log in or Create an account to join the conversation.
- Sergey R
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
10 years 10 months ago #117926
by Sergey R
Replied by Sergey R on topic Re: K2 pagination problem on multilingual site
can anyone help? there must be the way to control url creation parameters.
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
10 years 10 months ago #117927
by Yiota
Replied by Yiota on topic Re: K2 pagination problem on multilingual site
Do you use sh404SEF component?
Please Log in or Create an account to join the conversation.
- Sergey R
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
10 years 10 months ago - 10 years 10 months ago #117928
by Sergey R
Replied by Sergey R on topic Re: K2 pagination problem on multilingual site
No, I don't.
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.
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
10 years 10 months ago #117929
by Yiota
Replied by Yiota on topic Re: K2 pagination problem on multilingual site
Is it possible you have different menu structure for the different language, the /category being generated through a menu item?
Please Log in or Create an account to join the conversation.
- Sergey R
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
10 years 10 months ago #117930
by Sergey R
Replied by Sergey R on topic Re: K2 pagination problem on multilingual site
Not sure that I understood the question correctly, but for each language there is the separate menu item of the same type (K2 » Categories) and alias, assosiated with each other (native joomla multilingual setup).
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
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
10 years 10 months ago #117931
by Yiota
Replied by Yiota on topic Re: K2 pagination problem on multilingual site
Is it possible to provide a link to your site?
Thank you.
Thank you.
Please Log in or Create an account to join the conversation.
- Sergey R
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
10 years 10 months ago - 10 years 10 months ago #117932
by Sergey R
Replied by Sergey R on topic Re: K2 pagination problem on multilingual site
Yes, it's
here.
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 10 months ago #117933
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: K2 pagination problem on multilingual site
@Sergey R
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.
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.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.