No Code Attached Yet J3 Issue bug
avatar mikajaxxx
mikajaxxx
23 Mar 2019

Steps to reproduce the issue

Enable multilingual
Enable Remove URL Language Code option in System - Language Filter plugin
module in frontend to load articles in ajax

Expected result

in other languages the url of items requested by ajax must have correct link.
https://www.example.com/fa/photo/item1

Actual result

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.

System information (as much as possible)

Joomla! 3.9.4
yootheme zoo 3.3.33
roksprocket (mosaic layout to load more items in ajax)
multilingual website

Additional comments

it seems the Remove URL Language Code option, also have effect on url of requested ajax url in other languages(not default language) !

avatar mikajaxxx mikajaxxx - open - 23 Mar 2019
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Mar 2019
avatar mikajaxxx mikajaxxx - change - 23 Mar 2019
The description was changed
avatar mikajaxxx mikajaxxx - edited - 23 Mar 2019
avatar infograf768
infograf768 - comment - 24 Mar 2019

module in frontend to load articles in ajax

roksprocket (mosaic layout to load more items in ajax)

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.

avatar mikajaxxx
mikajaxxx - comment - 24 Mar 2019

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!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24315.
avatar infograf768
infograf768 - comment - 24 Mar 2019

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).

avatar mikajaxxx
mikajaxxx - comment - 24 Mar 2019

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24315.
avatar ReLater
ReLater - comment - 24 Mar 2019

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.

avatar mikajaxxx
mikajaxxx - comment - 24 Mar 2019

"I think one have to see some working code to reproduce the issue."

https://www.webkaj.com/fa/

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


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24315.
avatar infograf768
infograf768 - comment - 24 Mar 2019

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.

avatar mikajaxxx
mikajaxxx - comment - 24 Mar 2019

Thank you for your time infograf768
could you provide a link to the joomla you have been tested?
the joomla is on the root?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24315.
avatar infograf768
infograf768 - comment - 24 Mar 2019

joomla tested on localhost as root indeed

avatar mikajaxxx
mikajaxxx - comment - 24 Mar 2019

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


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24315.
avatar ggppdk
ggppdk - comment - 24 Mar 2019

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

avatar franz-wohlkoenig franz-wohlkoenig - change - 27 Mar 2019
Priority Critical Medium
Status New Discussion
avatar mikajaxxx
mikajaxxx - comment - 31 Mar 2019

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24315.

avatar HLeithner
HLeithner - comment - 3 Apr 2019

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...

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J3 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar mikajaxxx
mikajaxxx - comment - 13 Apr 2019

"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:

avatar HLeithner
HLeithner - comment - 14 Apr 2019

could you please provide an example, the page you are linking too doesn't have any xhr request.

avatar mikajaxxx
mikajaxxx - comment - 16 Apr 2019

"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


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24315.

avatar mikajaxxx
mikajaxxx - comment - 16 Apr 2019

sorry it couold not uploaded. i changedajax.txt the file type to txt java.txt


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24315.

avatar mikajaxxx
mikajaxxx - comment - 16 Apr 2019

sorry it couold not uploaded. i changedajax.txt the file type to txt java.txt


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24315.

avatar mikajaxxx
mikajaxxx - comment - 19 Apr 2019

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!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24315.
avatar jwaisner jwaisner - change - 30 Apr 2020
Status Discussion Information Required
avatar brianteeman
brianteeman - comment - 23 Aug 2022

please delete the spammer

avatar zero-24
zero-24 - comment - 23 Aug 2022

Comments deleted.

avatar Hackwar Hackwar - change - 19 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar Hackwar Hackwar - labeled - 19 Feb 2023
avatar Hackwar Hackwar - change - 19 Aug 2024
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2024-08-19 21:42:02
Closed_By Hackwar
avatar Hackwar Hackwar - close - 19 Aug 2024
avatar Hackwar
Hackwar - comment - 19 Aug 2024

It took a long time, but #43858 should solve your issue. Please help with testing.

Add a Comment

Login with GitHub to post a comment