WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
Polylang 1.2 beta is ready for tests (82 posts)

  1. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    More informations are available on blog post.
    You can report bugs here.

    http://wordpress.org/plugins/polylang/

  2. miguelcortereal
    Member
    Posted 9 months ago #

    Check this out:

    Replaced last version by 1.2 beta deleting and uploading to plugins folder.

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in plugins/polylang/polylang.php on line 154

  3. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    Thank you for testing. Maybe I am using some functionality not available in your PHP version. What is it?

    Could you try to replace in polylang/polylang.php @ line 153

    if (version_compare($options['version'], POLYLANG_VERSION, '<'))
    	(new PLL_Upgrade($options))->upgrade_at_activation();

    by

    if (version_compare($options['version'], POLYLANG_VERSION, '<')) {
    	$upgrade = new PLL_Upgrade($options);
    	$upgrade->upgrade_at_activation();
    }

    EDIT: if the error is removed by the correction above, then you will get several other errors as I use this syntax several times. IF you confirm I found the right correction, I'll upload a new version tomorrow

  4. miguelcortereal
    Member
    Posted 9 months ago #

    Using PHP version 5.2.17

    Looks like the fix works, but same issue at line 233

  5. effoua
    Member
    Posted 9 months ago #

    Hi, I have an issue with the polylang plugin,

    I install it and activate it but when I press on the menu it gives me apologize page not found.

    I did all the steps and still didn't find a solution to the certain issue

  6. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    @miguelcortereal
    I installed PHP 5.2.4 which is the minimum requested by WP and reproduced the same errors (it seems that the syntax I used was introduced with PHP 5.4). Hopefully I modified all lines where I used this syntax. I just uploaded a new version at same link. Thanks again for testing. It helps a lot.

    @effoua
    Do you mean it worked with Polylang 1.1.5 and no more with 1.2beta?

  7. miguelcortereal
    Member
    Posted 9 months ago #

    unexpected T_OBJECT_OPERATOR error is gone, it runs now.

    The next issue I've noticed is that all synchronization of menus, posts, pages, taxonomies and strings table is lost.

    Not sure if this was triggered by the previous error that eventually made run only partially the upgrade routine.

  8. effoua
    Member
    Posted 9 months ago #

    @Chouby

    I downloaded Polylang Version 1.1.5 and I have this issue
    If you can help me I will appriciate it I am trying to see the issue for several days now and I dont find any solution

  9. miguelcortereal
    Member
    Posted 9 months ago #

    @ effoua

    Try this:

    Go to WP Settings menu, select permalinks and press save changes.

    If it keeps returning Page not found, check your menu(s) links at Appearance -> Menus.

  10. miguelcortereal
    Member
    Posted 9 months ago #

    And there's also this:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'Array' was given in /wp-includes/plugin.php on line 173

  11. miguelcortereal
    Member
    Posted 9 months ago #

    Sorry, forget about previous post warning, it's something else.

  12. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    @miguelcortereal
    The upgrade procedure has not run because I made a mistake in versions numbers :(

    Currently the version number stored in your database should be 1.2dev42. To run the upgrade:

    You have first to change 1.2dev40 to 1.2dev43 in:
    include/upgrade.php @ line 90

    And second change 1.2dev42 to 1.2dev43 in:
    polylang.php @ line 5 and @ line 42

    Then you run WordPress and the upgrade of your database should run.

    @effoua
    If the solution proposed by @miguelcortereal does not work, please open a new thread as I prefer to keep this one for 1.2beta bugs reports (otherwhise we will mix everything).

  13. miguelcortereal
    Member
    Posted 9 months ago #

    Now 1.2 beta is running. I did make sure that after the last files revision (the version numbers) the plugin would deactivate and activate, so that database upgrade could run.

    1) Assuming it ran, I still don't have the previous settings, this means all synchronization is lost and tables strings as well.

    Polylang Settings is showing this:

    " There are posts, pages, categories or tags without language set. Do you want to set them all to default language ? "

    Checking this option and saving the settings doesn't change anything and it keeps there.

    2) Flags don't show anywhere.

    I have the option to revert the database for yesterday's backup position I did before running beta version.

    If you think that would be useful to make run again the upgrade, I can arrange that.

  14. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    I feel dumb. I made a lot of upgrade tests and then made a modification which disabled the ugrade :( And the modifications I asked you to do are not sufficient to make upgrade working again.

    The best now is in fact that you revert to the database when 1.1.5 was activated and that you upgrade to latest 1.2beta. I uploaded again a new version (named 1.2dev43) which hopefully will run smoothly (I just tested it again).

  15. miguelcortereal
    Member
    Posted 9 months ago #

    Reverted the database for the position of 1.1.5 and the plugin as well to confirm everything looked as before.

    Strangely the flags persist to not display anywhere, I recall that the missing flags issue only came after running 1.2 beta version.

  16. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    Do you mean that the flags don't display on 1.1.5? Both on admin and frontend?

  17. miguelcortereal
    Member
    Posted 9 months ago #

    1.2 Beta running again.

    Flags issue solved and database upgrade worked.

    Synchronization is there only for pages and posts, media and taxonomies got lost.

    Menus are ok only for default language, the other languages had to be saved again to get synchronized.

    Strings table is ok for default language (English) and one of the translations language (Portuguese), my third language (Spanish) has the same values as Portuguese has.

  18. miguelcortereal
    Member
    Posted 9 months ago #

    The flags didn't display when 1.2 beta ran first time and when reverted to 1.1.5, but got working on last change with the new 1.2 beta, both at admin and at frontend.

  19. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    Thanks a lot for your tests. I will look at these issues with menus and string translations.

  20. miguelcortereal
    Member
    Posted 9 months ago #

    Not sure if you noticed, but media and taxonomies didn't get synchronized too.

  21. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    Something went wrong for you with your upgrade. Taxonomies and menus should work (or not) the same. It did work correctly in all tests I made with this version so it will be hard to find what went wrong for you...

    I did not make tests with media (I will) as it should work the same as for posts. Did you lost your translations for posts too ?

    Do you log errors ?

  22. miguelcortereal
    Member
    Posted 9 months ago #

    Posts, custom posts and pages were ok.

    I don't have errors log, but I'm planning for tomorrow to create a subdomain in this site and replicate it only for tests purposes, so that I can continue the site construcion at the current install and also revert to Polylang 1.1.5 which is the stable version for now.

    Therefore we will be able to continue testing beta version, I'm very interested in this new version of Polylang, since this new site I'm constructing relies on content translations and members from different nationalities.

    So at least test site will have errors log.

  23. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    Posts, custom posts and pages were ok

    That's so strange. The upgrade code for translations is exactly the same for posts and terms.

  24. LittleBigThing
    Member
    Posted 9 months ago #

    Hi Chouby,

    First of all, thanks for all your efforts in making Polylang even better.

    I have just downloaded the beta version of 1.2 (dev43) and it seems to work fine. I am running a (still local) site with the Responsive theme in English, French and Dutch. So far it looks OK with the beta except for two things, the first being possibly theme related:

    On the front page, in the main area there is a site title, tagline and a short text as introduction. I don't seem to be able to translate the latter text, the site title and the tagline are translatable. It may have to do with their relatively new way of bringing this theme option through an additional plugin (Responsive add-ons). No changes, however, on deactivation of the plugin: the theme option are then still available. I'll check also on their support forums.

    Another thing is that my custom language png's are not showing. I use the language code as a png file to replace the flags and they were put to the folder polylang outside the plugin folder (wp-conten/polylang) as you advised some time ago.
    A probably related thing is that I use a jpg logo for the site that is different in the 3 languages. This was achieved by putting a wpml-config.xml file in the same folder as the alternative 'flags' (based on your blog post). Do you still use this folder for optional flags and stuff?

    It would also be nice if there was an option to use language codes instead of flags, since flags are no languages.

    More comments to come if I have the time and if there are any.

  25. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    @LittleBigThing
    Thanks for testing the beta and bugs report. I just uploaded a new version (1.2dev45) which should correct them.

    It would also be nice if there was an option to use language codes instead of flags, since flags are no languages.

    Yes you are right but most people do like flags... However what you request is already possible using the option ’display_names_as’ => ‘slug’ of pll_the_languages.

  26. miguelcortereal
    Member
    Posted 9 months ago #

    I've made the test site which is preety much a replica of the one I'm working on, it's a fresh wp install, same theme, same plugins, imported content from the previous.

    started it with Polylang 1.1.5 and curiously flags didn't display both on frontend and backend.

    Then upgraded to Beta version and now it kept all synchronization between posts, pages, media, taxonomies and table strings.

    Flags still doesn't show.

    In this test site I'm experience too, meta tiltes missing translation with origin at wpseo by yoast and either the search box.

    I guess this is good news to 1.2 beta version because it confirms that the upgrade function is now fine and that i might have my under construction site with the database messed and a possible reason for it doesn't work at first attempt.

    So for now confirmed issues are flags and wpseo metatitles

  27. Chouby
    Member
    Plugin Author

    Posted 9 months ago #

    @miguelcortereal
    Thank you for your new tests. That's good news that the upgrade went smoothly.

    For flags, it seems that the issue is not linked to beta since it does not work with 1.1.5. But I don't understand what could happen. I confirmed the issue of @LittleBigThing with custom flags. But I I have no issue with flags supplied with the plugin. So on admin, you have all columns with language code as title. Is that right?

    For wpseo metatitles, do you run 1.2dev45? Before this a bug prevented reading the wpml-config.xml files.

  28. miguelcortereal
    Member
    Posted 9 months ago #

    On backend each language code has "en" or "pt" or "es" instead of the flag, on frontent at menu language switcher the href(s)elements are there with the right link but visually empty.

    Also at backend Settings --> Languages --> Languages Panel at languanges table list, locale column, for default language english, it shows this instead of the flag:

    a:2:{s:6:"locale";s:5:"en_US";s:3:"rtl";s:1:"0";}

    And the similar for the other languanges at same column.

    Spanish:
    a:2:{s:6:"locale";s:5:"es_ES";s:3:"rtl";s:1:"0";}
    Portuguese:
    a:2:{s:6:"locale";s:5:"pt_PT";s:3:"rtl";s:1:"0";}

  29. Chouby
    Member
    Plugin Author

    Posted 8 months ago #

    Clearly Polylang does not find your flags. Of course I haven't such issue but will review my code trying to imagine edge cases.

    a:2:{s:6:"locale";s:5:"en_US";s:3:"rtl";s:1:"0";}

    This is what you should get in "locale" column if you revert to Polylang 1.1.5 after running 1.2beta on your website (to avoid using the termmeta table, I had to mix the locale and the text direction in the db field previously used for the locale only). But 1.2beta should show only the locale. To be sure I understand well. Have you this on both locale and flag columns? Are the languages correctly loaded for Portugues and Spanish on Frontend? You can check the first line of your html source code.

  30. miguelcortereal
    Member
    Posted 8 months ago #

    Editing each languange locale field and replacing a:2:{s:6:"locale";s:5:"en_US";s:3:"rtl";s:1:"0";} by "en_US" and doing the same for every languages, flags are showing again and WordPress are reading each theme language .po or .mo files which wasn't, noticed that later.

    Locale field from languages had a nonsense value, different from any possible language.

    How did those values got there? I did import with the WP import plugin the content from the under construction site to the test site, I recall that UC site already had the beta version running. So while importing there was a bunch of entries produced by Polylang beta that failed to import, 1.1.5 version was at both sites, but these particular entries were accepted.

    The big worry in here is just, if it is possible that at upgrade to 1.2 these entries fill locale fields with eg: en_US or with the database content.

    And I guess that the flags issue is finished.

Reply »

You must log in to post.

About this Plugin

About this Topic