W3TC and Incorrect Character
-
If I activate W3TC even with all the caches off; I got a character in several places. That even happens in a fresh installation (under project nami last versions) and only in Windows OS.
That character affects the rendering only in Chrome/Edge browsers.
Does anybody has face something like that?
-
Hello @codecr
I am sorry about the issue you are experiencing and I am happy to assist you with this.
Can you please share the screenshot of the issue you are experiencing, as I am not completely sure what the issue is and how it’s related to W3 Total Cache?
Please share more details about the issue you are experiencing,Thanks!
Thank you @vmarko for your response.
Hello @codecr
Thank you for sharing the information.
What you are seeing is a Hex Code that is showing Zero Width No-Break Space in your code, and the problem is with the encoding.
Not specifically the W3TC problem, but the way the template is encoded. You can try going to Performance>Page Cache>Advanced and enableDisable UTF-8 blog charset support
settings, to resolve issues with incorrect odd character encoding that may appear in cached pages.
Make sure to save all settings and purge the cache.
Thanks!Hello @vmarko
I can’t find option [Disable UTF-8 blog charset support] under page cache – advanced. :/
Hello @codecr
Thank you for the information.
Can you please change the Page Cache caching method to Disk: Enhanced in Performance>General Settings>Page Cache section?
Thanks!Hello @vmarko
Page Cache caching method is now set to Disk Enhanced, but [Disable UTF-8 blog charset support] option not appear under Page Cache – Advanced.
Why?
Hello @codecr
Thank you for your feedback.
Most likely because you are using IIS, and the rules are not applied.
Can you please share if the .htaccess is there with the W3TC Page Cache rules?
Thanks!nginx.conf
# BEGIN W3TC Page Cache cache location ~ E:/htdocs/wp-content/cache/page_enhanced.*gzip$ { gzip off; types {} default_type text/html; add_header Content-Encoding gzip; etag on; if_modified_since exact; add_header Referrer-Policy "no-referrer-when-downgrade"; } # END W3TC Page Cache cache # BEGIN W3TC Browser Cache gzip on; gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access video/webm application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel; location ~ \.(css|htc|less|js|js2|js3|js4)$ { expires 31536000s; etag on; if_modified_since exact; try_files $uri $uri/ /index.php?$args; } location ~ \.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$ { etag on; if_modified_since exact; try_files $uri $uri/ /index.php?$args; } location ~ \.(asf|asx|wax|wmv|wmx|avi|avif|avifs|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|webm|mpp|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|ogv|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|_ttf|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ { expires 31536000s; etag on; if_modified_since exact; try_files $uri $uri/ /index.php?$args; } add_header Referrer-Policy "no-referrer-when-downgrade"; # END W3TC Browser Cache # BEGIN W3TC Page Cache core set $w3tc_rewrite 1; if ($request_method = POST) { set $w3tc_rewrite 0; } if ($query_string != "") { set $w3tc_rewrite 0; } if ($request_uri !~ \/$) { set $w3tc_rewrite 0; } if ($http_cookie ~* "(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle)") { set $w3tc_rewrite 0; } if ($http_user_agent ~* "(W3\ Total\ Cache)") { set $w3tc_rewrite 0; } set $w3tc_preview ""; if ($http_cookie ~* "(w3tc_preview)") { set $w3tc_preview _preview; } set $w3tc_enc ""; if ($http_accept_encoding ~ gzip) { set $w3tc_enc _gzip; } if (!-f "$document_rootE:/htdocs/wp-content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_preview.html$w3tc_enc") { set $w3tc_rewrite 0; } if ($w3tc_rewrite = 1) { rewrite .* "E:/htdocs/wp-content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_preview.html$w3tc_enc" last; } # END W3TC Page Cache core
Hello @codecr
Thank you for the information. This option is only for Apache.
Can you please disable the settings one by one in Performance>general settings, save the settings and purge the cache after each setting is disabled, and see which one might be causing this?
The problem is in the template code. To get rid of it, tell your editor to save the file either as ANSI/ISO-8859 or as Unicode without BOM.Thanks!
I have turning off all cache settings in General and purge caches. But the problem persists. If W3TC are disabled in WordPress Plugins the page load correctly. Any ideas?
Hello @codecr
Unfortunately, I am unable to replicate the problem and as I’ve mentioned in my previous posts, the problem is with the encoding.
Having only W3TC active without any settings enabled does not have any impact on your website which makes this more strange.
Try disabling the other plugins one by one and see if some plugin is causing the conflict also try switching the theme to the default WP theme.
Thanks!
- The topic ‘W3TC and Incorrect Character ’ is closed to new replies.