• Resolved mayhemer

    (@mayhemer)


    Right after update to version 0.9.2.11 AND deleting the page cache pages started to be blank.

    With define(‘WP_DEBUG’, true); in wp-config.php I’m getting content:
    Fatal error: Call to undefined function apply_filters() in <path>\wp-content\plugins\w3-total-cache\inc\define.php on line 119

    This is probably conflict with WPML, my site is multilingual and is using subdir (/cs/) to identify language. Pages in the root (i.e. under /) are OK.

    All pages under /cs/ are suffering from this bug.

    Probably a regression from your recent “sub folder” fix?

    Tested with apache+PHP 5.3.21 and litespeed+PHP 5.3.23 servers, same behavior.

    Other plugins installed, those I believe could be conflicting (there are more, less significant):

    – Better WP Security 3.5.2
    – W3 Total Cache W3 Total Cache 0.9.2.11
    – WooCommerce 2.0.10
    – WooCommerce Multilingual 2.3.2
    – WPML Multilingual CMS 2.7.1
    – WPML String Translation 1.6.1
    – WPML Translation Management 1.4.4
    – WP No Category Base – WPML compatible 1.1.0

    Current workaround, disabling W3 Total Cache. Fun is that the site doesn’t seems significantly slower 😀

    http://wordpress.org/extend/plugins/w3-total-cache/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter mayhemer

    (@mayhemer)

    I’ve patched define.php as:

    function w3_can_print_comment(&$buffer) {
    + print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS));
    + die(‘—‘);
    return apply_filters(‘w3tc_can_print_comment’, w3_is_xml($buffer) && !defined(‘DOING_AJAX’));
    }

    And here is content with backtrace:

    Array
    (
    [0] => Array
    (
    [file] => <path>\wp-content\plugins\w3-total-cache\lib\W3\PgCache.php
    [line] => 301
    [function] => w3_can_print_comment
    )

    [1] => Array
    (
    [file] => <path>\wp-content\plugins\w3-total-cache\lib\W3\PgCache.php
    [line] => 202
    [function] => process_cached_page
    [class] => W3_PgCache
    [type] => ->
    )

    [2] => Array
    (
    [file] => <path>\wp-content\advanced-cache.php
    [line] => 35
    [function] => process
    [class] => W3_PgCache
    [type] => ->
    )

    [3] => Array
    (
    [file] => <path>\wp-settings.php
    [line] => 58
    [args] => Array
    (
    [0] => <path>\wp-content\advanced-cache.php
    )

    [function] => include
    )

    [4] => Array
    (
    [file] => <path>\wp-config.php
    [line] => 106
    [args] => Array
    (
    [0] => <path>\wp-settings.php
    )

    [function] => require_once
    )

    [5] => Array
    (
    [file] => <path>\wp-load.php
    [line] => 29
    [args] => Array
    (
    [0] => <path>\wp-config.php
    )

    [function] => require_once
    )

    [6] => Array
    (
    [file] => <path>\wp-blog-header.php
    [line] => 12
    [args] => Array
    (
    [0] => <path>\wp-load.php
    )

    [function] => require_once
    )

    [7] => Array
    (
    [file] => <path>\index.php
    [line] => 17
    [args] => Array
    (
    [0] => <path>\wp-blog-header.php
    )

    [function] => require
    )

    )

    W/o DEBUG_BACKTRACE_IGNORE_ARGS I can see the content is generated as expected, the whole page content is carried in one of args.

    Plugin Contributor Frederick Townes

    (@fredericktownes)

    Thanks, this issue is already addressed in the next release.

    “Thanks, this issue is already addressed in the next release.”

    Frederick, I’m not about to tell anyone what they should or should not do with their (pretty darned genius) code but I’m sure there are a great deal of us who would willingly pay a few quid for you or your partners to better maintain this plugin.

    … That’s not a criticism, just a suggestion. Have a :)!

    sanchothefat, meanwhile, has the answer: turn off (uncheck) “Page Debug” on the Debug Mode panel, on the General page …

    http://wordpress.org/support/topic/fatal-error-when-using-memcache-for-page-cache

    Plugin Contributor Frederick Townes

    (@fredericktownes)

    @olly connelly how do you suggest I set that up? We work full time on the project and there’s an enormous amount of R&D going into every release. And unfortunately, it’s not clear to people that forums are the most unproductive way to support the project.

    I just realised that is actually the problem I have when Page Cache Debug Mode is ON. (same error message from wp_debug).

    However, when Page Cache debug is off, page cache doesn’t seem to work at all. The pages are being saved in my files, but they’re not being served, I get a status “200 Ok” in the first of the network requests list on firebug.

    Good to know issue with debug mode is already being adressed, but was this second issue expected to happen as well or is it just me?

    Edit: by the way, also if I load any page from a secondary domain I have (which is not the one set up in the wordpress db) the page is cached and delivered fine!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error: Call to undefined function apply_filters() in define.php on line 11’ is closed to new replies.