• Resolved bklogos

    (@bklogos)


    Do not have need to access the Members plugin often, but today after updating to latest version I went into the plugin and tried to edit a role, it crashed.

    There is a conflict with WooCommerce PDF Invoices Italian Add-on, Version 0.7.2

    The issue has been there for awhile just didn’t realize it until now.

    2023-09-21T14:11:13+00:00 CRITICAL Uncaught Error: Call to a member function get_meta() on string in /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-italian-add-on/includes/wcpdf-it-functions.php:14Stack trace:#0 /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-italian-add-on/includes/class-wcpdf-integration3.php(89): wcpdf_it_get_billing_invoice_type(‘administrator’)#1 /var/www/html/wp-includes/class-wp-hook.php(310): wcpdf_Integration_Italian_add_on->wcpdf_add_meta_boxes(‘shop_order’, ‘administrator’)#2 /var/www/html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array)#3 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#4 /var/www/html/wp-content/plugins/members/admin/class-role-edit.php(245): do_action(‘add_meta_boxes’, ‘members_page_ro…’, ‘administrator’)#5 /var/www/html/wp-content/plugins/members/admin/class-manage-roles.php(125): Members\Admin\Role_Edit->load()#6 /var/www/html/wp-includes/class-wp-hook.php(310): Members\Admin\Manage_Roles->load(”)#7 /var/www/html/wp-inc in /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-italian-add-on/includes/wcpdf-it-functions.php on line 14

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Caseproof

    (@caseproof)

    Hi @bklogos

    I installed WooCommerce and WooCommerce PDF Invoices Italian Add-on. Then, I edited one of the roles and could not reproduce this error. However, could you edit wp-content/plugins/members/admin/class-role-edit.php file and replace this line 245:

    do_action( 'add_meta_boxes',   get_current_screen()->id, $this->role->name );

    with this:

    do_action( 'add_meta_boxes',   get_current_screen()->id, $this->role );

    and see if that error persists?

    Let me know how it goes.

    Best

    Thread Starter bklogos

    (@bklogos)

    Hi @caseproof

    Thank you for your help.

    I made the suggested edit, and the issue persists.

    2023-09-21T14:11:13+00:00 CRITICAL Uncaught Error: Call to a member function get_meta() on string in /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-italian-add-on/includes/wcpdf-it-functions.php:14Stack trace:#0 /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-italian-add-on/includes/class-wcpdf-integration3.php(89): wcpdf_it_get_billing_invoice_type(‘administrator’)#1 /var/www/html/wp-includes/class-wp-hook.php(310): wcpdf_Integration_Italian_add_on->wcpdf_add_meta_boxes(‘shop_order’, ‘administrator’)#2 /var/www/html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array)#3 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#4 /var/www/html/wp-content/plugins/members/admin/class-role-edit.php(245): do_action(‘add_meta_boxes’, ‘members_page_ro…’, ‘administrator’)#5 /var/www/html/wp-content/plugins/members/admin/class-manage-roles.php(125): Members\Admin\Role_Edit->load()#6 /var/www/html/wp-includes/class-wp-hook.php(310): Members\Admin\Manage_Roles->load(”)#7 /var/www/html/wp-inc in /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-italian-add-on/includes/wcpdf-it-functions.php on line 14

    Plugin Author Caseproof

    (@caseproof)

    Could you provide step-by-step instructions on how to reproduce this issue as I cannot replicate it? You said that you tried to edit the user role, but does it happen for each user or a specific one? If it only persists on specific user, can you share the screenshot(s) of all capabilities for that role?

    Best

    Thread Starter bklogos

    (@bklogos)

    There is not much to explain, everything appears to work correctly, EXCEPT if I try to “edit” ANY role from the Members Roles page.

    Thread Starter bklogos

    (@bklogos)

    I did notice one odd thing.

    Regardless of the role, “shop order” is listed in the stack trace.

    #1 /var/www/html/wp-includes/class-wp-hook.php(310): wcpdf_Integration_Italian_add_on->wcpdf_add_meta_boxes('shop_order', 'editor')#1 /var/www/html/wp-includes/class-wp-hook.php(310): wcpdf_Integration_Italian_add_on->wcpdf_add_meta_boxes('shop_order', 'wpsl_store_loca...')
    I guess that has to do with the fact that woocommerce-pdf-invoices-italian-add-on would only be dealing with orders.

    Thread Starter bklogos

    (@bklogos)

    FYI

    WooCommerce PDF Invoices Italian Add-on, Update to 0.7.3. of today, seems to have resolved the issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘fatal-error while trying to edit role’ is closed to new replies.