[wp-trac] [WordPress Trac] #34560: Server error after saving many revisions

WordPress Trac noreply at wordpress.org
Tue Nov 3 04:52:14 UTC 2015


#34560: Server error after saving many revisions
------------------------------------------+-----------------------------
 Reporter:  pdfernhout                    |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  Future Release
Component:  Editor                        |     Version:  3.6
 Severity:  major                         |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+-----------------------------

Comment (by pdfernhout):

 @miqrogroove Thank you for looking into this. Issue #24958 from about two
 years ago is also related to this one, although apparently somewhat
 different because it seems more about the revisions screen. Testing code
 discussed in that issue could be applicable to this one includes
 [https://gist.github.com/ocean90/5586293 this ocean90 script]. The issue
 also mentions: "The reason this was surfaced is because we have a test
 suite for the WordPress.com REST API that edits the same post over and
 over - therefor it quickly got to 1000+ revisions".

 The original issue ticket submitter @jshreve reported failures in
 wp_update_post called from a plugin and when using the revisions API but
 also said "I can seem to update from the post edit screen." Is it possible
 that those other systems failed sooner due to using more memory for other
 reasons and so the edit screen still had some memory remaining but would
 have failed soon?

 That other issue discusses near the end the desirability of having a way
 to retrieve post metadata, but the patch diffs there seem to be about
 limiting the number of revisions retrieved for comparison (like to 100).

 There is a reference at the current last comment (15) from eight months
 ago by @adamsilverstein to
 [https://developer.wordpress.org/reference/functions/wp_prepare_revisions_for_js/
 wp_prepare_revisions_for_js], but the code shown on that page from
 [https://github.com/WordPress/WordPress/blob/4.3.1/wp-
 admin/includes/revision.php "includes/revision.php"] still calls
 wp_get_post_revisions and then just reformats the results without the post
 content. So, developing a general way to address this issue may also
 improve performance of that function as well (and by extension, other
 JavaScript consumers of such data).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34560#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list