WordPress.org

Ready to get started?Download WordPress

Forums

[$$] W3TC Directory & Query String Blocking Not Working (8 posts)

  1. MrBluesummers
    Member
    Posted 3 years ago #

    Hi there,

    I'm paying $10 via PayPal to anyone who can solve this one.

    [PROBLEM]
    W3TC is ignoring the regular expressions that I'm using to block page caching, object caching, and database caching. I need W3TC to totally ignore these pages because it's causing problems with my Global Translator plug-in.

    [EXAMPLES]
    Don't Block URLs like this:

    http://www.domain.com
    http://www.domain.com/category/stuff
    http://www.domain.com/1492/stuff/this-is-a-post

    Block URLs like this:

    http://www.domain.com/de/
    http://www.domain.com/it/
    http://www.domain.com/de/category/stuff
    http://www.domain.com/it/1492/stuff/this-is-a-post
    http://www.domain.com/?tag=things
    http://www.domain.com/category/stuff?translate=yes-please&language=it

    [SO FAR]
    I've tried a whole mess of regex codes to keep W3TC to back off of certain pages but it's not working. I've set up an example at http://sandbox.mrbluesummers.com where I have only W3TC, Global Translator Pro, and XML Sitemaps running. This is WordPress 3.0.1.

    I can tell the plug-in is still active both on the pre-translated pages (the query string URL) and the post-translated pages (the "language directory") based on the comments at the end of the HTML that W3TC inserts.

  2. MrBluesummers
    Member
    Posted 3 years ago #

    [Bump] Make it $15.

  3. Frederick Townes
    Member
    Posted 3 years ago #

    For:
    http://www.domain.com/de/
    http://www.domain.com/it/
    http://www.domain.com/de/category/stuff
    http://www.domain.com/it/1492/stuff/this-is-a-post

    ^(de|it)

    This will work only for basic/memory cache because enhanced caching method doesn't support query strings.

    For:
    http://www.domain.com/?tag=things
    http://www.domain.com/category/stuff?translate=yes-please&language=it

    \?tag=
    translate=.*&language=
  4. MrBluesummers
    Member
    Posted 3 years ago #

    Hey Frederick,

    I entered the regex codes you provided. No dice. Take a look:
    http://sandbox.mrbluesummers.com/de/page-2/

    This was a fresh translation; not canned. Any other ideas?

  5. Frederick Townes
    Member
    Posted 3 years ago #

    Can you submit a bug submission form from the support tab of the plugin so I can take a better look at your case?

  6. carcus
    Member
    Posted 3 years ago #

    Hi, sorry to bother your old thread. I too am having an issue with a particular page being cached.

    The url in question is this:

    http://domain.com/blog?downloadid=somelongrandomkey

    If I read your post right to prevent w3tc from caching this query I have to switch to basic caching? I've tried using downloadid= under "Never cache the following pages" but haven't had it work so well.

    I have everything enabled except for CDN on the general page. If you need more specifics let me know!

    If I get this solved the community over at wp-ecommerce (getshopped.org) would really appreciate it. As of right now people with downloadable products are removing w3tc from their plugins because it is breaking the download link. Thanks in advance and thanks so much for w3tc it has done wonders to a heavy traffic site!

  7. carcus
    Member
    Posted 3 years ago #

    To add there is also an error from trying to get the zipped download if this helps:

    [Fri Oct 08 18:04:46 2010] [error] [client xx.xx.xx.xx] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 51352484 bytes) in /var/www/vhosts/domain.com/httpdocs/blog/wp-content/plugins/w3-total-cache/inc/define.php on line 233

    Which is this function:

    /**
     * Check if content is HTML or XML
     *
     * @param string $content
     * @return boolean
     */
    function w3_is_xml(&$content)
    {
        return (stristr($content, '<?xml') !== false || stristr($content, '<html') !== false);
    }

    It wouldn't make sense to increase the memory limit in php.ini. Maybe there is some code work around? Thanks again.

  8. Frederick Townes
    Member
    Posted 3 years ago #

    Unsure what your settings are, but you indeed would need to increase your memory limit as the error indicates or not cache that page by checking the option "Cache URIs with query string variables" or using disk enhanced page caching.

Topic Closed

This topic has been closed to new replies.

About this Topic