Bug with most recent update: Error from WooCommerce Log

Support MB Admin Columns Bug with most recent update: Error from WooCommerce LogResolved

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #19204
    AmosMadanesAmosMadanes
    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

    #19216
    Long NguyenLong 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://support.metabox.io/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
    AmosMadanesAmosMadanes
    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 NguyenLong 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
    AmosMadanesAmosMadanes
    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
    AmosMadanesAmosMadanes
    Participant

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

    #19322
    AmosMadanesAmosMadanes
    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 NguyenLong 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
    AmosMadanesAmosMadanes
    Participant

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

    #19358
    Long NguyenLong 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
    AmosMadanesAmosMadanes
    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.

    #19368
    Long NguyenLong Nguyen
    Moderator

    Hi,

    So if you deactivate all plugins except Meta Box and extensions then the Place Order button still works as well, I think the problem happens due to the conflict between WooCommerce and plugin Search & Filter Pro. Please check it and let me know.

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