[wp-trac] [WordPress Trac] #58345: Critical error if page_for_posts is set to non existing page ID
WordPress Trac
noreply at wordpress.org
Thu May 18 10:57:00 UTC 2023
#58345: Critical error if page_for_posts is set to non existing page ID
----------------------------+---------------------
Reporter: wplindavantol | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.3
Component: Menus | Version: trunk
Severity: normal | Resolution:
Keywords: php8 has-patch | Focuses:
----------------------------+---------------------
Comment (by hbhalodia):
Hi @SergeyBiryukov, As per @wplindavantol description, I tried to
reproduce the same error on my system. I got to reproduce the same error.
What I followed is to provide the non-existing ID for this part of code
logic and successfully encountered the error. Though I have added the
patch for this ticket, I am bit confuse here,
- I have tried to reproduce the error by setting the homepage and posts
page in settings→reading and then deleted the page which was assigned to
posts page. When I revisited the menu, it defaults taken the next page ID
but does not add the error.
- I think when we intentionally add the non-exisiting ID, then only the
error is reproducible.
@wplindavantol Can you please provide the steps how you have reporoduced
the error without intenionally passing the non-existing Id. Thanks.
Ps: Though I have added the patch, here is the PR for the same -
https://github.com/WordPress/wordpress-develop/pull/4472
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58345#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list