Custom Fields
Support MB Views PHP Error - SRC-Renderer.php

  • Creator
  • #29014
    Resolved Prabakaran Shankar


    FOr the team notification, I'm getting this message in the error log.

    PHP Warning: array_map(): Expected parameter 2 to be an array, null given in /var/web/site/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-views/src/Renderer.php on line 73

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #29026
    Long Nguyen


    Thanks for your feedback.

    I will escalate this issue to the development team to fix it in the next update. And please let me know how to reproduce the issue?

    Prabakaran Shankar

    Hello sir,

    I have observed the following error when I use to display the relationship data using the below code.

    [06-Jul-2021 12:34:49 UTC] PHP Warning: array_map(): Expected parameter 2 to be an array, null given in /var/web/site/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-views/src/Renderer.php on line 73
    [06-Jul-2021 12:34:49 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) WHERE 1=1 AND wp_1p_posts.post_type = 'job' AND ((wp_1p_posts.post_statu...' at line 1 for query SELECT wp_1p_posts.* , AS <code>mbr_69_to</code> FROM wp_1p_posts INNER JOIN wp_1p_mb_relationships AS mbr ON (mbr.from = wp_1p_posts.ID AND mbr.type = '69' AND IN ()) WHERE 1=1 AND wp_1p_posts.post_type = 'job' AND ((wp_1p_posts.post_status = 'publish')) GROUP BY <code>mbr_69_to</code>, wp_1p_posts.ID ORDER BY wp_1p_posts.post_date DESC LIMIT 0, 5 made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_REST_Posts_Controller->get_items, WP_REST_Posts_Controller->prepare_item_for_response, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, MBViewsShortcode->render, MBViewsRenderer->render, MetaBoxDependenciesTwigEnvironment->render, MetaBoxDependenciesTwigTemplateWrapper->render, MetaBoxDependenciesTwigTemplate->render, MetaBoxDependenciesTwigTemplate->display, MetaBoxDependenciesTwigTemplate->displayWithErrorHandling, __TwigTemplate_2410833bb708b9f030d76465809eb5b189484cd32768e47e88d9f2048677ec56->doDisplay, twig_get_attribute, MBViewsTwigProxy->__call, call_user_func_array, get_posts, WP_Query->query, WP_Query->get_posts
    {% set job_args = { post_type: 'job', posts_per_page: 5, relationship: {id: '69', to: post.ID} } %}
        {% set jobs = mb.get_posts( job_args ) %}
        {% for job in jobs %}
                    <li><a href="{{ mb.get_the_permalink( job.ID ) }}"><span style="color:black"><strong>{{ job.post_title }}</strong></span></a></li>
            {% endfor %}
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.