Keyword

K2 pagination problem on multilingual site

  • Sergey R
  • Sergey R's Avatar Topic Author
  • Offline
  • New Member
More
11 years 7 months ago - 11 years 7 months ago #117924 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.

Please Log in or Create an account to join the conversation.

  • Sergey R
  • Sergey R's Avatar Topic Author
  • Offline
  • New Member
More
11 years 7 months 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
  • Sergey R's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 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
  • Yiota's Avatar
  • Visitor
11 years 5 months ago #117927 by Yiota
Do you use sh404SEF component?

Please Log in or Create an account to join the conversation.

  • Sergey R
  • Sergey R's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago - 11 years 5 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.

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 5 months ago #117929 by Yiota
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
  • Sergey R's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 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

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 5 months ago #117931 by Yiota
Is it possible to provide a link to your site?

Thank you.

Please Log in or Create an account to join the conversation.

  • Sergey R
  • Sergey R's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago - 11 years 5 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.

More
11 years 5 months ago #117933 by Lefteris
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.

Please Log in or Create an account to join the conversation.

  • Sergey R
  • Sergey R's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago - 11 years 5 months ago #117934 by Sergey R
Replied by Sergey R on topic Re: K2 pagination problem on multilingual site
@Lefteris Kavadas

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.

More
11 years 5 months ago #117935 by Lefteris
Replied by Lefteris on topic Re: K2 pagination problem on multilingual site
In order to check if the Multilingual setup is correct you need to publish the administrator module named "Multilanguage status". Once you do that you will get a link named "Multilanguage Status" in your administration area. Click it to see diagnostics for your setup. If something is not correct there you need to fix it.

Please Log in or Create an account to join the conversation.

  • Sergey R
  • Sergey R's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago - 11 years 5 months ago #117936 by Sergey R
Replied by Sergey R on topic Re: K2 pagination problem on multilingual site
Pls find file attached. Hope this will close multilingual setup topic.

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
  • Sergey R's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago #117937 by Sergey R
Replied by Sergey R on topic Re: K2 pagination problem on multilingual site
Hello everyone,

Is there any idea how to solve it?

Sergey

Please Log in or Create an account to join the conversation.

  • Sergey R
  • Sergey R's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago #117938 by Sergey R
Replied by Sergey R on topic Re: K2 pagination problem on multilingual site
It can't be that standard functionality doesnt work and no one knows why...

Please Log in or Create an account to join the conversation.

  • Sergey R
  • Sergey R's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #117939 by Sergey R
Replied by Sergey R on topic Re: K2 pagination problem on multilingual site
to close this discussion with myself - .htaccess redirect works just fine!

Please Log in or Create an account to join the conversation.

  • Zdeněk Štěpánek
  • Zdeněk Štěpánek's Avatar
  • Offline
  • New Member
More
10 years 10 months ago #117940 by Zdeněk Štěpánek
Replied by Zdeněk Štěpánek on topic Re: K2 pagination problem on multilingual site
I have the same problem, how did you solved it with .htaccess?

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum