Random characters inserted into cached files
-
I have been using Zen Cache Pro (and Quick Cache Pro before that) for over a year without issue. Since updating to ZenCache version 150716 and WordPress 4.2.3, a nonsense character (‘�’) is being randomly inserted into cached pages and posts. (WordPress and the plugin were updated close together and before the issue was noted so it’s hard to say which update caused the issue to appear.)
The character appears in multiple places throughout the post content with no apparent pattern – sometimes a few times per page, sometimes dozens of times. (Deleting and recreating the cache for a page results in the characters returning in exactly the same places, however.)
It seems like a character encoding issue, but the post content in the database does not contain these characters, and they don’t appear when a logged-in user views an uncached version of the page. They are only present in the HTML cache files created by ZenCache.
Thus while the outward appearance of the problem is similar to various issues with UTF-8 encoding on WordPress that I found Googling, none of the solutions presented there work because they relate to issues with character encoding in the database.
The issue can be seen clearly on this page:
http://www.biggervet.com/pet-behavior/But all posts and pages are affected to varying degrees.
WordPress version is 4.2.3.
Server is Windows Server 2012 Version 6.2 with IIS version 8.0.9200.16384
PHP Version 5.4.24Encoding settings in wp-config.php:
/** Database Charset to use in creating database tables. */
define(‘DB_CHARSET’, ‘utf8’);/** The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ”);Charset meta tag in header of all site pages (cached and uncached):
<meta charset=”UTF-8″/>Charset on the wp_ database tables is UTF-8. (Verified despite the problem appearing to be unrelated to the database.)
The topic ‘Random characters inserted into cached files’ is closed to new replies.