WordPress / phpunit-test-reporter

GNU General Public License v3.0
29 stars 21 forks source link

Disable "Parent Page" dropdown on post type listing page #100

Closed dd32 closed 2 years ago

dd32 commented 3 years ago

E_ERROR: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4194312 bytes) in wp-includes/class-walker-page-dropdown.php:66 Source: GET https://make.wordpress.org/hosting/wp-admin/edit.php?post_type=result

This appears to be being triggered for unit test reporters, based on the frequency of the fatals.

Loading the post_type result listing page causes PHP to run out of memory on WordPress.org currently. This is caused by the Quick Edit view for each listed result on the screen having a <select> with 48,000 <option>'s in it - well, specifically the memory usage is related to the query used to generate that :)

SELECT * FROM wp_posts WHERE (post_type = 'result' AND post_status = 'publish') ORDER BY menu_order,wp_posts.post_title ASC

WP_Posts_List_Table->inline_edit, wp_dropdown_pages, get_pages, wpdb->get_results (343.6 ms)

I'm not sure if WordPress has the builtin ability for it, but disabling that <select> option from the UI, or disabling quick-edit entirely would work around this for the short term.. or permanently.. given the lack of need for that to be set manually..