Nasty Problem With Basic Bilingual Plugin [en]

[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).

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.

8 thoughts on “Nasty Problem With Basic Bilingual Plugin [en]

  1. 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. 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);
        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. 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') . '" />';

Leave a Reply

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