• Resolved agueritz

    (@agueritz)


    Hi,
    I am getting a fatal error which taking down the admin page of the site when updating the plugin to v2.2.3. I have a Pro licence.
    Log file shows this:

    [13-Jul-2022 16:08:13 UTC] PHP Warning:  sprintf(): Too few arguments in <website folders>/public_html/wp-content/plugins/w3-total-cache/Licensing_Plugin_Admin.php on line 197
    [13-Jul-2022 16:08:13 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function wp_kses(), 1 passed in <website folders>/public_html/wp-content/plugins/w3-total-cache/Licensing_Plugin_Admin.php on line 197 and at least 2 expected in <website folders>/public_html/wp-includes/kses.php:712
    Stack trace:
    #0 <website folders>/public_html/wp-content/plugins/w3-total-cache/Licensing_Plugin_Admin.php(197): wp_kses(false)
    #1 <website folders>/public_html/wp-includes/class-wp-hook.php(307): W3TC\Licensing_Plugin_Admin->admin_notices('')
    #2 <website folders>/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #3 <website folders>/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #4 <website folders>/public_html/wp-admin/admin-header.php(303): do_action('admin_ in <website folders>/public_html/wp-includes/kses.php on line 712

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @agueritz

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    We are aware of this problem in some cases, and we’ve already fixed the issue which will be added to the upcoming release.
    Please check out our GitHub repository for more details and if convenient, change the lines in wp-contnent/plugins/w3-total-cache/Licensing_Plugin_Admin.php, or revert back to the previous version and wait for the upcoming release.
    Thanks!

    Hello,

    We are having the same issue, I have tried changing the mentioned lines but was still getting a fatal error using PHP 8.0.21.

    Besides the missed second parameter to wp_kses() there was also missing a third argument for the sprintf function (starting at line 196). The closing shouldn’t be in the second argument but should be added seperately as the third argument.

    I have done this myself and the fatal error isn’t showing anymore.

    @vmarko forgive me my curiosity but why are you not releasing another ‘patch’ release immediately with bugfix for issue which is PITA because it takes down whole admin panel?

    Linked github issue shows that it was fixed 2 weeks ago

    @cdsg I’m not so sure it is fixed – the linked commit/issue fixes the call to wp_kses(), but hasn’t fixed the ArgumentCountError thrown by sprintf().

    https://github.com/W3EDGE/w3-total-cache/blob/721dedc095412e7c4321ee56bb200b07eb43f2d6/Licensing_Plugin_Admin.php#L196

    
    PHP Fatal error:  Uncaught ArgumentCountError: 3 arguments are required, 2 given in /var/www/html/wp-content/plugins/w3-total-cache/Licensing_Plugin_Admin.php:197
    2022-07-20T07:54:31.553472336Z Stack trace:
    2022-07-20T07:54:31.553475502Z #0 /var/www/html/wp-content/plugins/w3-total-cache/Licensing_Plugin_Admin.php(197): sprintf('The W3 Total Ca...', '<a class="w3tc_...')
    2022-07-20T07:54:31.553477669Z #1 /var/www/html/wp-includes/class-wp-hook.php(307): W3TC\Licensing_Plugin_Admin->admin_notices('')
    2022-07-20T07:54:31.553479669Z #2 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    2022-07-20T07:54:31.553481377Z #3 /var/www/html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    2022-07-20T07:54:31.553483044Z #4 /var/www/html/wp-admin/admin-header.php(303): do_action('admin_notices')
    2022-07-20T07:54:31.553484669Z #5 /var/www/html/wp-admin/plugins.php(605): require_once('/var/www/html/w...')
    2022-07-20T07:54:31.553486294Z #6 {main}
    2022-07-20T07:54:31.553488002Z   thrown in /var/www/html/wp-content/plugins/w3-total-cache/Licensing_Plugin_Admin.php on line 197
    

    I’ve opened a pull request with the fix.

    https://github.com/W3EDGE/w3-total-cache/pull/541

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @willperring

    Thank you for taking the time to create a PR. It’s being reviewed by the DEV team.
    @cdsg @9degrees Thank you for your comments.
    We are aware of this and once all the fixes are in place the upcoming version will be released.
    Thanks!

    Thanks for the status info. I am getting the same error. The issue seems to be on a Pro version only. I have one website for which I have not yet purchased the Pro version, and there is no error after I log into the admin dashboard. But when it comes to the Pro version, there is not much you can do with the WordPress admin pages right now because the error practically blocks the usage of it. Looking forward to the fix.

    @mraassin that’s what inspired my curiosity and my question above – paying customers get broken admin panel, no fix for it for weeks – interesting, interesting..

    @cdsg Yeah, I understand your point. It is unfortunate to get such a significant bug on a plugin that prevents the whole WordPress admin usage for days or even weeks. Maybe it’s the holiday season that causes delay, who knows. But still, W3TC is the best cache plugin I have come across up to this point. With this plugin, I am able to get a page speed performance of 100/100 on some of my company pages on both mobile and desktop. And regardless of the error, I am still inclined to offer the paid version of this plugin to my new customers, too. Of course, I hope it will be fixed before that.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @cdsg @mraassin

    Once again, thank you for your patience and I am sorry about the problem you are experiencing,
    Due to the code changes made to comply with the code standards, in some environments (not all) this kind of issue happens.
    We’ve made a lot of tests, and all the tests were good, however as you may understand, there are a lot of environments to be taken into consideration.

    Once again I apologize for any inconvenience. We are working on some other fixes and this one will be included in the upcoming release.
    In the meantime, you can get the updated file with fixes and and change the existing one /wp-content/plugins/w3-total-cache/Licensing_Plugin_Admin.php from
    here

    Once again thank you for your patience.

    • This reply was modified 3 years, 10 months ago by Marko Vasiljevic. Reason: link added

    Hello @vmarko

    Thank you for the updated file. After replacing the Licensing_Plugin_Admin.php file with a new one and resetting my license, everything seemed to work out. I am now able to access the dashboard with the admin credentials.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @mraassin

    Thank you for your feedback.
    I am glad to know that this fixes the issue.
    Thanks!

    Hello @vmarko,

    No problem, and thanks again for the fix!

    This issue persist, provided fix works.

    When is this fix scheduled for release?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @pimschaaf @mraassin @cdsg @willperring @9degrees

    Thank you all for your patience.
    Just to let you know that we have released version 2.2.4, which includes a fix for this problem.
    Once again, thank you for bringing this to our attention and for your patience.

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

The topic ‘Fatal error with v2.2.3 update’ is closed to new replies.