CloudFlare Error on Page - joomla

I seem to be getting an error while using cloudflare on my domain. No matter what i do it won't go away, I've tried turning off various options in cloudflare and my joomla CP, using jbetolo for minification,merging and compression of js and css files.
the error is as follows: Failed to Load Resource http://website.com/cdn-cgi/pe/bag?r[]=http%3A%2F%2Fwebsite.com%3A80%2Fcdn-cgi%2Fnexp%2Fv%3D1443929931%2Fapps%2Fga_key.js cloudflare.min.js:35
I can't find any resources on this error. here is more output of the console reporting the error. Could anyone tell me why this happens, how to fix it, or if this is normal? Thanks.
a.function.a.object.a.object.d.(anonymous function).object.d.(anonymous function).(anonymous function)cloudflare.min.js:37
a.function.a.object.a.object.d.(anonymous function).object.d.(anonymous function).(anonymous function)cloudflare.min.js:37
browsing to the link returns a 405 Not Allowed error, I guess this is a little obvious.

For anyone else looking for a solution, changing the "Rocket Loader" setting under the SPEED menu from "Automatic" to "Off" fixed the problem for me. While in "Automatic" mode, my JavaScripts were being wrapped in a CDATA block, which caused the error, but disabling the "Rocket Loader" removed the wrapper.
Note that you can still use JavaScript minification while turning off the "Rocket Loader".
The "Rocket Loader" at the time of posting is still in Beta mode, so it's possible that some bugs remain. It is unclear why one javascript file causes the problem, while others do not.

That appears to likely being caused by CloudFlare's Auto Minify option. Did you turn this off?
Note: You don't want to have CloudFlare's minify turned on with another option (can definitely see issues).
Contact CloudFlare with the domain if turning off Auto Minify doesn't fix it & we can have an engineer check it out.

Related

EXTENSION_BASE_URL causing 404 on some fonts

I'm using Laravel 8 on Heroku and keep getting 404 errors for some fonts. This just started happening earlier today but I haven't changed any of my code in several days.
This is a sample of what I'm seeing from laravel's error handler:
404 - https://www.example.com/%7B%7BEXTENSION_BASE_URL%7D%7D/b06871f281fee6b241d60582ae9369b9.ttf
404 - https://www.example.com/%7B%7BEXTENSION_BASE_URL%7D%7D/fee66e712a8a08eef5805a46892932ad.woff
404 - https://www.example.com/%7B%7BEXTENSION_BASE_URL%7D%7D/af7ae505a9eed503f8b8e6982036873e.woff2
I searched my entire directory for EXTENSION_BASE_URL and it doesn't exist anywhere in my code.
The user id's associated with these errors are not unique and it seems to be happening to multiple people. It's the same three font files as above each time.
My best guess is there's some kind of plugin people have installed that's trying to use a custom font that doesn't exist. I can't find any reference to EXTENSION_BASE_URL when I do searches online, so I can't figure out where it's actually coming from.
The only custom fonts I use are an import for Raleway from the Google Fonts API. I have jQuery 2.2.4, Bootstrap 3.3.7 and FontAwesome 5.4.1 which might also be including fonts with their CSS. Aside from the Raleway include, the versions for the other CSS files haven't changed in a while.
Since it doesn't seem to be affecting everyone and I can't track down what these font files are, my plan is to simply exclude these font files from showing up in my logs. I'd love to know what caused this though so I can take any other action if necessary
We had this same problem with some of our users and we tracked it down to a browser extension called ProWriting Aid Grammar Checker which is for the website https://prowritingaid.com/.
In our case, not only was it creating the errors you mention with fonts, it also caused some JavaScript to execute improperly.
This extension is available on Chrome, Safari, Firefox, and Edge. We had users across all these browsers have the same problem. It is clear that the problem code is shared across all these browser extensions' code base.
Having users uninstall that extension solved our issues.

Codekit 2 not refreshing browser

Codekit 2 does seem to be refreshing in any browsers. I've literally just installed it and been setting it up to my own preferences.
I use my Mac's hosts file to point http://localhost.sites to localhost. I've never had an issue with this in the past (I just set Codekit to refresh on any URL including the word localhost).
Now in the new settings file I'm slightly lost as to where to put it... after a load of mucking about I think I'm in a real state and here are my current settings:
Can anyone shed any light on this? Codekit is not refreshing the browser (all files are compiling fine).
I was having the same issue, #Djave.
Now, while I won't assume you make the same mistakes I do, I found that some errors in my
were causing Chrome to ignore the refresh. Specifically, the closing tag was missing. Instead, I had
<script... />
instead of
</script>
Hope you found the issue on your end.
As Bryan from Incident 57 told me, the refreshing process in Codekit 2 is totally different to the refreshing process in Codekit 1.
Codekit comes with its own server which you are required to run. You can click it in the top right hand corner of the program and it will launch.
You need to have this running to get going. If you have PHP files (or other server side code) Codekit won't run it – so this is where you need your external server running but it is important that you still view the site you're testing at the address given i.e. http://djave.local:5757.
For a far better explanation of all of this you can watch Bryan the creator of Codekit walk you through this in this video here.
https://www.youtube.com/watch?v=YUgH0jlYur0

CSS file not updating on Azure Deploy/Publish

RESOLVED
Unbeknownst to me, Cloudflare defaults to caching all css/js files for 4 hours.
Scenario:
I add this to our front page:
<span class="test">hullo!</span>
and this to our css file:
.test { font-size:2.0em; }
I do a web deploy, OR full publish to Azure and the span appears on the front page, but not the styling. The css file for some reason does not get updated. FF, IE, Chrome and Safari all confirm it. However, after a seemingly arbitrary time, the css file get updated.
Even when I remote into the Azure VM and restart the app, the styling is unchanged. The app is running on one instance, one role. No Azure Caching is setup. Adding a querystring param to the css file link does not help. Seems like a caching issue but no clue how to resolve.
Any ideas?
"We are using Cloudflare which has a default set up to cache all CSS and JS files. It purges the cache every 4 hours which resulted in the arbitrary updates. So, even though I was adding a new query string to the end of the css file, Cloudflare still cached the old one"
Just a quick note that you should go to CloudFlare Development Mode when making changes to the static content files on your site. You can get to Development Mode to bypass the cache by going to: settings->Development Mode. You also have the option of purging your cache as an additional option, which we would only recommend if you really want to purge everything.
Looks like it's cached by your browser. Can you please try navigate to your site and press Ctrl+F5.
Maybe you can use Fiddler to see if the CSS had been cached, or not updated, or some error when download.
This issue is resolved.
We are using Cloudflare which has a default set up to cache all CSS and JS files. It purges the cache every 4 hours which resulted in the arbitrary updates. So, even though I was adding a new query string to the end of the css file, Cloudflare still cached the old one.
I have dealt with this and I will tell you that from my experience in Chrome you can set a setting that disables the cache in the developer tools, however, I've noticed that unless you have the dev tools window open when you hit Ctrl+F5 it doesn't reload the cache. In IE there is a global setting in the dev tools that will make it redownload everything every time. In Firefox there is also a setting in the dev tools that will require it to download and not use the cache.
One way that you can test this, and how I test this, is by running Fiddler and watching if it does a full download of all your files or if it's caching.
From what I've experienced is that this is truly a browser caching issue and not anything to do with Azure.

My website is entirely blank, tips to diagnose?

I have an ecommerce site built on OpenCart (1.5.0 i believe), which after inserting tracking code from Alexa.com and a block of code for redirecting to another site went entirely blank. Initially it worked, so I felt it was safe to save over my backups. But after refreshing the pages it was blank, and the 'view source' option in all my browsers (firefox, chrome, safari) revealed that there was no code reaching them. I then began to follow a series of debugging steps:
As my text editor was still open I undid all changes and reuploaded with no changes
I scanned the documents to be sure there were no issues in the text, with no discoveries
I ran it through W3C validation, with 2 warnings which are 1- no character encoding and 2- unable to determine parse mode.
contacted host for a server side restore though their earliest backup was a day after the problem began (it took 3 days of arguing to get them to initiate a restore)
In regards to these validation warnings, I am not sure what encoding should be used for OpenCart, ASCII or UTF-8 (which the validator resorted to) or what, in addition I am not sure if the template used with OpenCart would conflict with it if I were to declare encoding. In addition, I find it hard to believe that such a widely distributed product would have something this simple causing such a huge mistake because then all users would have this issue.
In regards to parse mode, the index page does declare parse mode (in the included header file).
In addition to all this, the validator is also claiming that it is not receiving code at all, which disables any chance of determining problems through that route.
The header and footer were both edited for these additions but are relatively long to include in this. The code used to edit were, for alexa <!-- tracking code here --> inserted into the head section of the header file, and the code for the footer was:
<span style="display:inline-block;width:160px;height:30px;text-align:center;border:#000 1px dotted;font-family:Arial,Helvetica,sans-serif;font-size:11px;background-color:#FFFFFF;"><strong style="display:block;padding:0px;margin:0px;">Reputation Management</strong>Submit Express</span>
If anymore code is needed to help then please let me know, I am not looking for someone to fix my problem but to give me relevant tips to help figure it out myself or if they do provide a fix to educate me as how they managed it so I may be able to use the same debugging method. Thanks!
EDIT: The issue, as discovered thanks to Jay, is "PHP Notice: Undefined index: HTTP_HOST in **/public_html/graphic-shack.com/index.php on line 40" and a google search has not revealed any effective results. This, to my untrained mind is jibberish, clarification would be greatly appreciated as line 40 is in fact a blank line, where as the text around it I can not post for some reason but will be viewable at http://graphic-shack.com/example.html
Open Cart uses UTF-8 throughout, so its definitely best to use that which your theme should set for the browser in the
The first thing I would ask is have you got error reporting set up (NOT OPEN CARTS ONE) that logs php errors?
If not, then you need to do something like
php_flag log_errors on
php_value error_log /path/to/custom/error.log
in your .htaccess file, so that you can log all your php errors to a file. this will need to be somewhere you can get the file, so change the path accordingly so you can view it.
Once you have that, you'll have a good base for working out the problem. I find it hard to believe that opencart has stopped because you added code. The most likely cause is a file missing, blanked or half written accidentally when saving or you've got some extra php code somewhere you shouldn't
== TEST.PHP CONTENT ==
<?php
echo '<pre>' . print_r($_SERVER, true) . '</pre>';
?>

CSS reload on IE7

It looks like IE7 doesn't reload the latest version of my stylesheet each time I upload a new version on the server.
This is annoying as I am debugging my .css file to make it work on IE...
Tried to empty the browser cache but still not working.
Thanks for your help.
Ctrl-F5 - forcible way to reload in IE
Include your version number in the file name. myfile_v1234.css
When testing, every time you do an update you can just wite "stylesheet.css?r=98123"
As long as the query string is different, it'll be downloaded again.
If you need, you can use javascript to append Math.random(), to get the random number. Not required on production though, when updates would be stable.
2 Questions:
Does IE eventually load with the newer stylesheet?
How are you saving the changes to the server (SSH, Web Interface, etc.)?
I ask because I ran into an issue with a web-based file management system a while back where one browser would show the CSS just fine, the other wouldn't, and we noticed the issue of which browser played nicely depended on which browser we used to upload the CSS.
The reason turned out to be that IE gave the CSS file a different MIME type than Firefox. If you continue to notice the issue even when you've cleared the cache, check the MIME type of the file using Firefox by going to Tools > Page Info.
Also, if it is simply a caching issue, consider turning caching off in IE. I believe this should be an Advanced Option under Internet Options.
Also, you may want to try creating a special developer environment for IE (if it comes down to it.) Perhaps have another machine with IE7 and no caching and any other features turned off (A kiosk mode, perhaps), and then previewing the page on that machine.
Thanks to you all!
I did manage to solve my problem with the "stupid" Ctrl+F5, and by changing the Internet Parameters of Windows to reload content every new visit.

Resources