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: BUG? Incorrect jdlanguage module links  (Read 5482 times)

mysaq

  • Newbie
  • *
  • Posts: 2
    • View Profile
BUG? Incorrect jdlanguage module links
« on: May 25, 2014, 11:31:53 pm »

Hi, I'm expiriencing a problem with bad links in lang switching module. When one clicks on some article in category blog and (in that article) tries to switch the language via the jdlanguage module, only an error page appears because of bad link...

Czech (original) link: ...something.cz/cz/foto/10-testovaci-galerie.html
English (expected) link: ...something.cz/en/photo/10-test-gallery.html
jDiction (eng) generated link: ...something.cz/en/photoestovaci-galerie.html

I changed the line 189 in the jdlanguage module helper and now the problem is gone. But the last part of link is not translated. (The article is translated and has "Test gallery" Eng title and "test-gallery" alias.)
Original: $path = substr($path, strlen($base));
Edit: $path = substr($path, strlen($base)-5);

Generated link after edit: ...something.cz/en/photo/10-testovaci-galerie.html

Joomla 3.3.0 // jDiction 1.2.0
« Last Edit: May 31, 2014, 11:42:07 am by mysaq »
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1684
    • View Profile
Re: BUG? Incorrect jdlanguage module links
« Reply #1 on: May 26, 2014, 08:36:21 am »

Hmm strange. I'm on vacation and will check this next week.
Logged
Joomla! 5.0 Release Manager
Vote at JED

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1684
    • View Profile
Re: BUG? Incorrect jdlanguage module links
« Reply #2 on: June 02, 2014, 01:33:11 pm »

would you please test to deactivate the ".html" extension?
Logged
Joomla! 5.0 Release Manager
Vote at JED

mysaq

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: BUG? Incorrect jdlanguage module links
« Reply #3 on: June 04, 2014, 12:29:12 am »

Yes. That's it! No error is appearing now.

And I've noticed something... The last part of link is translated correctly if the requested language is chosen before one opens an article in a category blog. But in case of switching languages while viewing an article from category blog, the last part of link remains untranslated. [Or (vice versa) remains translated in case of switching the lang back to the native one.]
Logged