Opened 4 years ago
Closed 6 months ago
#55248 closed defect (bug) (worksforme)
Ajax call has stop to work (single custom post content)
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 5.9.1 |
| Component: | Posts, Post Types | Keywords: | |
| Focuses: | Cc: |
Description
Ajax call which should get a content from a single custom post item has stop to work. On other hand, Ajax call which is getting more Portfolio items (more custom post items) works fine (you have all in the video - sorry for my English).
All was fine until the WP ver 5.9 but the bug is there after updating on ver 5.9.1
Video link - https://www.youtube.com/watch?v=Gcxtm4FF58E
Change History (2)
#2
in reply to:
↑ 1
@
6 months ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
Replying to zak87:
I have fixed this (fixed my code - it can be closed).
Thanks for informing, time to close it now.
Anyway, my recommendation is to provide full code snippets when you are asking for this kind of help
I watched your YT video and it didn't really provide any hints. We need to look on what you are exactly doing to reproduce this. Sometimes videos are great, but other times are insufficient. In this case more code would have been better.
*Update
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.