• Resolved Marek ?elezny

    (@igreenie)


    Hi,

    I have a problem that whenever I’m writing a post, the WP saves the draft, but it gets stuck to the point I can’t even publish the post. After little testing, I figured out my own plugin, which causes the problem, but interestingly it worked in the previous version of WP (3.7). I tried many corrections, finding white spaces but nothing has worked.

    Does anybody know what is the issue?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Marek ?elezny

    (@igreenie)

    Heh, the code can be viewed by the “thank you” link… It somehow accidentally merged in.

    Code on pastebin
    (I hope it’s not a problem to post it there when it’s quite long code)

    Hi igreenie,

    Try changing this line:

    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
                return $post->ID;
            }

    to:

    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
                return;
            }

    ps Pastebin was the perfect place for you to provide your code. Thank you for doing that correctly!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘A piece of code forces to save the draft forever’ is closed to new replies.