jDiction Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

jDiction 2.2.0 released. http://jdiction.org/downloads

Author Topic: jdlanguage issue when removing url language code for default language  (Read 39805 times)

frank

  • Newbie
  • *
  • Posts: 7
    • View Profile

Okay, I'm running into an issue with jdiction's jdlanguage switcher

if In the joomla language filter plugin, I set the option not to show the language code of the default language ( which produces a better looking url and improves seo IMO ) then the jdlanguage switcher helper will still try and remove the language code of the url with "JString::substr" but end up removing part of the url.

For example if I have an article under a category, let's say the url is www.test.com/12-category/article-title;

it will turn that url to www.test.com/sc/category/article-title for simplified chinese.. if you pay attention you will see that the id of the category has been truncated "12-",

if I keep all the tags enabled there is no issue, it will simply remove the "en/" part of the url instead of the last 3 characters of the base url.

There is another issue with the meta tags generation, the title attribute should not be the menu item but the article's title in the specified language.   

I'm a php newbie and would appreciate if you could help me.

Thank you

Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: jdlanguage issue when removing url language code for default language
« Reply #1 on: September 02, 2018, 12:38:28 pm »

I know this problem and try to fix it next week.

About the title of the meta tags I'm not sure if this is correct but maybe makes sense, problem I see is that I maybe don't have this information at the time of rendering...
Logged
Joomla! 5.0 Release Manager
Vote at JED

frank

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: jdlanguage issue when removing url language code for default language
« Reply #2 on: September 02, 2018, 05:35:38 pm »

Thank you.

I think it would be better for SEO to query the document instead of the menuitem.     

Logged

frank

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: jdlanguage issue when removing url language code for default language
« Reply #3 on: September 02, 2018, 11:04:52 pm »

Oh and I thought I should point out that the jdlanguage module uses the relative urls instead of the absolute urls in the headers, SEMRUSH has issues with that and advises against using relative URLS.   

This was easier for me to fix. in the mod_jdlanguage.php file
Logged

frank

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: jdlanguage issue when removing url language code for default language
« Reply #4 on: September 15, 2018, 08:26:20 pm »

any news on the bug fixes?
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: jdlanguage issue when removing url language code for default language
« Reply #5 on: September 22, 2018, 01:58:55 pm »

Would you please test the attached version?
Logged
Joomla! 5.0 Release Manager
Vote at JED

frank

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: jdlanguage issue when removing url language code for default language
« Reply #6 on: November 07, 2018, 08:05:10 am »

Sorry I was assigned to another project.


I had a look, it seems that the issue with the language code is fixed, I decided to run the older version with my modifications since I mentioned that SEMRUSH suggests using absolute URLs instead of relative urls which 2.2.3 still uses. 

I know you have talked about not having the proper information at time of rendering. I'll have to spend some time with joomla to try and fix that issue.
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: jdlanguage issue when removing url language code for default language
« Reply #7 on: November 07, 2018, 01:50:44 pm »

plz ping me at the end of the year again.

thx
Logged
Joomla! 5.0 Release Manager
Vote at JED