• Resolved file2mail

    (@file2mail)


    With the latest plugin, When trying to duplicate pages, the browser hangs for about 40 seconds and then we get a 500 Server error.
    Pages we’re trying to clone include a few nested child pages.
    Then if we refresh and check the list of Pages again, we see that maybe two of the child pages had copied only.

    Already tried enabling all the permissions, no effect.
    Also Running Divi and User Role Editor if it matters.

    Going to downgrade until this can be resolved, thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Enrico Battocchi

    (@lopo)

    Hi,
    Can you look at Apache error log to see what it says?

    Did you need to downgrade to 2.6 or just to 3.0.1 from 3.0.2 released a few hours ago?

    Thread Starter file2mail

    (@file2mail)

    3.0.1 was only available at the time.
    Had to go back to 2.6.

    I think this was the error from the logs:
    [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /wp-includes/class-wp-image-editor-imagick.php on line 257, referer: /wp-admin/edit.php?s=agenda+template&post_status=all&post_type=page&action=-1&m=0&paged=1&action2=-1

    Plugin Author Enrico Battocchi

    (@lopo)

    Hi,
    it looks like the server wasn’t able to perform the cloning operation for the whole tree of parent post + child posts (+ attachments + comments? it depends on the settings).
    If the posts have much content and many images, and if your machine (looks like you’re working on your own computer?) is not very powerful, the operation can take more that 30 seconds, which is the default limit.

    You should increase the timeout, usually it’s done by setting the max_execution_time variable in php.ini.

    Hope this helps!

    Thread Starter file2mail

    (@file2mail)

    Thank you, but I don’t see why this should be an issue, especially when it works well, quite quickly, on 2.6.
    Possibly an issue with the efficiency of the code?

    Plugin Author Enrico Battocchi

    (@lopo)

    Hi,
    sorry for the delay, I was out of town.

    I think I understand the issue: you probably have “Copy attachments” activated.
    In 2.6 the cloning of attachments was conceptually wrong: it copied the attachment but not the media file, so the media library could have many duplicates of the same media pointing to the same physical file. Deleting one of the media would delete the file for every other copy of the media.

    Since 3.0, enabling the cloning of attachments means that the files are duplicated too: if they are images, even their various sizes are recreated. That takes time, if a post has several images attached.

    In most cases, the option can be safely turned off. If images attached to the original post are shown in the text, they’ll still be there in the copy, since it’s a link to the URL(*): it’s just as if you inserted an image from an old post in a new one.
    Also, if you don’t disable the cloning of the thumbnail image, the copy will still use it, just as you can use the same image as thumbnail for multiple posts.

    So I suggest to uncheck the “Copy attachments” options and try again, that should work.
    Hope this helps!

    (*) Note that the URLs in text, even when the attachments are cloned, are not updated to point to the new files.

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

The topic ‘500 Server error when cloning Pages’ is closed to new replies.