White screen of death on some pages with views after updating
Support › Meta Box AIO › White screen of death on some pages with views after updating
- This topic has 7 replies, 2 voices, and was last updated 9 months ago by
Peter.
-
AuthorPosts
-
July 18, 2024 at 9:36 PM #45934
AMX
ParticipantI updated to 1.28.0 and some pages and CPTs with Views crashed. I enabled debugging, but there is no hint (except a deprecation notice about strip_tags).
I had to restore a backup with 1.26.3 and it works. I noticed that some versions between 1.26.3 and 1.28.0 did have problems with WP Gridbuilder (facets not appearing). But I don't know which version caused it, because I cannot download older versions from my account.
Deactivating the Views module makes the pages visible, but obviously without the views content.
I am clueless now, probably some functions don't work anymore...
July 19, 2024 at 6:47 AM #45941Peter
ModeratorHello,
If you deactivate WP Gridbuilder, and enable Views extension, do you see the white screen (error) when editing/viewing those pages? There could be an error between two plugins after you update Meta Box AIO to the new version.
July 19, 2024 at 6:04 PM #45945AMX
ParticipantDeactivating WP Gridbuilder and all its extensions does not help. Also, deactivating MB AIO and installing only MB Views does not help. Always the same: "There has been a critical error on this website."
July 21, 2024 at 3:34 PM #45957Peter
ModeratorHello,
Please share your site admin account by submitting this contact form https://metabox.io/contact/
I will take a look.July 22, 2024 at 10:59 AM #45967AMX
ParticipantI have managed to narrow it down to the view and code that causes the white screen.
It is here:
{% if field2 == '' and post_type != 'designs' and term.taxonomy != 'places' and mb.is_singular() %}
term.taxonomy != 'places' causes the error.
It had been working for a long time and not anymore. Why? How can I replace it?
July 22, 2024 at 11:36 PM #45977Peter
ModeratorHello,
The default variable
term.taxonomy
should be run on the type archive page, it is noted in the documentation https://docs.metabox.io/extensions/mb-views/#main-query
and it still works on my demo site with MB AIO 1.28.0.If you output only the taxonomy slug, does it throw an error?
Taxonomy: {{ term.taxonomy }}
Also, please share the full error message so I can understand the issue on your site. You can get it in the WP debug log https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
July 27, 2024 at 12:55 AM #46019AMX
ParticipantThe error is:
Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given
{{ term.taxonomy }} works in a taxonomy archive, but on a single it causes the error now. It was not the case before.
I used it inside a conditional for a dynamic page hero. The idea was to have a single dynamic page hero template for all types of content and archives. I guess I will need to separate it.
July 28, 2024 at 3:15 PM #46032Peter
ModeratorYes, please separate the view template or use another WordPress function to get the post term
https://developer.wordpress.org/reference/functions/wp_get_post_terms/ -
AuthorPosts
- You must be logged in to reply to this topic.