Using get_terms()
seems to break editing experience of dynamic block
#8038
Labels
[Type] Help Request
Help with setup, implementation, or "How do I?" questions.
Describe the bug
Using
get_terms()
within a dynamic block's PHP seems to break the editing experience for the page on which the block lives.This is what I expect to see when I try to edit the page on which this block lives:
Instead, I am redirected to a singular testimonial edit screen:
I have the following code to render a block in PHP:
I have tried commenting out and reimplementing pieces of code to isolate the issue, and it seems like Gutenberg falls over because of the
get_terms()
call.In case my actual query to get the posts is breaking my experience, here is that function:
To Reproduce
Steps to reproduce the behavior:
get_terms()
Expected behavior
When I edit my Testimonials page, I expect to be taken to the edit screen for the page, not to the edit screen for a single testimonial.
Screenshots
See above
Desktop (please complete the following information):
n/a
Smartphone (please complete the following information):
n/a
Additional context
The text was updated successfully, but these errors were encountered: