Support » Plugin: Polylang » Problem with Custom Post types after 1.0.2 update

  • Today I have updated WP to 3.5.1 and afterwords updated Polylang to 1.0.2 on one of my old sites and as a result it started mixing languages on custom post types. Previous version of WP was 3.5, not sure about Polylang, but I keep plugins up to date, so it wasn’t older than 3-4 weeks.

    All language info in admin on custom posts is now gone: no language in post list, no language picker meta-box on edit page. Queries don’t have language filtering set automatically, like before. On regular posts and pages it still works OK.

    Custom post types were created with Custom Post Type UI plugin version 0.7.2 (it wasn’t updated today), and no other changes to site have been made beside the already mentioned upgrade.

    Language info is still in the database, if I explicitly add lang param to my query it works:

    $args = array( 'post_type' => 'info', 'posts_per_page' => 3, 'orderby' => 'menu_order', 'lang' => pll_current_language('slug'));
    $loop = new WP_Query( $args );

    this will work, but previously it was injecting the language conditions automatically?

    So front-end can be quick fixed like this, but the admin still lacks any way to control the language, so I can’t add any new content at the moment.

    Please advise, this is kinda urgent problem and any help will be greatly appreciated…

Viewing 2 replies - 1 through 2 (of 2 total)
  • Ok, I figured it out: In settings there is an option to “activate languages and translations for custom post types.”.

    For some reason these settings were cleared after the upgrade. Simply re-checking all of the custom post types fixed the problem, and the existing language data in DB was preserved, so now everything works ok.

    You should just check the upgrade process, reseting the settings like this is really not what one would expect to happen on the system that is already using the plugin for months. Settings were the last thing that I though of looking in.

    Plugin Author Chouby


    If you updated from a version older than 1.0, the option was not existing. So it is possible that your custom post type worked out of the box (because Polylang decided to translate it by default, based on how it was registered) and that now you have to check the option to make it work.

    I changed this because the default option was ok for some installations and not ok on some others. The update process from 1.0 or 1.0.1 should not reset this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with Custom Post types after 1.0.2 update’ is closed to new replies.