• msebel

    (@msebel)


    Hi

    I’ve been trying to debug this issue for hours now. The following things happen only when polylang (and no other plugins, except for e very broken down register_post_type call) is active. We have a custom type that has support for title/content, but in post_content it stores only shortcodes.

    For pages that don’t have polylang active, no autosave (not auto-draft!) are fired from wordpress, hence none are created. When polylang is active though, it does activate autosave on all custom types (even when not translated) which works the first time loading the post screen. But after a few heartbeats, some script withing polylang seems to flush post_content (maybe because it contains shortcodes and they’re not executed correctly in that context) and saves it back to the *autosave*. Saving on the actual post works normally.

    That has the side effect that every custom post now shows “there is a newer revision available”, because it has a difference in post_content between the post and the newest autosave/revision because post_content is empty in the autosave.

    I’m pretty sure this started happening with version 2.3.6, we’ve had 2.3.4 installed previously and didn’t see that issue as far as I know.

Viewing 2 replies - 1 through 2 (of 2 total)
  • veerap

    (@veerap)

    Have you debugged the site and checked what it says? If there is some PHP errors you should try to solve these and maybe run repair for database.

    Debug: https://codex.wordpress.org/Debugging_in_WordPress
    Database repair: https://www.maketecheasier.com/fix-corrupted-wordpress-database-2/

    Thread Starter msebel

    (@msebel)

    I have debugged this with X-Debug for hours. As soon as polylang is disabled the autosaves are not happening, as soon as it’s activated polylang seems to be “the reason” empty (no post_content even if there actually is) autosave start appearing again. there are no errors and the database is completely empty. this happens with *every* installation no matter what plugins or theme is used where polylang has been updated to 2.3.7.

    I couldn’t find out what exactly is causing the empty autosaves, but I’ve tracked it down to be somewhere within polylang or the core does it when polylang is active. It also happens when disabling every other plugin and switching to a standard theme, though to test is I’ve broken down our post type plugin to just a “register_post_type” call, hence there can’t be a bug. The custom type is also registred without support for revisions (but even with support, it doesn’t make a difference).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘empty autosaves on custom types not having support for revisions’ is closed to new replies.