• Resolved pablorq

    (@pablorq)


    The plugin has a fatal crash when trying to select a template.

    Steps to reproduce it:
    – Fresh install of WordPress 5.8
    – Install the Pricing Table Plugin plugin
    – Start the tour
    – Click ‘Next’ button to clone selected template.
    – Fatal error!

    More info:
    WordPress version 5.8
    Current theme: Twenty Twenty-One (version: 1.4)
    Current plugin: ARPrice Lite (version 3.5)
    PHP version 7.4.20

    Error Details
    =============
    An error of type E_ERROR was caused in line 2256 of the file /var/www/html/wp-content/plugins/arprice-responsive-pricing-table/arprice-responsive-pricing-table.php. Error message: Uncaught Error: Cannot use object of type WP_Error as array in /var/www/html/wp-content/plugins/arprice-responsive-pricing-table/arprice-responsive-pricing-table.php:2256
    Stack trace:
    #0 /var/www/html/wp-includes/class-wp-hook.php(292): ARPlite_PricingTable->arplite_enqueue_inline_editor_js(”)
    #1 /var/www/html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(”, Array)
    #2 /var/www/html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /var/www/html/wp-content/plugins/arprice-responsive-pricing-table/arprice-responsive-pricing-table.php(2096): do_action(‘arplite_enqueue…’)
    #4 /var/www/html/wp-includes/class-wp-hook.php(292): ARPlite_PricingTable->set_js(‘toplevel_page_a…’)
    #5 /var/www/html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
    #6 /var/www/html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #7 /var/www/html/wp-admin/admin-header.php(102): do_action(‘admin_enqueue_s…’, ‘toplevel_page_a…’)
    #8 /var/www/html/wp-admin/admin.php(239): require_once(‘`

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author reputeinfosystems

    (@reputeinfosystems)

    Hello,

    Kindly share your website URL to check this issue further.

    Thanks,

    Plugin Author reputeinfosystems

    (@reputeinfosystems)

    Hello

    I mark this ticket as resolved as I didn’t hear from you for more than 24 hours.

    But no worries we are still here to help, feel free to reply back on this ticket whenever you are available and we will get back to you.

    Have a wonderful day.

    Best Regards,
    Repute Infosystems Team.

    Thread Starter pablorq

    (@pablorq)

    Hello,

    This was tested on a development setup with WordPress running on a Docker container.

    The URL was http://localhost:8080/

    Regards,

    Plugin Author reputeinfosystems

    (@reputeinfosystems)

    Hello,

    Since it’s a local URL, we can’t check it further. I recommend you please upload the ARPrice to the live website and then check again and let me know if it’s working or not.

    Thanks

    Thread Starter pablorq

    (@pablorq)

    Hello,

    On a live website, it works.

    But I need it working on a local or internal website, for developing stage before going into production.

    Can I run some debugs to send the data to you?

    Regards,

    Plugin Author reputeinfosystems

    (@reputeinfosystems)

    Hello,

    We’ve tried to regenerate the issue on our local development server but it’s working fine there.

    For further debugging, please follow the below steps.

    1. Open the file: wp-content/plugins/arprice-responsive-pricing-table/arprice-responsive-pricing-table.php

    2. Go to line no. 2254

    3. You’ll see the code $response = wp_remote_get( $content_url, $arguments );

    4. After this line, add this code: echo "

    ";print_r( $response );echo "

    ";

    5. Now activate the plugin. You might see the same error again but before that you’ll see some extra result as well.

    6. Please let us know the result so we can check it further

    Thanks

    Thread Starter pablorq

    (@pablorq)

    Hello,

    This is the echo:
    WP_Error Object ( [errors] => Array ( [http_request_failed] => Array ( [0] => cURL error 7: Failed to connect to localhost port 8110: Connection refused ) ) [error_data] => Array ( ) [additional_data:protected] => Array ( ) )

    Now I’m testing a new install on a different port (8110) and is has the same behaviour.

    Regards

    Thread Starter pablorq

    (@pablorq)

    Hello,

    This is the echo for the vars used in the call:

    
    content_url:http://localhost:8110/wp-content/plugins/arprice-responsive-pricing-table/core/views/arplite_column_background_color_min.json
    arguments:Array ( [sslverify] => )
    WP_Error Object ( [errors] => Array ( [http_request_failed] => Array ( [0] => cURL error 7: Failed to connect to localhost port 8110: Connection refused ) ) [error_data] => Array ( ) [additional_data:protected] => Array ( ) ) 
    

    The json object in http://localhost:8110/wp-content/plugins/arprice-responsive-pricing-table/core/views/arplite_column_background_color_min.json is available.

    Hope it can help.

    Regards

    • This reply was modified 4 years, 9 months ago by pablorq.
    Thread Starter pablorq

    (@pablorq)

    Found!

    It is not a plugin related issue, but a Docker related problem.

    When cURL, through wp_remote_get, tries to get http://localhost:8110 is looking for “localhost” inside the container, which has the webserver running on the port 80, not the 8110.

    The http://localhost:8110 URL is reached at host level and, as the error details says, cURL fails to connect.

    Now it is solved.

    Thank you for your help!

    Kind regards.

    Plugin Author reputeinfosystems

    (@reputeinfosystems)

    Hello,

    Glad to know that we could assist you and the problem has been solved. Please feel free to contact us again in the future there is anything else.

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Fatal error – Cannot use object of type WP_Error as array’ is closed to new replies.