Invalid chunked encoding error on wordpress css download - css

I have a wordpress site that intermittently displays incorrectly due to a bad css url being served to the client (by apache). I have tracked down the problem to the css file being somehow linked to with an incorrect link:
siteexample.com/wp-content/themes/twentyten/ce.bf1f3e76cdf43e6250526a554c555315.style,s.css
This file doesn't actually exist on the filesystem, which leads me to believe it is generated on the fly and served by apache through a possible tempfile. This functionality does indeed work on some of my other sites and I can click the link in question and load the css file (for those sites the theme is working correctly as well.
If I view the page source and click the bad link it gives me an error (In google chrome):
Error 321 (net::ERR_INVALID_CHUNKED_ENCODING): Unknown error.
Now noticing the "ce.bf1f3e"... on the beginning of the bad css url, the "ce" could be a prefix for "chunked encoding", but I am not aware of how this url is being generated in the first place. If it is on the apache side or on the wordpress side.
How can I turn off chunked encoding or force the css url to be given to the client as it exists on the filesystem as "style.css"?

I have found the issue. It appears wordpress has built in css caching that isn't resolving correctly. Regardless of the main problem, I have decided to disable css caching by using a separate wordpress plugin that appends a timestamp on the end of the css url and pulls the latest version from the filesystem every time.
Css Cache Buster Wordpress Plugin
I will post any follow up information I find on wordpress's css caching, but until then it appears this plugin has solved my immediate problem of the css url being incorrect when the page is served to the client.

Related

Problem with Page has redirected JavaScript

I did an audit of my website and it sends me this message
"Page has redirected JavaScript"
Issue details
Some pages on your website link to JavaScript files via a redirect.
This forces web browsers and search engine crawlers to make an additional HTTP request in order to reach the destination JS file URL. On a vast scale, this can increase page loading times for your website.
How to fix
Review the pages that have a link to the redirecting URL and replace this link with the direct link to the destination JS file.
If you decide to keep links to redirecting URLs that do not belong to your website, make sure that the destination files are relevant.
And I get several links like these:
https://script.crazyegg.com/pages/scripts/0012/9265.js
https://s7.addthis.com/ with randoms numbers
Has anyone had a similar problem who can help me to see how to solve the problem?
It sounds like you have some pages that are actually loading a remote JS file, which then redirect to another page on your website.
Why this is happening is anyone's guess - maybe you have a plugin installed that is doing it intentionally as part of it's functionality. I would start by disabling plugins one at a time (ideally on a staging environment) until the problem goes away, and then you'll know who the culprit is and make a decision.

Wordpress Migration with lingering reference

I recently created a Wordpress Website on my personal server. And once completed I deployed it to the client's server successfully.
However, when I activated HTTPS, I received the 'Mixed Content' error, and when I Inspect the Console I still see a reference to my own server:
Mixed Content: The page at 'https://fluidfinance.co.za/' was loaded over HTTPS, but requested an insecure image 'http://transciety.co.za/fluidfinance/wp-content/uploads/2020/01/Slider1.jpg'. This content should also be served over HTTPS.
Fluidfinance.co.za being the client's server, and transciety.co.za is my server.
I checked the HTML body, and cannot find any reference to this image link. I also ran a Find and Replace on the Database, and still it is trying to fetch the images from my own server.
The actual image being displayed comes from the correct server.
How can I get rid of this reference, in order for the Mixed Content error to be removed?
Thank you in advance.
It is Coming from Elementor CSS.
URL: https://fluidfinance.co.za/wp-content/uploads/elementor/css/post-6.css
CSS Present.
.elementor-motion-effects-layer{background-image:url("http://transciety.co.za/fluidfinance/wp-content/uploads/2020/01/Slider1.jpg");background-repeat:no-repeat;background-size:cover;}
May You can Change it in Elementor Plugin or Manual by Going to the CSS Path.

Mixed Content: The page at 'https://example.com' was loaded over HTTPS, but requested an insecure stylesheet error in Wordpress site

Instead of genuine Mixed Content issue this seemed like more of a Wordpress issue hence posting here to find a resolution.
I have everything setup to work with https, though there is no valid certificate yet. here is the home page url https://tourpoule.nl. The home page loads but with Mixed content errors which seem to be generated by core Wordpress or theme functions. Attaching image:
Database does not have any url which would start with http://. I already have replaced them using search and replace script.
There is nothing in htaccess file except basic Wordpress setup code. I tried renaming it as well. I cleared all types of cache but still it does not work. The site is using twentytwenty theme and if I comment out css and javascript enque lines, some of the errors disappear but styles and scripts do not load(that is normal I know).
In the view source of page it shows mixed urls, some with https and style and javascript urls without https. see below:
Interestingly if I click a stylesheet url i.e. http://new.tourpoules.nl/wp-content/themes/twentytwenty/style.css?ver=1.0 it redirects to https://new.tourpoules.nl/wp-content/themes/twentytwenty/style.css?ver=1.0
I am not sure what is going on and have got struck. I am not able to reach the client so that we can discuss turning ssl redirection off in nginx for this domain where it is redirecting everything to https if it is not https. Not sure if that is causing issue (I believe it is not as it has nothing to do with Wordpress mechanism to generate urls). Any help or direction is greatly appreciated.
I can see your website is still unsecured, for what it's worth, get yourself letsencrypt ssl.
Back to you question, go to your database, open the wp_options table, change the siteurl item to https://tourpoules.nl and also change the home item to https://tourpoules.nl.
If you have used search and replace DB master script or plugin it will not update inside meta files as well as and check for the function file have you Enqueue with https://
So will be better if you download SQL file and replace with below:
From:
http://new.tourpoules.nl
To
https://new.tourpoules.nl
and re-upload again

Error displaying oEmbed Wordpress

I've a problem with my wordpress website. When I insert some url for being embedded, it's not working fine.
Here is the issue URL : https://www.duosia.id/windows/cara-mengekstrak-files-menggunakan-winrar-dengan-mudah
And here is the Screenshot :
When I try to visit the embedded url. It's return 404 not found. You can check the embedded url here, https://www.duosia.id/windows/cara-mengekstrak-files-menggunakan-winrar-dengan-mudah/embed/
I've try these common solutions.
Update everything including WordPress, the theme and plugins. Available updates appear in Dashboard > Updates.
Deactivate all plugins in case there is a conflict. If the problem goes away while all plugins are inactive, then reactivate them one by one to determine which is causing the problem.
Switch to the default theme (such as Twenty Thirteen) then try to do what was not working. If the problem remains, it is a general WordPress or hosting issue. If it happens only while using our theme, please let us know.
Clear cache in both your browser and in any caching plugins that you are using (also disable services like CloudFlare, if used with your website).
Revert code changes if you have modified the theme’s code. If using a child theme, reactivate the parent theme.
But, seems no one work.
The WordPress post embeds don't seem to be working on your site.
This URL shows a live example of the problem:
https://www.duosia.id/windows/whatsapp-for-pc/
The two embeds present in that URL are returning a 404, therefore, oEmbeds are not loading properly and showing the 404 page:
https://www.duosia.id/windows/facebook-messenger-for-pc/embed/#?secret=kMPv636bx1
https://www.duosia.id/windows/line-for-pc/embed/#?secret=65m4VpxiYi
Have you tried testing those URLs in the plugin "Rewrite Rules Inspector"?
You should see something like this for any of the "embed" URLs:
index.php?name=$matches[1]&embed=true
Also, have you tried flushing the rewrite rules in WordPress or maybe setting the permalink structure to a different/default one (right now you seem to be using a structure of "category/post-name") to see if it changes anything?
For the file that you are embedding, are you uploading it to the Media Library or some other plugin?
First I would check on the server to verify that the file you are looking to access does exist.
Once you know that the file does exist, then repeat the steps you have listed again.

Wordpress - Chrome not loading ajax googleapis securely -

Wordpress site in Chrome (not Firefox) is blocking jquery loading - console shows error in our recently secured (full site) over SSL.
"The page was loaded over HTTPS, but displayed insecure content from 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js': this content should also be loaded over HTTPS."
When I view it in Firefox, this same call is indeed HTTPS.
I see the call to this URL in the head section of the page source, but haven't located where this call is coming from in the code so I can change it to HTTPS. Getting generated... But where? I can't locate it.
Our WordPress Address (URL) and the Site Address (URL) are both HTTPS - all else works except for this jquery call.
I have read similar issues on this forum but don't know clear way to fix it within Wordpress or force the HTTPS... or even find what's calling it - at the limits of my knowledge about this... Thanks for any help here
Use //ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js to load the javascript, instead of adding the http or https protocol in front of the url. Modern browsers know to prepend the proper protocol when non is supplied.
That being said, since you are using WordPress, you should have one of the latest versions of jQueryUI already in the installation. You simply need to wp_enqueue_script() the ones you need. For instance, if you need draggable and sortable, you would use wp_enqueue_script('jquery-ui-draggable'); and wp_enqueue_script('jquery-ui-sortable'); respectively. WordPress is kept pretty up to date on these APIs, so offloading jQueryUI to googleapis is probably not the best of ideas, because you could incur a page load time hit by adding another domain for a browser to lookup.

Resources