Make WordPress Core

Opened 3 months ago

Closed 3 months ago

#48828 closed defect (bug) (reported-upstream)

wp rest api renders loads and executes content for all pages when gutenberg retrieves a list of pages for the page parent select

Reported by: hobzhobz Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.0
Component: Editor Keywords:
Focuses: rest-api Cc:


Latest version of wordpress.

When editing a page in gutenberg there is a select-element where you can select the parent of this page.

The select is populated using the wp rest api / ajax.

The problem is that each pages content is rendered. This means that also shortcodes in pages are executed.

So lets say that you have 100 pages and each page has a shortcode that takes 1 second, it would take 100 seconds to load ...

Gutenberg does not need the content of the pages to populate the select, all it needs imho is ID, Title, Menu Order, Parent

Another problem with this is that if one shortcode has faulty code in it, it could make the rest api crash and gutenberg would be unable to populate the dropdown.

Change History (1)

#1 @TimothyBlynJacobs
3 months ago

  • Component changed from REST API to Editor
  • Focuses rest-api added
  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed
  • Version set to 5.0

Hello @hobzhobz!

This is being tracked on GitHub in the Gutenberg repository. You can follow the progress along here: https://github.com/WordPress/gutenberg/pull/18586

Note: See TracTickets for help on using tickets.