Support » Plugin: WordPress SEO Plugin - Rank Math » CMB2_Hookup Errors in 1.0.41.2

  • Resolved Daniel Hendricks

    (@hendridm)


    • WordPress: 5.3.2
    • PHP: 7.4.4
    • nginx 1.16.1
    • Rank Math: >=1.0.40.1

    I’m still getting the CMB2 errors when I upgrade to any version after 1.0.40 (including 1.0.41.2, latest as of this post). Normally, I would just keep the old version, but WordFence just sent me this critical security advisory:
    https://www.wordfence.com/blog/2020/03/critical-vulnerabilities-affecting-over-200000-sites-patched-in-rank-math-seo-plugin/

    Not sure what to do about that. I’m running the plugin on some very large client sites. Several similar to this in the error logs:

    2020/03/31 13:01:21 [error] 1234#1234: FastCGI sent in stderr: "PHP message: PHP Warning: include_once(/var/www/somesite.com/wp-content/plugins/seo-by-rank-math/vendor/cmb2/cmb2/includes/CMB2_Hookup.php): failed to open stream: No such file or directory in /var/www/somesite.com/wp-content/plugins/seo-by-rank-math/vendor/cmb2/cmb2/includes/helper-functions.php on line 44PHP message: PHP Warning: include_once(): Failed opening '/var/www/somesite.com/wp-content/plugins/seo-by-rank-math/vendor/cmb2/cmb2/includes/CMB2_Hookup.php' for inclusion (include_path='.:/usr/share/php') in /var/www/somesite.com/wp-content/plugins/seo-by-rank-math/vendor/cmb2/cmb2/includes/helper-functions.php on line 44PHP message: PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'CMB2_Hookup' not found in /var/www/somesite.com/wordpress/wp-includes/class-wp-hook.php on line 288PHP message: PHP Warning: include_once(/var/www/somesite.com/wp-content/plugins/seo-by-rank-math/vendor/cmb2/cmb2/includes/CMB2_Hookup.php): failed to open stream: No such file or directory in /var/www/somesite.com/wp-content/plugins/seo-by-rank-math/vendor/cmb2/cmb2/includes/helper-functions.php on line 44PHP message: PHP Warning: include_once(): Failed opening '/var/www/somesite.com/wp-content/plugins/seo-by-rank-math/vendor/cmb2/cmb2/includes/CMB2_Hookup.php' for inclusion (include_path='.:/usr/share/php') in /var/www/somesite.com/wp-content/plugins/seo-by-rank-math/vendor/cmb2/cmb2/includes/helper-functions.php on line 44PHP message: PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'CMB2_Hookup' not found in /var/www/somesite.com/wordpress/wp-includes/class-wp-hook.php on line 288" while reading response header from upstream, client: 172.10.0.10, server: staging.somesite.com, request: "POST /wordpress/wp-admin/admin-ajax.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "staging.somesite.com", referrer: "https://staging.somesite.com/wordpress/wp-admin/post.php?post=123456&ac

    Oddly, I’m not getting the errors in my local dev environment (or even a warning – I have XDebug enabled locally), but when I push it to the staging sites, I get a fatal “The site is experiencing technical difficulties” (or whatever it says) whenever I try to edit a post.

    I might try installing the CMB2 plugin as a temporary measure, but this isn’t the most desired option.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Rank Math

    (@rankmath)

    Hello @hendridm

    Thank you for your message and sorry for the issue you are facing.

    This seems like a caching issue as the issue was fixed immediately in an hour.

    Can you please try to clear all the caches, server, browser, website, and Cloudflare (if you are using it)?

    This should not be happening.

    Please let us know.

    Can you please try to clear all the caches, server, browser, website, and Cloudflare (if you are using it)?

    I am connecting directly to the instance’s private IP – no caching or proxying (including nginx proxy, Cloudflare, etc), except for Redis and opcache. I flushed the Redis cache and restarted PHP-FPM but it made no difference. I also tried:

    • Completely deleting and re-installing the plugin by downloading the 1.0.41.2 distribution ZIP from here and extracting it manually. I still got the error.
    • Disabling all plugins except Rank Math 1.0.41.2, flushing Redis, restart PHP-FPM. Same error.

      I was able to “fix” it by installing the cmb2/cmb2 composer library to the theme. This eliminated the error. As a test, I then reverted/removed the addition of cmb2/cmb2 and the error came back.

      UPDATE: As I type this, I just noticed the problem – When I pull the plugin from git, is see that vendor/cmb2/cmb2/includes/CMB2_hookup.php has a lowercase ‘H’ (CMB2_hookup instead of CMB2_Hookup). However, when I look at the repo and/or extract the ZIP on macOS or the Linux instance, the ‘H’ is capitalized.

      I suspect that git must is holding on to a lowercase filename reference and that is causing it. I will try deleting it, clear the git cache, reinstalling it and see if it fixes it (it probably will). This appears to be a git (or possibly local file system issue, but most likely git) and is not an issue with Rank Math.

      Thank you,
      Daniel

    Yup, that fixed it. I renamed the file and blew away the git cache.

    Plugin Author Rank Math

    (@rankmath)

    Hello @hendridm

    Glad you got it sorted.

    Please feel free to reach out to us in case you need any other assistance. We are here to help.

    Take care!

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