[#3293] Language-spefic URLs do not work

12 years 2 months ago - 12 years 2 months ago #191642 by Richard67
[#3293] Language-spefic URLs do not work was created by Richard67
Hi,

I have a multilibgual site with Joomla 2.5.1 and CB 1.8 RC2.

As I have noticed, URLs to other extensions like the link to PMS in the profile menu and the CB login module have been changed from unreadable links to components with parameters to readable URLs based on data from the menu database table => good idea, and with CB own stuff it works, e.g. the links to users in the CB online module.

But the link to PMS in cb_login module and the CB user profile menu do not work.

I use uddeIM, but I am sure others are affected, too, and maybe this problem exists almost everywhere where creating URLs has been changed.

For example in line 313 of mod_cblogin.php:
$query_pms_link = "SELECT id FROM #__menu WHERE published>=0 AND link LIKE '%com_uddeim%'";
This gives multiple results, because I have for each language one main menu with one uddeIM page.

CB uses only the first result, and so for 2nd and 3rd language URLs are wrong, e.g. de/gästebuch.html => OK, en/gästebuch.html => error.

I helped myself by making one global uddeIM menu item on a hidden menu (like requred for the CB profile page) and make the others being menu item aliases to them.

But menu item aliases do not have associations, and so when I am on the uddeIM inbox for example and change language, I get to the home page of the selected language => not nice.

It should be possible to fix this, because with its own stuff CB does it correctly: beside the one and mandatory CB profile page with public access to make registration work correctly, I have one with restricted access for every language, and e.g. the link to a user's profile in the CB online module sends me allways to the correct, language-specific URL, depending on the current language.

Please check if this can be corrected.

I will meanwhile try myself to correct for the PMS links I mentioned above, but I have no idea wherelse creation of URLs has been changed with CB 1.8 RC, and so I cannot know where else such thing should be corrected.

Thanks for reading.

Best regards,

Richard

Please Log in to join the conversation.

12 years 2 months ago - 12 years 2 months ago #191644 by Richard67
Replied by Richard67 on topic Re: Language-spefic URLs do not work
Hello again,

for the PMS link in the cb_online module I meanwhile have the solution:

At the beginning of the "if ($pms != 0)" I have adde following line number 285:
$lang = &JFactory::getLanguage();
The database query for udeeIM menu items in former line 313, now 314, I have extended by a language restriction:
AND language IN (" . $_CB_database->Quote($lang->get('tag')) . ",'*')"

This works for me, so I have to extend the link in the CB user profile's menu in the same way.

But this works only reliable if there is either one menu item with language ='*' or one for each language, but not both.

Some correction should be found in general when selecting information from the menu table to create URLs.

Can this be fixed in the final CB 1.8?

Best regards,

Richard

Please Log in to join the conversation.

12 years 2 months ago - 12 years 2 months ago #191650 by Richard67
Replied by Richard67 on topic Re: Language-spefic URLs do not work
Again it's me,

I have checked my solution proposed above within pms.mypmspro.php and mod_cblogin.php: It works, even if there is both one global PMS menu item with language tag '*' and another one with the tag equal to the current site language.

And I have fixed another error in the same SQL queries in the same files:

The "where published>=0" should be a "where published>0"!!!

See changed files in the attached zip container:

File Attachment:

File Name: cb_1.8_rc2...2-18.zip
File Size:19 KB


Which one of the two menu items (one with language '*' = all and one with current site language, e.g. 'de-DE') will be used, this decision is not really reliable, because it depends on in which order the database query returns them, but both URLs are at least valid and will be found, and it seems they are returned in the same order as in the "IN" list of the condition, so the current site language menu item would be found first, if there, this seems to be ok.

And if there is either a global menu item for all languages or one for each language but not both together, then it perfectly works.

So I suggest to extend all database queries for menu item paths used when building URLs by this additional condition I mentioned within my previous post.

Please give me some feedback what you think about it.

Best regards,

Richard
Attachments:

Please Log in to join the conversation.

12 years 2 months ago #191770 by krileon
Replied by krileon on topic Re: Language-spefic URLs do not work
Was able to confirm your issue and have created the below bug ticket for further investigation.

forge.joomlapolis.com/issues/3293


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 2 months ago #191791 by Richard67
Replied by Richard67 on topic Re: Language-spefic URLs do not work
Hi,

thanks for your work.

But as I wrote above, the mod_cblogin.php has the same problem.

Is there a bug ticket for this, too?

I haven't found yet.

Best regards,

Richard

Please Log in to join the conversation.

12 years 2 months ago #191796 by krileon
Replied by krileon on topic Re: Language-spefic URLs do not work

Is there a bug ticket for this, too?

No, it's same bug; will be adding a patch when time permits to also fix the module.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.542 seconds

Facebook Twitter LinkedIn