Update 3.3.x i18n_base issue - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Installation & Setup (http://get-simple.info/forums/forumdisplay.php?fid=5) +--- Thread: Update 3.3.x i18n_base issue (/showthread.php?tid=5637) Pages:
1
2
|
Update 3.3.x i18n_base issue - Rene - 2014-02-12 SOLVED: see http://get-simple.info/forums/showthread.php?tid=5637&pid=43022#pid43022 Maybe it's my ignorance or is there really something wrong with bootstrap3 theme (menu build function) or latest GS updates? After changing page slug (I've tried it several times) a 404 is to be the result! Yes, I cleared history etc! I simply changed /test/subtest into /test/subtest1 and page name from 'subtest' into 'Subtest1'. See attached pictures, pic1 (admin), pict2 (front) http://test.dare-is.nl/ ** EDIT ** Have changed menu to get_i18n_navigation(get_page_slug(FALSE),0,1,I18N_SHOW_MENU,'nav'); Not picking up the page name changes is due bad menu build function of theme bootstrap3, but slug subtest1 is still not found? To be continued. RE: Update 3.3.x - Rene - 2014-02-13 I've tried it several times but renaming a page slug results in Page Not Found! Example: - Create new page 'Feedback' & save page ( slug = feedback ) - Calling page (click menu item) is working ok (tested) - Edit Page and rename slug to 'beoordeling' & save page - Calling page (click menu item) results in 404 ( see http://test.dare-is.nl/beoordeling/ ) File: beoordeling.xml Code: <?xml version="1.0" encoding="UTF-8"?> RE: Update 3.3.x - shawn_a - 2014-02-13 Are you on 3.3.1 ? RE: Update 3.3.x - Rene - 2014-02-13 Hi Shawn, Yes, I'm on 3.3.1 ( see attachment ) RE: Update 3.3.x - shawn_a - 2014-02-13 And this happens with i18n get_nav ? Not native ? RE: Update 3.3.x - shawn_a - 2014-02-13 Yeah I see the same thing, sigh, wish I fixed this yesterday. RE: Update 3.3.x - Rene - 2014-02-13 Yes. I've changed in template theme Bootstrap3 function ... - get_navigation_bootstrap(return_page_slug()); .. to ... - get_i18n_navigation(get_page_slug(FALSE),0,1,I18N_SHOW_MENU,'nav'); But on first time when creating page everything is ok. After adjusting slug a 404 occurs. I even try with a default theme and same there. RE: Update 3.3.x - Rene - 2014-02-13 (2014-02-13, 01:32:55)shawn_a Wrote: Yeah I see the same thing, sigh, wish I fixed this yesterday. RE: Update 3.3.x - shawn_a - 2014-02-13 Yeah seems like changedata is not updating pagecache properly somehow, or a later commit broke it cause i know it was tested and working. RE: Update 3.3.x - Rene - 2014-02-13 (2014-02-13, 01:43:56)shawn_a Wrote: Yeah seems like changedata is not updating pagecache properly somehow, or a later commit broke it cause i know it was tested and working. I feel an update coming It can not be said often enough, you guys do a good job with this CMS RE: Update 3.3.x - Rene - 2014-02-13 Uhh, I did not read your answer properly. No update needed I've just tested it on a other domain (not on my server) and changing slug works. Thanks for figuring out my problem. ** EDIT ** But is on GS 3.2.3, so I do update to 3.3.1 and try it again RE: Update 3.3.x - shawn_a - 2014-02-13 Yeah i am pretty sure there is an issue here, I cannot even figure out what is going on yet. RE: Update 3.3.x - shawn_a - 2014-02-13 ok i18n base breaks the changedata-aftersave hook and prevents any code after it runs from executing because it does its own redirects on changedata-save. This is probably part of its kludgy pages.php override, we need to provide proper avenues, to fix that, either with backend page override hooks, or a simple redirect hook. mvlcek suggestions welcome here. You can patch this by adding this to i18n_base.php line 149 | 150 PHP Code: I18nSitemap::executeOtherFunctions('changedata-aftersave', 'i18n_base_patch_page_save'); I suppose you could also just change the changedata-save to changedata-aftersave also. This hook has been available since 3.1 i am surprised noone else had this issue, i guess no one is using it. i18n_base can be updated to use new sitemap filters and probably remove all of this sitemap replacement hackery all togather. RE: Update 3.3.x i18n_base issue - shawn_a - 2014-02-13 Not sure if I will do anything in core to fix this, probably not. Gonna call it a plugin issue. RE: Update 3.3.x i18n_base issue - Rene - 2014-02-13 Wow, great work Shawn. I will use the patch awaiting mvlcek's reaction/solution. RE: Update 3.3.x i18n_base issue - Rene - 2014-02-13 I made the following change, works like a charm. Thx Shawn. Had the impression that I first had to 'touch' (save again) the page (which gaves 404) first, but that could be me. PHP Code: function i18n_base_patch_page_save() { Have an other issue about default language but I'll start a new thread for that. RE: Update 3.3.x i18n_base issue - Draxeiro - 2014-02-16 (2014-02-13, 18:20:53)Rene Wrote: I made the following change, works like a charm. Thx Shawn. I had noticed this behaviour too. This patch fixes it indeed. Instead of replacing 'changedata-save' to 'changedata=aftersave' as you did I added Shawn's patch to the existing code as he initially suggested. Didn't need to first save the page again in any case. RE: Update 3.3.x i18n_base issue - mvlcek - 2014-03-03 Thanks for the bug report. It should always have been changedata-aftersave (but it seems nobody else used this trigger). It is solved in I18N 3.2.6. I decided to leave the patches in instead of using hook sitemap-aftersave, as doing so would have resulted in an additional reading of all page files to create the sitemap first and then recreate it with correct URLs. Although the current hooks are much better then in old versions, I'm not quite happy yet. RE: Update 3.3.x i18n_base issue - Carlos - 2014-03-03 (2014-03-03, 04:09:28)mvlcek Wrote: I decided to leave the patches in instead of using hook sitemap-aftersave, as doing so would have resulted in an additional reading of all page files to create the sitemap first and then recreate it with correct URLs. How about using the new sitemap filter? RE: Update 3.3.x i18n_base issue - shawn_a - 2014-03-03 Yeah I don't understand that. What info is not in page cache or the XML object that you need to reload page files? RE: Update 3.3.x i18n_base issue - mvlcek - 2014-03-03 (2014-03-03, 06:22:56)shawn_a Wrote: Yeah I don't understand that. What info is not in page cache or the XML object that you need to reload page files? For the %parents% placeholder I need all parents. The other information (language) can be taken from the URL. But for the filter to be useful for anything else, I suppose this information would need to come from the page files. RE: Update 3.3.x i18n_base issue - shawn_a - 2014-03-03 Still don't get it. to modify the site map you just need to modify the urls and add new entries for languages. What else does a plugin need to do to sitemap? Just making sure I understand. RE: Update 3.3.x i18n_base issue - mvlcek - 2014-03-03 (2014-03-03, 07:09:26)shawn_a Wrote: Still don't get it. to modify the site map you just need to modify the urls and add new entries for languages. Just some ideas: e.g. other more detailed priority, other change frequency, additional URLs from custom fields or links in the content - I suppose search engines will scan links to PDF and probably other office documents, but you might add a special URL with e.g. an indexable PDF-version of a CAD file? The I18N plugin uses multiple files and encodes the language in the URL. You could also add additional title and content fields in the page XML (e.g. <content lang="de">) and then would need to read the page file to know that this page file is in reality two language pages. If you have a frontend user type plugin, you might have a field access=public/base member/gold member and want to include only the public pages in the site map. Or you could include the base member pages in the sitemap and serve them (or a garbled version e.g. all sentences in random order) to specific search engines (so it is indexed) and then display a "Please become a member" page to visitors. RE: Update 3.3.x i18n_base issue - shawn_a - 2014-03-03 Should all be doable with the filter nothing special. https://github.com/GetSimpleCMS/GetSimpleCMS/issues/363 I even posted a plugin that removes items not in menu from the sitemap with barely any effort. RE: Update 3.3.x i18n_base issue - mvlcek - 2014-03-04 (2014-03-03, 09:04:39)shawn_a Wrote: Should all be doable with the filter nothing special. Yes, of course. But within the filter you have to read the page XML again. |