• Resolved alexstandiford

    (@alexstandiford)


    Hey Ryan!

    I just noticed that I’m getting a critical error on my site. I think this is related to the 3.0.0 upgrade because I downgraded to the previous version and it fixed the issue. I’d be happy to give more context if you need it to help troubleshoot.

    Here’s the error message I’m getting:

    Uncaught TypeError: Return value of AdvancedQueryLoop\Query_Params_Generator::get_custom_param() must be an instance of AdvancedQueryLoop\mixed, array returned in /home/gdjhukv/public_html/wp-content/plugins/advanced-query-loop/includes/Query_Params_Generator.php:83

    CONTEXT:

    {
    "error": {
    "type": 1,
    "file": "/home/gdjhukv/public_html/wp-content/plugins/advanced-query-loop/includes/Query_Params_Generator.php",
    "line": 83
    },
    "backtrace": [
    "",
    "#0 /home/gdjhukv/public_html/wp-content/plugins/advanced-query-loop/includes/Traits/Include_Posts.php(11): AdvancedQueryLoop\\Query_Params_Generator->get_custom_param('include_posts')",
    "#1 [internal function]: AdvancedQueryLoop\\Query_Params_Generator->process_include_posts()",
    "#2 /home/gdjhukv/public_html/wp-content/plugins/advanced-query-loop/includes/Query_Params_Generator.php(94): call_user_func(Array)",
    "#3 /home/gdjhukv/public_html/wp-content/plugins/advanced-query-loop/includes/query-loop.php(65): AdvancedQueryLoop\\Query_Params_Generator->process_all()",
    "#4 /home/gdjhukv/public_html/wp-includes/class-wp-hook.php(326): ComposerAutoloaderInit3d22ab91adb43d177572df3b253a90a1::AdvancedQueryLoop\\{closure}(Array, Object(WP_Block))",
    "#5 /home/gdjh"
    ]
    }

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ryan Welcher

    (@welcher)

    Hello and thanks for using AQL. I’m so sorry this happened to you! Can you tell me the PHP version your using and provide the AQL settings you were using so I can try to reproduce?

    Thread Starter alexstandiford

    (@alexstandiford)

    It’s all good!

    I am running PHP 8.1 and it appears to happen on any instance of my blocks, but I’m using the same settings across most of them. Here’s the raw block output for one of them:


    <!-- wp:query {"queryId":9,"query":{"perPage":50,"pages":0,"offset":0,"postType":"documentation","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":{"section":[18]},"parents":[],"include_posts":[],"meta_query":{}},"namespace":"advanced-query-loop"} -->
    <div class="wp-block-query"><!-- wp:post-template {"layout":{"type":"grid","columnCount":3}} -->
    <!-- wp:post-featured-image {"isLink":true} /-->

    <!-- wp:post-title {"level":3,"isLink":true} /-->

    <!-- wp:post-excerpt /-->
    <!-- /wp:post-template --></div>
    <!-- /wp:query -->

    Plugin Author Ryan Welcher

    (@welcher)

    I just released a new version of the plugin (3.0.1) that should fix this up. Can you have a test and let me know? Thanks for your patience!

    Thread Starter alexstandiford

    (@alexstandiford)

    Hey Ryan, that updated fixed it. Thank you!

    Plugin Author Ryan Welcher

    (@welcher)

    Fantastic! Thanks for letting me know!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Critical Error When Upgrading To 3.0.0’ is closed to new replies.