Custom Fields
Re-Envisioned
Support MB Admin Columns Bug with most recent update: Error from WooCommerce Log

  • Creator
    Topic
  • #19204
    Resolved AmosMadanes
    Participant

    What should I do to fix the bug with the latest update. This only started when I updated my plugin.

    Woocommerce status log shows this Fatal Error.I discovered this because I was looking at the logs because I was having an error with WooCommerce. I can make the error go away, if I deactivate MB Custom Post Type extension, even though it says the error is coming from “mb-admin-columns.php”

    If I deactivate MB Admin Column I still get the same error on my website.

    2020-04-21T00:05:09+00:00 CRITICAL require_once(): Failed opening required ‘/opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-admin-columns/inc/class-mb-admin-columns-base.php’ (include_path=’.:/opt/bitnami/php/lib/php’) in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-admin-columns/mb-admin-columns.php on line 42

Viewing 10 replies - 1 through 10 (of 11 total)
  • Author
    Replies
  • #19216
    Long Nguyen
    Moderator

    Hi,

    If you are using custom code to create the custom columns with the old version of this plugin, please take a look at this updated documentation
    https://docs.metabox.io/extensions/mb-admin-columns/#creating-custom-class

    and this topic https://metabox.io/support/topic/version-1-50-removed-mb_admin_columns_user-and-mb_admin_columns_post-classes/

    to change the class extends \MBAC\Post.

    Let me know how it goes.

    #19230
    AmosMadanes
    Participant

    Thanks Long, Just to clarify do I need to add:

    if (class_exists('MB_ADMIN_COLUMNS_POST')) {
        class SHS_MBAC extends  MB_ADMIN_COLUMNS_POST {
        }
    } elseif (class_exists('\MBAC\Post')) {
        class SHS_MBAC extends  \MBAC\Post {
        }
    }
    class SHS_Member_Link_Columns extends SHS_MBAC {
        public function columns( $columns ) {

    to the custom.php file I make or to the functions.php file?

    Also, in the custom.php file will all me pre-existing admin columns be automatically created with this code?

    Or do I need to add the following code for all my pre-existing custom admin columns:

    $this->add( $columns, 'column_id', 'Column Title', $position, $target )

    If I do, what do what do I replace the $position and @target variables with?

    #19235
    Long Nguyen
    Moderator

    Hi,

    Please follow the example https://docs.metabox.io/extensions/mb-admin-columns/#example-1

    you should use this format for all the columns
    $this->add( $columns, 'column_id', 'Column Title', $position, $target );
    for the better support.

    if you use the code in the file custom.php then you need to require it on the file functions.php

    The $position is before or after and the $target is the column id that means the custom column show before the column Title in the example.

    #19320
    AmosMadanes
    Participant

    Hi Long, I think where I’m confused is that I am not using standard wordpress class like in the example.

    I’ve created a custom post type called “Donor” and I’ve created custom taxonomies. The custom taxonomies are what is being displayed in the admin columns see the attached image.

    Could you give me an example the code based on the custom taxonomies I’ve created in meta box:

    https://ibb.co/VSKpm6J

    #19321
    AmosMadanes
    Participant

    Btw, I’ve only created the post type and taxonomies using the MetaBox dashboard. Also,i’m using the metabox AIO extension

    #19322
    AmosMadanes
    Participant

    It conflict appears to actually come from MB custom Post Type, because If I decativate that and reload my checkout page the “place order” button works. But my whole website is built around the custom post type.

    #19326
    Long Nguyen
    Moderator

    Hi,

    You can go to Admin Dashboard -> Meta Box -> Taxonomies -> Edit a taxonomy -> Click the button Get PHP Code to get the code and paste it on the file functions.php or using Code Snippets plugin to create a taxonomy after deactivating MB AIO plugin, see my screenshot.

    But I also create a custom post type, taxonomies with MB AIO and admin columns for fields, taxonomies but the button Place Order on the Checkout page still works as well. Could you please switch to the default theme of WordPress (Twenty Nineteen) then check the problem again?

    #19349
    AmosMadanes
    Participant

    I have the same issue when I switch to the default “Twenty Nineteen” Theme

    #19358
    Long Nguyen
    Moderator

    Hi,

    Please keep the theme Twenty Nineteen activate, then open the console tab in Developer tool of the browser in the page Checkout and turn on debug. Let me know if there is an error message before and after clicking the button Place Order.

    #19363
    AmosMadanes
    Participant

    I did the debug in Twenty Nineteen. I think it’s an issue with my Custom Taxonomies, more on that later. Also, I’ve deactivated most of the features in Meta Box AIO and Registered Post Type & Registered Custom Taxonomies in the Theme’s function PHP file. I did this for both my standard theme and the Twenty Nineteen Theme:

    1) Debug Mode: https://ibb.co/smT5Wkh

    2) Debug Mode Search & Filter Pro Deactivated: https://ibb.co/KLR2ChW

    3) Debug Mode Back to my Normal Theme: Produces the same error as the Twenty Nineteen Theme

    I am adding 6 custom taxonomies. 5 of which are being used in Search & Filter Pro. When comment out 1 of the taxonomies used in Search & Filter Pro, the Proceed to checkout button reappears.

Viewing 10 replies - 1 through 10 (of 11 total)
  • You must be logged in to reply to this topic.