Application Cache Error event: Manifest fetch failed (404) why? - css

So my appcache is giving this error:
http://nl.tinypic.com/view.php?pic=23uv5eo&s=8#.VGUTs_mG9Zw
My file structure looks like this:
http://nl.tinypic.com/view.php?pic=2yw73oi&s=8#.VGUUXvmG9Zw
My HTML tag:
<html manifest="manifest.appcache" xmlns="http://www.w3.org/1999/xhtml">
Manifest.appcache
CACHE MANIFEST
CACHE:
/images/header/buttonIn.png
/images/header/buttonOut.png
NETWORK:
*
Why am i getting error i'm getting?
Can someone please for once and for all explain to me how to make a file with a .appcache extension? so much unclarity about this.

Since you run an apache server. Try adding AddType text/cache-manifest .appcache to your .htaccess file.
More info about this at this blog post

Related

Jest und Meteor: Error While processing files with templating-compiler

I have a meteor object with the following structure:
+ .meteor
+ client
- coverage
- lcov-report
index.html
...
+ imports
+ node_modules
+ private
+ public
+ server
...
My problem is, if I try starting the meteor App, I get following error:
=> Started proxy.
=> Errors prevented startup:
While processing files with templating-compiler (for target web.browser):
coverage/lcov-report/index.html:2: Can't set DOCTYPE here. (Meteor sets
<!DOCTYPE html> for you)
While processing files with templating-compiler (for target
web.browser.legacy):
coverage/lcov-report/index.html:2: Can't set DOCTYPE here. (Meteor sets
<!DOCTYPE html> for you)
=> Your application has errors. Waiting for file change.
=> Started MongoDB.
So it seems to be related with the jest integration. Do you have an idea, how to solve it? I am using MacOS. I already chmod 777 coverage folder (and sub-items) but without success.
Thanks in advance for your time and best regards,
Christian
Finally I solved it by creating a '.meteorignore' file in the root of the project. Then I added 'coverage/' to the file (syntax as you would do it for .gitignore).
Hope it helps you, too.
Best,
Christian

ASP.Net bundling causing HTTPS error

Why am I getting the following error when the debug flag in the web.config is set to true?
Mixed Content: The page at 'https://example.com/' was loaded over
HTTPS, but requested an insecure script
'http://example.com/scripts/base/?v=JeAlpXPCZh9gYv4U-X7_HSaAX3Fj3sGBjwukxEaloQU1'.
Bundle
bundles.Add(new ScriptBundle("~/scripts/base").Include(
"~/Scripts/Base/app.module.js",
"~/Scripts/Home/home.controller.js",
"~/Scripts/Home/about.controller.js",
"~/Scripts/App/Common/dictionary.class.js",
"~/Scripts/App/Common/constants.class.js",
"~/Scripts/App/Common/multiselect.directive.js",
"~/Scripts/App/Common/paginationOptions.class.js",
"~/Scripts/App/Common/gridHeight.directive.js",
"~/Scripts/App/Common/utility.service.js",
"~/Scripts/App/Common/dateToString.directive.js",
"~/Scripts/App/Common/base.controller.js",
"~/Scripts/App/Common/messagePopover.controller.js"
));
Generated HTML
<script src="/scripts/base?v=JeAlpXPCZh9gYv4U-X7_HSaAX3Fj3sGBjwukxEaloQU1"></script>
I had a similar issue this morning. I found that the virtual path I had set was the same as the folder structure containing the scripts, once I had renamed the virtual folder path, the script bundle was then being requested over https.
Try changing the script bundle virtual path to;
bundles.Add(new ScriptBundle("~/scripts/applicationBase").Include(
"~/Scripts/Base/app.module.js",
....,
....
));
Hope that helps

Magento CSS/JS not loading after upgrade to 1.8.1

I just upgraded my Magento site from 1.6 to 1.8.1. After the update the website is unable to load CSS and JS. I checked the error log and it says this:
[Tue Apr 22 16:40:30.616082 2014] [core:crit] [pid 27847:tid 140041728800512] (13)Permission denied: [client 60.240.167.112:59507] AH00529: /home/strictly/public_html/js/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/strictly/public_html/js/' is executable,
I followed many people's advice and did these:
Clear cache in var/cache folder
web/unsecure/base_url and web/secure/base_url configurations are correct (they both point to the corrent URL)
dev/js/merge_files and dev/css/merge_css_files are both 0
Even after this the site loads very slowly, and when it loads it's not no CSS and JS. I check the behind-workings using Chrome's Inspect Elements button and I can see the CSS and JS files failing to load, each giving 404 not found error.
My guess is it has something to do with setting the correct permission for the JS and CSS folders/files. Does anyone know how I could do this?
Thank you
Found an answer.. I had to set the permission of skins folder to 755. After this, everything started working :)

How to show customized 404 error page - Symfony2

I have this in my controller:
if(some stuff) {
throw $this->createNotFoundException('message');
}
When I test it in dev env, I get the Symfony's page telling Exception detected with my text, but I can't test it in prod env :( I run this php app/console cache:clear --env=prod --no-debug and then replace only in the URL app_dev.php with app.php but the toolbar and Symfony's error page stay.
I created this file - app/Resources/TwigBundle/views/Exception/error.html.twig. So will it be rendered in prod?
This is in it:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>An Error Occurred: {{ status_text }}</title>
</head>
<body>
<h1>Oops! An Error Occurred</h1>
<h2>The server returned a "{{ status_code }} {{ status_text }}".</h2>
</body>
</html>
where should I give values for status_code and status _text? Or they are taken from the exception?
So in general what I want to do is when a condition in my contoller`s action is true, mine customized error page to be shown in prod env. Did I make it already, and if not, how to make it and how to see the result in prod env?
I also tried and i noticed that custom error pages placed in app/Resources/TwigBundle/views/Exception/error.html.twig worked only in prod environment.
Better late than never I guess..
You probably know about overriding of templates.
You can override any template you want.
So if you want to override the dev error page, just for debugging, then you should override the template:
exception_full.html.twig
You can do so by creating such a file in this folder:
app/Resources/TwigBundle/views/Exception
Now you will see your customized 404 in dev mode.
you can access your detected text with following way:
{{ exception.message }}
Read the doc http://symfony.com/doc/2.0/cookbook/controller/error_pages.html
and Customizing the 404 Page and other Error Pages
http://symfony.com/doc/2.0/cookbook/controller/error_pages.html#customizing-the-404-page-and-other-error-pages
It appears Symfony has a new way of allowing you to see the error page templates in your dev environment. Taken from their docs:
While you're in the development environment, Symfony shows the big exception page instead of your shiny new customized error page. So, how can you see what it looks like and debug it?
Fortunately, the default ExceptionController allows you to preview your error pages during development.
To use this feature, you need to have a definition in your routing_dev.yml file like so:
# app/config/routing_dev.yml
_errors:
resource: "#TwigBundle/Resources/config/routing/errors.xml"
prefix: /_error
Read more: Symfony Error Pages Manual

Resource interpreted as stylesheet but transferred with MIME type text/html

This is my html:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv = "Content-Language" content = "en"/>
<meta http-equiv = "Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/xxx/app/www/style.css">
Now when I load the page, Safari's inspector gives me:
Resource interpreted as stylesheet but transferred with MIME type text/html
I'm working on localhost with MAMP. I'm not sure what to modify to get this to work. I read that this might be a server problem of some kind.
How do I solve it?
Create an .htaccess file into your root folder (or update the existing one) with this line inside
AddType text/css .css
this will tell apache to send the right content-type header for .css file
There is possibility that not just css resources were interpreted wrongly. It maybe a problem of your webserver configuration.
The best way to check is to go to Chrome -> Network tab and check responses section for each request.
Also you can run $ curl -I http://path_to_file_or_page with terminal and have a look at response, you should see it in following format, e.g. Content-Type: image/jpeg
So, if it will occur that webserver (apache) does it for all filesthen you can try to solve the problem in following way:
Check your /etc/apache2/apache2.conf
If there are any SetHandler application/x-httpd-php line, try to comment it and then reload your apache by $ sudo system apache2 reload
Let us know if the problem is still there.
It could be that your web server is properly configured but it really is returning HTML instead of CSS.
Check that you have the correct path, spelling, case, etc. Hit the URL directly and see what comes back. Your web server might be responding with an error page (HTML) and a 200-Ok instead of a 404-Not Found.
I'm not saying this ever happened to me...

Resources