Forum Replies Created

Viewing 15 replies - 1 through 15 (of 27 total)
  • Now it’s set correctly for PRIMARY KEY (object_id,term_taxonomy_id). But yes, when the table was created, I think instead of PRIMARY KEY (object_id,term_taxonomy_id) it only did PRIMARY KEY (object_id) for some reason.

    It doesn’t matter now, it’s important that it is fixed. Thank you for your support, I wouldn’t have been able to track the problem without your help.

    Yes, I deleted the index for the column object_id and now everything works fine.

    So the problem was that the column object_id from wp_term_relationships is set as an index column which forces that all records in that table to have a unique object_id number.

    Not sure if this is a WP issue or a polylang issue. Just letting you know.

    Thank you very much for all your help!

    I see, but that’s not the case. What SQL is complaining about is that there is already an object_id with the number 39.

    There is no record with object_id 39 and taxonomy_id 156.

    I think the problem is with the structure of wp_term_relationships .

    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

    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

    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

    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;}

    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.

    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

    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.

    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 .

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

    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.

    No, they are no longer correctly linked.
    I mean, if I revert to 1.1.6 they are correctly linked again.
    If I upgrade to 1.2.3 , they are no longer correctly linked and I can’t add new page ids to the language section.

    Yes, I reverted using the plugin.
    Upgrading from 1.1.6 to 1.2.3 doesn’t break the menus anymore, like it did the first time. Only the language page ID (maybe there are other bugs, but I can’t see any others right now).

Viewing 15 replies - 1 through 15 (of 27 total)