[wp-trac] [WordPress Trac] #55248: Ajax call has stop to work (single custom post content)

WordPress Trac noreply at wordpress.org
Tue Mar 1 12:40:41 UTC 2022

#55248: Ajax call has stop to work (single custom post content)
 Reporter:  zak87              |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  5.9.1
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:

Comment (by zak87):


 I have fixed this (fixed my code - it can be closed).

 But the point is:
 I am using from WP 5.2 in all my themes this line of code:


 but it looks like it has not working at all until WP 5.9.1.

 I will try to explain.
 I hade in the theme a Ajax call which was calling a full single (single-
 portfolio.php) page (header + content + footer) and than I have used
 jQuery to get just some content from that full/whole page. And all that
 was working until WP 5.9.

 Now, with latest update 5.9.1 that code has stop to work because of:


 because I am calling/getting a full page (with header and footer - wrong
 way to do that). That has been fixed by calling/getting just a content
 part (without header/footer).

 So, it looks like the **wp_body_open();** has not been working correctly
 until WP 5.9.1.

Ticket URL: <https://core.trac.wordpress.org/ticket/55248#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list