Enable multilingual
Enable Remove URL Language Code
option in System - Language Filter
plugin
module in frontend to load articles in ajax
in other languages the url of items requested by ajax must have correct link.
https://www.example.com/fa/photo/item1
the default language is fine.
in other languages, The article items loaded by ajax request have no language codes in url
https://www.example.com/photo/item1
if i Disable Remove URL Language Code
option in System - Language Filter
plugin, it works correctly
if i move the joomla from root to a folder it works.
Joomla! 3.9.4
yootheme zoo 3.3.33
roksprocket (mosaic layout to load more items in ajax)
multilingual website
it seems the Remove URL Language Code
option, also have effect on url of requested ajax url in other languages(not default language) !
It is not about roksprocket! it is about the joomla core plugin option that cause conflict with ajax requests!(i mentioned a famous ajax module for testing purpose). i created my own module and the same problem exists!
the option i described above in System - Language Filter
cause conflict on the ajax requests! no matter which module you want to use!
Sorry, I personally can't help on this as I have no idea of the issue and solution.
if i move the joomla from root to a folder it works.
That would be a hint I guess for anyone concerned and able to provide a patch (if feasible).
Remove URL Language Code
option caused ajax request could not set active language for generated urls. in fact it ignored language code for other langues too! so if we have exception for this option to ignore ajax request in other languages maybe the problem will be solved.
I think one have to see some working code to reproduce the issue. Mainly how the request URL is constructed. With or without lang parameter etc. I can just talk about me and I'm not an expert but I always would build AJAX requests in Joomla as non-sef urls (index.php?option=bla&id=blu&lang=xy).
If you have a module. Can you provide it in a reduced form? Rocksproket is too complex.
"I think one have to see some working code to reproduce the issue."
At the bottom of the page you can see a module (i attached the screen) if you hit load more button the new items has no langueage code in url
"if you have a module. Can you provide it in a reduced form? Rocksproket is too complex."
my module is complex too, but the same result produced
all the links produced by JRoute::_();
"but I always would build AJAX requests in Joomla as non-sef urls (index.php?option=bla&id=blu&lang=xy)."
if i disable Remove URL Language Code
option or move joomla to subfolder or disable SEF, system works perfectly
I have installed here roksprocket-2.1.26 on a clean multilingual site (3.9.4).
I used one module for en-GB and one for fr-FR, Mozaic Layout.
Articles to display are tagged to the same language, as is their category.
Protostar default template. Remove URL Language Code
set to Yes.
Whatever the site default language selected, I get the correct links.
Note: I always have a menu item of type "List All categories" for each language and hidden.
Thank you for your time infograf768
could you provide a link to the joomla you have been tested?
the joomla is on the root?
joomla tested on localhost as root indeed
yeah local host doens't show the problem. also on the sub folder! as i mentioned the problem just show up on root of the server!
this is really weird situaton!
check this:
https://www.luxazin.com/en/
on this website i used the exact same module and component but no problem have been showed up!
also in this example i disabled Remove URL Language Code
and the system works correctly
https://www.luxsima.com/fa
Best
hhmm i am always adding the current / desired language to my AJAX requests (that are non-sef URLs)
i used to have some issues without it, i am not sure (don't remember now it was long time ago) what they were and under which configuration they occurred
Priority | Critical | ⇒ | Medium |
Status | New | ⇒ | Discussion |
I checked all the codes,and it seems the problem comes form Remove URL Language Code
option!
i hope someone could help us to solve this problem.
Joomla uses the cookie if no language is given, so maybe it isn't sent with the xhr request?
I can't find the buttons on your site...
Labels |
Added:
J3 Issue
|
"I can't find the buttons on your site..."
this page has the same module
https://www.webkaj.com/fa/projects
"Joomla uses the cookie if no language is given, so maybe it isn't sent with the xhr request?"
It works perfectly in each of these conditions:
could you please provide an example, the page you are linking too doesn't have any xhr request.
"could you please provide an example, the page you are linking too doesn't have any xhr request."
I attached the js and ajax file
sorry it couold not uploaded. i changedajax.txt the file type to txt java.txt
sorry it couold not uploaded. i changedajax.txt the file type to txt java.txt
Today i added a simple code for item layout to detect current language for every item:
$lang = JFactory::getLanguage();
echo 'Current language is: ' . $lang->getName();
so it is nothing to do with url and just related to current language
And it seems the problem is because it could not detects current lanague for ajax loaded item;
the ajax loaded items show "english" for current language which is default language not the current language!
Status | Discussion | ⇒ | Information Required |
please delete the spammer
Comments deleted.
Labels |
Added:
No Code Attached Yet
bug
Removed: ? |
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-08-19 21:42:02 |
Closed_By | ⇒ | Hackwar |
Do we have such a module in core? Apparently not.
I suggest you contact the people providing roksproket as this is not a core issue.