Page LHandles
This is an open discussion with 119 replies, filed under Extensions.
Search
@kanduvisla
I strongly recommend upgrading to latest Language Redirect and PLH because there is a lot of code separation now. If you can't / don't want to upgrade, I'll look again on your error.
@vladG
Sorry, haven't looked at your pull request. Tomorrow is the day.
@klaftertief
No prob. Take your time.
Just wondering, how is this extension supposed to work? I added localized titles, but they don't show up in the XML.
@vladG
I pulled your changes for the Language Redirect extension. Thanks! But I renamed the LanguageR
class to LanguageRedirect
, so you have to update your extension accordingly.
@Pat
The extension comes with a datasource called PLH Page
that provides XML for the current page and its parents in all languages. Check out the list of datasources in backend. You have to attach this datasource to your page and then explore the XML in ?debug
view.
@klaftertief
Ok, thanks. I just updated this extension as well.
Page LHandles
updated to version 1.2
on 28th of June 2011
The link in your description page to the repository is wrong. It redirects to git://github.com/vlad-ghita/page_lhandles.git
, but it should go to https://github.com/vlad-ghita/page_lhandles.
Hi, I tried updating your language redirect and page lhandles, but I get the following error:
Fatal error: main() [function.require]: Failed opening required '[...]/public_html/extensions/language_redirect/lib/class.languager.php' (include_path='.:/usr/lib/php') in [...]/public_html/extensions/page_lhandles/lib/class.pagelhandles.php on line 6
When I try your language redirect 1.0.2, I get the following error:
Fatal error: Class 'LanguageRedirect' not found in [...]/public_html/extensions/page_lhandles/lib/class.pagelhandles.php on line 21
Hm... It seems like sometimes the script calls the class LanguageR
and sometimes it calls LanguageRedirect
. Bug?
Also, when I'm trying to update both extensions, I get the following MySQL-error:
MySQL Error (1060): Duplicate column name 'page_lhandles_t_en' in query "ALTER TABLE `bic_pages` ADD `page_lhandles_t_en` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, ADD `page_lhandles_h_en` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, ADD `page_lhandles_t_nl` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, ADD `page_lhandles_h_nl` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL"
One last bug: the redirect in event.languageredirect.php
causes an infinite loop. Change line 76 from
header('Location: '.$this->_env['param']['root'].'/'.$language_code.$current_path);
to:
header('Location: '.$this->_env['param']['root'].'/'.$language_code.'/'.$current_path);
It seems to work now... Should I fork both your extensions and send you a pull request for all this, or are you editing them in your own repo and pushing them?
One last bug: the redirect in event.languageredirect.php causes an infinite loop.
This is fixed in the official repo. When I merged Vlad's code I renamed the LanguageR
class toLanguageRedirect
. It seems he just forgot to change the path to require the class.
@kanduvisla
but it should go to https://github.com/vlad-ghita/page_lhandles.
Fixed.
Also, when I'm trying to update both extensions, I get the following MySQL-error:
This is in my extension ... I believe that PLH was uninstalled incorrectly, but it's not an excuse. I will add additional checks to see if the desired columns already exist before adding them to sym_pages
table. A fix is on the way. In the meantime, if you afford to uninstall and reinstall the extension, please do so.
All other issues seem to be related to a version mismatch. At this moment both repositories, Language Redirect 1.0.2
and Page LHandles 1.2
are up to date. If you still encounter problems when updating, please let me know.
EDIT
MySQL error fixed in this commit. Fail check is already in place, a variable was misspelled after refactor.
Page LHandles
updated to version 1.2.1
on 28th of June 2011
- added French translation. Thanks @nitriques
Page LHandles
updated to version 1.2.2
on 30th of June 2011
- Language code is now properly retrieved whereas before only the language without the region was used.
@vladG: If no region is set will it still returns only the 2 letter code?
Language identification is handled by Language Redirect. In my extension I was mistakenly using LanguageRedirect::instance()->getLanguage()
instead of LanguageRedirect::instance()->getLanguageCode()
. The first one returns only the country code, the former returns the region code as well, if set.
The following is no longer needed.
Regarding this matter, I'll contact @klaftertief in order to change some names in LanguageRedirect ... They're a little ambiguous at the moment (My bad :) ).
@vladG: thanks for your precision. I now use often your LanguageRedirect class in other extension to make them compatible with multilanguage...
So I will have to change my code too since I used getLanguageCode(), not getLanguage()
Naming method is often a pain in the butt.... We want it to be short and concise while being clear and to the point. Maybe adding some comments in the code could help make this less ambiguous.
Create an account or sign in to comment.
Page LHandles
updated to version 1.2beta on22nd of June 2011
Please report new issues on GitHub issue tracker.