WordPress.org

Ready to get started?Download WordPress

Forums

Multisite Language Switcher
[resolved] Page is linking to autosave (6 posts)

  1. mattdeclaire
    Member
    Posted 2 years ago #

    I've got site set up with only Pages (as opposed to posts). One of my pages does not have a paired page specified, but instead of linking to the homepage, it is linking to an autosave post. (/2012/04/77-autosave/)

    I've looked into the database, and there in the wp_options is the entry: msls_94 (my page) -> a:1:{s:2:"ja";i:315;} In wp2_posts, post with ID 315 is a revision. It's parent, is a published post (ID 77). In wp2_options, I find: msls_77 -> a:1:{s:2:"us";s:2:"94";}.

    So, it looks like the wp2 post has the original post as it's pair, but not vice-versa. I would expect that the wp page to point to the homepage of wp2, and the wp2 page to point to the wp page. Is this a bug?

    http://wordpress.org/extend/plugins/multisite-language-switcher/

  2. mattdeclaire
    Member
    Posted 2 years ago #

    I suspect that the msls option is being changed during an autosave, and the following check would prevent it:
    if (!defined('DOING_AUTOSAVE') || !DOING_AUTOSAVE)

  3. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    You are using the developer version, right? I'm working on a feature request to allow drafts.

    But there is indeed a check to prevent a change during an autosave: Line 141 https://github.com/lloc/Multisite-Language-Switcher/blob/master/includes/MslsMetaBox.php

    Cheers,
    Dennis.

  4. mattdeclaire
    Member
    Posted 2 years ago #

    I am using the dev version. Has the custom post type archive fix made it into the WP directory?

    So, I expect that you'd never want the live site to link to an autosave, right?

  5. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    No, the current development version will be tagged as 0.9.6 in a few days and then I will commit it into the WordPress Plugin Directory.

  6. realloc
    Member
    Plugin Author

    Posted 2 years ago #

    Could you check if this problem is solved in the actual version?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic