Nasty Problem With Basic Bilingual Plugin

[fr]

Un problème avec le plugin Basic Bilingual qui fait disparaître les extraits dans "l'autre langue". Je bosse sur une solution (voir commentaires).

[en]

Heck. I just spent the last 15 minutes digging through the Google cache to retrieve “other language excerpts” which had been wiped from a good dozen of my recent posts. Not all of them, mind you — almost all of them. I haven’t yet managed to reproduce the problem, but clearly, the meta fields get reset in some circumstances.

I suspect it might be something that has to do with editing posts. Maybe related to the old disappearing tags problem?

In any case, I’m afraid Basic Bilingual must be misbehaving. Be particularly cautious when editing posts. Let me know if you have the same problem or a path to a fix — I’m working on it now.

Update: if somebody has the French excerpt to my post Advisors, Boards, Companies, Partners, Oh My! in their newsreader or browser cache, could you please send it to me or copy-paste it here as a comment? Thanks a lot.

Update, 17:30: I think I solved the problem (see comments) and corrected the files available on my server, bumping up the version to 0.31. Please download the latest version if you’re using this plugin.

Similar Posts:

This entry was posted in Wordpress and tagged basic bilingual, help, plugin, problem, vanish, Weblog Technology, Wordpress. Bookmark the permalink.

12 Responses to Nasty Problem With Basic Bilingual Plugin

  1. Stephanie says:

    I think I found a fix — indeed something in the “vanishing meta” department. It has something to do with comments (approving moderated comments?) but as I’m not quite sure what cause the problem, I’m not sure either how to test that it’s gone. Ugh.

  2. Stephanie says:

    I replaced the function bb_update_meta:

    // general custom field update function
    function bb_update_meta($id, $field)
    {
    // authorization
    if ( !current_user_can('edit_post', $id) )
        return $id;
    // origination and intention
    if ( !wp_verify_nonce($_POST['bunny-key'], 'bunny') )
        return $id;

    $setting = stripslashes($_POST[$field]); $meta_exists=update_post_meta($id, $field, $setting); if(!$meta_exists) { add_post_meta($id, $field, $setting); } }

    Now even I can’t edit “other-excerpts” from the post editing field, so I guess it at least prevents accidents!

  3. Stephanie says:

    Ah, this needs to go under the textarea in the admin edit post section:

    // hidden field to avoid vanishing meta

    echo '<input type="hidden" name="bunny-key" id="bunny-key" value="' . wp_create_nonce('bunny') . '" />';

  4. Stephanie says:

    I think I found a fix — indeed something in the “vanishing meta” department. It has something to do with comments (approving moderated comments?) but as I'm not quite sure what cause the problem, I'm not sure either how to test that it's gone. Ugh.

  5. Stephanie says:

    I replaced the function bb_update_meta:


    <pre>// general custom field update function
    function bb_update_meta($id, $field)
    {
    // authorization
    if ( !current_user_can('edit_post', $id) )
    return $id;
    // origination and intention
    if ( !wp_verify_nonce($_POST['bunny-key'], 'bunny') )
    return $id;

    $setting = stripslashes($_POST[$field]);
    $meta_exists=update_post_meta($id, $field, $setting);
    if(!$meta_exists)
    {
    add_post_meta($id, $field, $setting);
    }
    }
    </pre>

    Now even I can't edit “other-excerpts” from the post editing field, so I guess it at least prevents accidents!

  6. Stephanie says:

    Ah, this needs to go under the textarea in the admin edit post section:


    <pre>// hidden field to avoid vanishing meta


    echo '<input type="hidden" name="bunny-key" id="bunny-key" value="' . wp_create_nonce('bunny') . '" />';

    </pre>

  7. Pingback: Climb to the Stars (Stephanie Booth) » WordPress Deaf to Pings

  8. Pingback: Climb to the Stars (Stephanie Booth) » November 2007 Recap

  9. Sudar Muthu says:

    Hi Stephanie,

    Nice to know that you figured it out. Happy Hacking :)

  10. Sudar Muthu says:

    Hi Stephanie,


    Nice to know that you figured it out. Happy Hacking :)

  11. Pingback: Climb to the Stars (Stephanie Booth) » Two Plugin Updates: Basic Bilingual 0.32 and Language Linker 0.2

  12. Pingback: Climb to the Stars (Stephanie Booth) » December 2007 Recap

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>