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

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #45934
    AMXAMX
    Participant

    I 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...

    #45941
    PeterPeter
    Moderator

    Hello,

    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.

    #45945
    AMXAMX
    Participant

    Deactivating 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."

    #45957
    PeterPeter
    Moderator

    Hello,

    Please share your site admin account by submitting this contact form https://metabox.io/contact/
    I will take a look.

    #45967
    AMXAMX
    Participant

    I 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?

    #45977
    PeterPeter
    Moderator

    Hello,

    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/

    #46019
    AMXAMX
    Participant

    The 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.

    #46032
    PeterPeter
    Moderator

    Yes, 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/

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.