• Resolved supawiz6991

    (@supawiz6991)


    Hello,
    I wanted to report a bug to you that we discovered and perhaps you will implement our fix (or perhaps refactor your code) to permanently resolve the issue.

    Plugins Involved:
    Tablepress
    Relevanssi

    Symptoms: When both of those plugins are enabled at the same time it causes Windows Live Writer to receive and error 500 when try to do anything with the site.

    What we found: It appears that for some reason the Relevanssi plugin is triggering the update functions in class-controller.php. Additionally, when this occurs the $model_options variable is returning no value (null) as the Relevanssi plugin is triggering it and not Tablepress.

    How did we work around this?:
    Our work around was to add the following null check at lines 78 and 89:
    if (!isset(TablePress::$model_options)) {
    return;
    }

    Stack Trace:

    [08-Feb-2017 14:30:17 UTC] PHP Fatal error: Call to a member function get() on null in C:\xampp\htdocs\c-flex.dev\wp-content\plugins\tablepress\classes\class-controller.php on line 89

    [08-Feb-2017 14:30:17 UTC] PHP Stack trace:

    [08-Feb-2017 14:30:17 UTC] PHP 1. {main}() C:\xampp\htdocs\c-flex.dev\xmlrpc.php:0

    [08-Feb-2017 14:30:17 UTC] PHP 2. wp_xmlrpc_server->serve_request() C:\xampp\htdocs\c-flex.dev\xmlrpc.php:84

    [08-Feb-2017 14:30:17 UTC] PHP 3. IXR_Server->IXR_Server($callbacks = *uninitialized*, $data = *uninitialized*, $wait = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-xmlrpc-server.php:197

    [08-Feb-2017 14:30:17 UTC] PHP 4. IXR_Server->__construct($callbacks = *uninitialized*, $data = *uninitialized*, $wait = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\IXR\class-IXR-server.php:35

    [08-Feb-2017 14:30:17 UTC] PHP 5. IXR_Server->serve($data = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\IXR\class-IXR-server.php:27

    [08-Feb-2017 14:30:17 UTC] PHP 6. IXR_Server->call($methodname = *uninitialized*, $args = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\IXR\class-IXR-server.php:65

    [08-Feb-2017 14:30:17 UTC] PHP 7. wp_xmlrpc_server->mw_newPost($args = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\IXR\class-IXR-server.php:115

    [08-Feb-2017 14:30:17 UTC] PHP 8. wp_insert_post($postarr = *uninitialized*, $wp_error = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-xmlrpc-server.php:5101

    [08-Feb-2017 14:30:17 UTC] PHP 9. do_action($tag = *uninitialized*, $arg = *uninitialized*, *uninitialized*, *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\post.php:3516

    [08-Feb-2017 14:30:17 UTC] PHP 10. WP_Hook->do_action($args = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\plugin.php:453

    [08-Feb-2017 14:30:17 UTC] PHP 11. WP_Hook->apply_filters($value = *uninitialized*, $args = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-hook.php:323

    [08-Feb-2017 14:30:17 UTC] PHP 12. call_user_func_array:{C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-hook.php:300}(*uninitialized*, *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-hook.php:300

    [08-Feb-2017 14:30:17 UTC] PHP 13. relevanssi_insert_edit($post_id = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-hook.php:300

    [08-Feb-2017 14:30:17 UTC] PHP 14. relevanssi_publish($post = *uninitialized*, $bypassglobalpost = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-content\plugins\relevanssi\lib\indexing.php:637

    [08-Feb-2017 14:30:17 UTC] PHP 15. relevanssi_index_doc($indexpost = *uninitialized*, $remove_first = *uninitialized*, $custom_fields = *uninitialized*, $bypassglobalpost = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-content\plugins\relevanssi\lib\indexing.php:613

    [08-Feb-2017 14:30:17 UTC] PHP 16. TablePress::load_controller($controller = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-content\plugins\relevanssi\lib\indexing.php:354

    [08-Feb-2017 14:30:17 UTC] PHP 17. TablePress::load_class($class = *uninitialized*, $file = *uninitialized*, $folder = *uninitialized*, $params = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-content\plugins\tablepress\classes\class-tablepress.php:261

    [08-Feb-2017 14:30:17 UTC] PHP 18. TablePress_Frontend_Controller->__construct(*uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-content\plugins\tablepress\classes\class-tablepress.php:208

    [08-Feb-2017 14:30:17 UTC] PHP 19. TablePress_Controller->__construct() C:\xampp\htdocs\c-flex.dev\wp-content\plugins\tablepress\controllers\controller-frontend.php:37

    [08-Feb-2017 14:30:17 UTC] PHP 20. TablePress_Controller->plugin_update_check() C:\xampp\htdocs\c-flex.dev\wp-content\plugins\tablepress\classes\class-controller.php:69

    Stack Trace #2:

    [08-Feb-2017 14:31:56 UTC] PHP Fatal error: Call to a member function get() on null in C:\xampp\htdocs\c-flex.dev\wp-content\plugins\tablepress\classes\class-controller.php on line 78

    [08-Feb-2017 14:31:56 UTC] PHP Stack trace:

    [08-Feb-2017 14:31:56 UTC] PHP 1. {main}() C:\xampp\htdocs\c-flex.dev\xmlrpc.php:0

    [08-Feb-2017 14:31:56 UTC] PHP 2. wp_xmlrpc_server->serve_request() C:\xampp\htdocs\c-flex.dev\xmlrpc.php:84

    [08-Feb-2017 14:31:56 UTC] PHP 3. IXR_Server->IXR_Server($callbacks = *uninitialized*, $data = *uninitialized*, $wait = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-xmlrpc-server.php:197

    [08-Feb-2017 14:31:56 UTC] PHP 4. IXR_Server->__construct($callbacks = *uninitialized*, $data = *uninitialized*, $wait = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\IXR\class-IXR-server.php:35

    [08-Feb-2017 14:31:56 UTC] PHP 5. IXR_Server->serve($data = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\IXR\class-IXR-server.php:27

    [08-Feb-2017 14:31:56 UTC] PHP 6. IXR_Server->call($methodname = *uninitialized*, $args = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\IXR\class-IXR-server.php:65

    [08-Feb-2017 14:31:56 UTC] PHP 7. wp_xmlrpc_server->mw_newPost($args = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\IXR\class-IXR-server.php:115

    [08-Feb-2017 14:31:56 UTC] PHP 8. wp_insert_post($postarr = *uninitialized*, $wp_error = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-xmlrpc-server.php:5101

    [08-Feb-2017 14:31:56 UTC] PHP 9. do_action($tag = *uninitialized*, $arg = *uninitialized*, *uninitialized*, *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\post.php:3516

    [08-Feb-2017 14:31:56 UTC] PHP 10. WP_Hook->do_action($args = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\plugin.php:453

    [08-Feb-2017 14:31:56 UTC] PHP 11. WP_Hook->apply_filters($value = *uninitialized*, $args = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-hook.php:323

    [08-Feb-2017 14:31:56 UTC] PHP 12. call_user_func_array:{C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-hook.php:300}(*uninitialized*, *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-hook.php:300

    [08-Feb-2017 14:31:56 UTC] PHP 13. relevanssi_insert_edit($post_id = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-includes\class-wp-hook.php:300

    [08-Feb-2017 14:31:56 UTC] PHP 14. relevanssi_publish($post = *uninitialized*, $bypassglobalpost = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-content\plugins\relevanssi\lib\indexing.php:637

    [08-Feb-2017 14:31:56 UTC] PHP 15. relevanssi_index_doc($indexpost = *uninitialized*, $remove_first = *uninitialized*, $custom_fields = *uninitialized*, $bypassglobalpost = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-content\plugins\relevanssi\lib\indexing.php:613

    [08-Feb-2017 14:31:56 UTC] PHP 16. TablePress::load_controller($controller = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-content\plugins\relevanssi\lib\indexing.php:354

    [08-Feb-2017 14:31:56 UTC] PHP 17. TablePress::load_class($class = *uninitialized*, $file = *uninitialized*, $folder = *uninitialized*, $params = *uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-content\plugins\tablepress\classes\class-tablepress.php:261

    [08-Feb-2017 14:31:56 UTC] PHP 18. TablePress_Frontend_Controller->__construct(*uninitialized*) C:\xampp\htdocs\c-flex.dev\wp-content\plugins\tablepress\classes\class-tablepress.php:208

    [08-Feb-2017 14:31:56 UTC] PHP 19. TablePress_Controller->__construct() C:\xampp\htdocs\c-flex.dev\wp-content\plugins\tablepress\controllers\controller-frontend.php:37

    Final Words:

    I’ll be reporting this bug to the Relevanssi plugin Dev’s as well to see if they can figure out why their plugin is calling a function in yours.

    • This topic was modified 8 years, 1 month ago by supawiz6991.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Their plugin is calling a TablePress function in order to be able to parse Shortcodes in the admin area (for their search), as TablePress only registers them on the frontend side.

    TablePress itself does nothing for XML-RPC requests (see https://github.com/TobiasBg/TablePress/blob/master/classes/class-tablepress.php#L111 ).

    I’m not sure where this should be tackled, but I don’t really think that it’s TablePress. Do you get this error when Relevanssi is deactivated?

    And bailing out if that object does not exist is also not nice. If all all, the object should be created in that case.

    Regards,
    Tobias

    Thread Starter supawiz6991

    (@supawiz6991)

    Thanks for the quick reply!

    When the Relevanssi plugin is disabled the error goes away.

    I did post in the support forum for that plugin as well since our troubleshooting pointed to them as the root cause (which your troubleshooting confirms).

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    that’s good, thanks! Maybe they can add some extra handling for XML-RPC requests as well.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Update function bug’ is closed to new replies.