• Resolved Naomi Blindeman

    (@naomiblindeman)


    Hi, beautiful plugin, wonderful to see all the work on it and the simplicity with which it works. Thank you.
    I am/was using: WP 3.7.1. & polylang 1.2.1 & custom made theme
    I have an odd little problem. I had your plugin working, completely, on my site with the current theme.
    I added an archive template for a custom post type (archive-portfolio.php) that was already working without problems. The archive page didn’t work. I deactivated polylang to see if it might have something to do with that. The archive worked. I thought “aha”.
    I turned polylang back on thinking I’d just have to change a setting or the permalink structure to get it to work, and the english menu stopped working. (Default is dutch)
    The menu still exists, I try to choose the right location for it (Main menu in English), I click save. But it doesn’t commit the change.
    I made a new menu, doesn’t work either. There is another location available but all menu’s will only take the dutch/default locations and none of the English one.
    I’ve tried activating and deactivating the plugin again. Nothing changes.
    A new update came out of polylang, I updated, nothing changed. I can’t assign a menu to any of the english versions of ‘location’.
    I don’t know if I explained myself clearly but I hope so. Anyone who has a suggestion of where I might look: I’m open to them!
    Thank you.

    https://www.ads-software.com/plugins/polylang/

Viewing 15 replies - 31 through 45 (of 50 total)
  • My them is bizway, the plugins…

    I have very few active. I think the only one that affects the website and the admin panel itself is polylang. I also have this:
    https://www.ads-software.com/support/topic/translation-issues-using-polylang?replies=13 active.

    My website is down right now, so I can’t check exactly.

    Plugin Author Chouby

    (@chouby)

    I have no issue with bizway theme (+ FormGet Contact Form recommended by the theme) + my own plugins.

    I don’t have FormGet Contact Form… just the theme.

    Ok, my plugins are:
    WP Featured Content Slider
    Polylang translates bizway strings
    Polylang
    Add From Server

    These are all my active plugins.

    Theme is BizWay 1.7.5 .

    Plugin Author Chouby

    (@chouby)

    Neither your plugins, nor your theme interfered in the upgrade tests I made on my test site.

    Well, as I said. It works on 1.1.6, not on 1.2.3 . Let me try it one more time on 1.2.3.

    Upgraded to 1.2.3, page translation is broken.
    Can you give me any info as to where these page translation infos are stored? Maybe I can manually add them.

    Edit: wp_postmeta does contain for instance:

    a:6:{s:2:”ro”;i:101;s:2:”en”;i:39;s:2:”fr”;i:0;s:2:”de”;i:0;s:2:”it”;i:0;s:2:”es”;i:0;} for post id 39.
    under metakey – _translations

    Plugin Author Chouby

    (@chouby)

    That would be complex to do manually.

    wp_postmeta contains the translations informations for 1.1.6 and older. This informations are no more used in 1.2.3 (but they are temporarily kept in database to manage upgrade issues as yours). Polylang 1.2.x uses taxonomies instead.

    Four taxonomies are used:

    ‘language’ to manage post languages (was already present in 1.1.6). there should be one entry per existing language (displayed in the languages table)

    ‘term_language’ to manage term languages. You should have one entry per existing language. These entries are present in 1.2, not in 1.1.6. If there are present when attempting to upgrade from 1.1.6 to 1.2.3, the upgrade will not run. That’s one of the important things the plugin used to revert from v1.2 to v1.1.6 does clean

    ‘post_translation’ to group post translations
    ‘term_translation’ to group term translations
    Both exist only in 1.2 and should be removed to run the upgrade.

    One important note: If you keep Polylang activated while activating the revert plugin, the revert plugin will do nothing (to avoid bad interferences between one plugin which cleans the database and the other one which does attempt to fill it).

    Before attempting a new upgrade, you can check the DB to see if is clean (for example: no ‘term_language’ entry in wp_term_taxonomy table).

    You can also try to log errors while upgrading by replacing

    define('WP_DEBUG', false);

    by

    define('WP_DEBUG', true);
    define('SCRIPT_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);

    in your wp-config.php
    This will log errors in a file wp-content/debug.log and may help us to find what’s going wrong in the upgrade.

    You might want to deactivate ‘WP Featured Content Slider’ before setting WP_DEBUG to true as this plugin will fill your log of PHP notices.

    Thank you so much!

    This is from post_translation:
    term_taxonomy_id term_id
    137 137 post_translations a:6:{s:2:”ro”;i:101;s:2:”en”;i:39;s:2:”fr”;i:0;s:2…

    a:6:{s:2:”ro”;i:101;s:2:”en”;i:39;s:2:”fr”;i:0;s:2:”de”;i:0;s:2:”it”;i:0;s:2:”es”;i:0;}

    – This is correct, post 101 is ro and 39 is en.

    Further down, I have about 7 post_translation entries, all filled by:
    a:2:{s:2:”en”;i:39;s:2:”ro”;i:101;} (same thing in all of them)

    I was wondering… wouldn’t it be easier to just delete all these post_translation entries and see what happens?

    Edit:
    I did this:
    – deleted all post_translation entries
    – went into wp_admin page and edited a page
    – added id 101 to language ro for that page
    – saved

    After saving, WP acted as if I haven’t edit the page at all, the language id didn’t save… however, in SQL this line was added into the DB:
    151 151 post_translations a:2:{s:2:”en”;i:39;s:2:”ro”;i:101;} 0 0

    Somehow, polylang is not reading the DB correctly I think…
    I will try what you said and add the debug functions.

    For term translation I only have 2 entries:
    142 142 term_translations a:6:{s:2:”ro”;i:10;s:2:”en”;i:3;s:2:”fr”;i:0;s:2:”… 0 0
    143 143 term_translations a:2:{s:2:”ro”;i:60;s:2:”en”;i:62;}

    Ok, here we go:

    [19-Nov-2013 15:12:54 UTC] WordPress database error Duplicate entry ’39’ for key ‘object_id’ for query INSERT INTO wp_term_relationships (object_id,term_taxonomy_id) VALUES (39,153) made by edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), call_user_func_array, PLL_Admin_Filters_Post->save_post, PLL_Model->save_translations, wp_set_object_terms

    [19-Nov-2013 15:12:54 UTC] WordPress database error Duplicate entry ‘101’ for key ‘object_id’ for query INSERT INTO wp_term_relationships (object_id,term_taxonomy_id) VALUES (101,153) made by edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), call_user_func_array, PLL_Admin_Filters_Post->save_post, PLL_Model->save_translations, wp_set_object_terms

    [19-Nov-2013 15:16:56 UTC] PHP Notice: Trying to get property of non-object in /var/www/html/wp-content/plugins/polylang/admin/admin-filters-post.php on line 259

    Plugin Author Chouby

    (@chouby)

    What is the content of the entry with term_taxonomy_id 153 in wp_term_taxonomy table?

    Everytime I try to add a language id, the term_taxonomy_id increases by 1.

    For instance, this is my last attempt:

    [19-Nov-2013 16:41:26 UTC] WordPress database error Duplicate entry ’39’ for key ‘object_id’ for query INSERT INTO wp_term_relationships (object_id,term_taxonomy_id) VALUES (39,156) made by edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), call_user_func_array, PLL_Admin_Filters_Post->save_post, PLL_Model->save_translations, wp_set_object_terms

    [19-Nov-2013 16:41:26 UTC] WordPress database error Duplicate entry ‘101’ for key ‘object_id’ for query INSERT INTO wp_term_relationships (object_id,term_taxonomy_id) VALUES (101,156) made by edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), call_user_func_array, PLL_Admin_Filters_Post->save_post, PLL_Model->save_translations, wp_set_object_terms

    in the table wp_term_taxonomy –
    156 156 post_translations a:2:{s:2:”en”;i:39;s:2:”ro”;i:101;} 0 0

    Plugin Author Chouby

    (@chouby)

    Could you make just a test?

    De-activate Polylang so that it does not interfere.
    Create a new category.
    Create a new post in this new category and save a draft of your post.

    Do you receive the same kind of database error?

    No, no error whatsoever.

    If I manually try to add let’s say object_id 39 , term_taxonomy_id 156 to the database (wp_term_relationship) , I get the same error.

    Does object_id has to be a unique key, or can there be multiple records with the same object_id in that particular table ?

    Thank you

Viewing 15 replies - 31 through 45 (of 50 total)
  • The topic ‘Menu trouble after deactivating and activating’ is closed to new replies.