WP Fastest Cache: breaking PHP code in template file, ignoring exclude settings
-
In trying to troubleshoot a website, I uploaded a contact form theme template to a website using WP Fastest Cache (0.8.9.7). I set up a test page with the permalink of “test-contact”.
When trying to view the page, it spat out the WordPress “The site is experiencing technical difficulties.” message. I enabled the debugging messages so that I could find the issue, and it reported that one of the files in the cache was causing the issue.
So, opening the cache file, I see the issue is that WP Fastest Cache is modifying the content of the template, and erroneously replacing inline PHP code with an HTML 4.1 close entity “/>”.
<div class="input text required"><label for="ContactName">Name</label><input name="data[Contact][name]" type="text" id="ContactName"<?php if ($nameerror) echo ' class="form_error"';?><?php if ($name) echo ' value="'.htmlentities($name).'"';?> /></div>
is destroyed by WP Fastest Cache which changes the code to:
<div class="input text required"><label for="ContactName">Name</label><input name="data[Contact][name]" type="text" id="ContactName"<?php if ($nameerror) echo ' class="form_error"';? /><?php if ($name) echo ' value="'.htmlentities($name).'"'?> /></div>
As you can see, the “;?><?php” is changed to “;? /><?php”.
On top of this error, it refuses to exclude this page. I’ve tried adding exclude filters for the URI “test-contact/”:
Is Equal To: test-contact
Starts With: test
Contains: test
Pages
Contains: contactNone of these prevent the caching. Even with it claiming that all pages are excluded, it still caches this page.
I also tried updating to the latest version 0.8.9.8, but the issues were the same.
- The topic ‘WP Fastest Cache: breaking PHP code in template file, ignoring exclude settings’ is closed to new replies.