I can not preview a html file in webstorm 9.0.1 when I run it, it shows web page is not available because in addressbar it shows localhost:63342/---project folder.---. How can I access from local harddisk html file.
And, another question can I preview html in google chrome/firefox as docable?
To access http://localhost you need to have running local server (like XAMPP or WAMPP). If you have no localhost server (or you have no idea if that thing exist in your computer) than you can't access http://localhost. That means any *.php file will be not usable.
If you are font-end developer, you don't need server. You can access your *.html files directly: file:///C:/path/to/file.html (in browser site url box). Also, for any external sources to work, path to that file must be relative:
//C://myProject
myProject
|-index.html
\
css
|-styles.css
\js
|-functions.js
You enter to browser url bar: file:///C://myProject/index.html
Your index.html looks like this:
<html>
<head>
<script src="js/functions.js"></script>
<-- WRONG:
<script src="http://localhost/js/functions.js"></script>
<script src="C:/myProject/js/functions.js"></script> // valid, but better to avoid
-->
</head>
</html>
To preview HTML file on disk (using file:/// protocol) in WebStorm, hold Shift when choosing a browser
Related
My www folder has the necessary files, however, the error message seems to think otherwise. What might be the problem here? As you can see, www folder does have the login_page file, whereas, upon running localhost/ux2, I am getting the error "The requested URL /ux2/user/login_page was not found on this server."
First of all, are you sure that your WAMP is working and online? you must get green Icon for Wamp on the start menu bar so you make sure that WAMP is working.
Secondly test WAMP by creating very basic html file like hello.html
<html>
<body>
<h1>Heloo!</h1>
</body>
</html>
if that test file worked, your login page should work.
I'm using the package, "django-wysiwyg-redactor," for a blog entry interface within the admin application. When the admin site loads, the package injects a handful of source URLs for the JavaScript files it needs to render the rich text editor:
<script type="text/javascript" src="/static/redactor/jquery.min.js"></script>
<script type="text/javascript" src="/static/redactor/jquery-migrate.min.js"></script>
<script type="text/javascript" src="/static/redactor/redactor.min.js"></script>
...and so on...
The project I'm working on is using the Boto backend to serve files from an S3 bucket. The URLs injected by Django to render the admin page render correctly, appending the proper S3 data to make the call to the bucket:
<script type="text/javascript" src="https://siteName.s3.amazonaws.com/admin/js/jquery.min.js?Signature=signatureKeyGoesHere&Expires=1454163206&AWSAccessKeyId=AWSAccessKeyIDGoesHere"></script>
<script type="text/javascript" src="https://siteName.s3.amazonaws.com/admin/js/jquery.init.js?Signature=signatureKeyGoesHere&Expires=1454163206&AWSAccessKeyId=AWSAccessKeyIDGoesHere"></script>
<script type="text/javascript" src="https://siteName.s3.amazonaws.com/admin/js/actions.min.js?Signature=signatureKeyGoesHere&Expires=1454163206&AWSAccessKeyId=AWSAccessKeyIDGoesHere"></script>
For some reason, the Redactor URLs don't render correctly -- appending the data necessary to make the call to the S3 bucket.
I had everything working fine during local development (while still using the remote file backend)
I also had everything working fine during my first deployment.
Just this evening I went to go mess around with the development branch site - which had the exact code base as the production (which was working during initial deployment) - and saw that the blog entry form was not rendering. I checked the in-browser javascript console and found the handful of resource load failure messages pertaining to the files Redactor uses:
Failed to load resource: the server responded with a status of 404 (Not Found) http://siteName.herokuapp.com/static/redactor/jquery.min.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://siteName.herokuapp.com/static/redactor/css/redactor.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://siteName.herokuapp.com/static/redactor/css/django_admin.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://siteName.herokuapp.com/static/redactor/jquery-migrate.min.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://siteName.herokuapp.com/static/redactor/redactor.min.js
As you can see, those URLs aren't in the same format as those listed above.
All necessary files are indeed present within the S3 bucket.
I can't seem to figure out what's going on.
Any help is greatly appreciated.
Thanks!
Make sure your STATIC_URL is set to use your bucket location.
STATIC_URL = "https://siteName.s3.amazonaws.com/"
See also here:
Serving Django's static and media files from S3
In general, redactor users the Django Form Media class. For more information: https://docs.djangoproject.com/en/dev/topics/forms/media/
I have a Django 1.4 webapp using storages.backends.s3boto.S3BotoStorage as the file storage backend to serve static files from AWS S3.
Everything works -- except admin static files. On inspection of the admin page source, it's clear the problem is coming from the admin static file URLs, for example for the admin's base.css stylesheet:
<link rel="stylesheet" type="text/css" href="https://watchdog_staticfiles.s3.amazonaws.com/admin/css/base.css?Signature=sFKzAavHHKYdJQVDGTwwSAyrrjc%3D&Expires=1387824617&AWSAccessKeyId=AKIAJAYZSKEJIVD52OCQ" />
The problem is the presence of the Signature, Expires, and AWSAccessKeyId URL parameters. With these there, the link leads to an access denied response from AWS. Without them, i.e. just going to the plain URL https://watchdog_staticfiles.s3.amazonaws.com/admin/css/base.css, there's no problem (as the file is set to be publicly readable).
These signature/expires/etc parameters are not being added to static URL links in my main webapp, just within the admin.
So my question is -- where are they coming from and how do I get rid of them?
I am using JA_Orisite template of joomla2.5 for my client, and unable to load jquery file "//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"(needed for menu and article scrollings, etc), This file was being loaded on localhost, when I transfered the site using akeeba backup and recovery process, after installation on server I am unable to load jquery.
Surprisingly, I was having file permission issues on server, once I set 777 to all the files of my site, Jquery file was also working properly.
As the first server is not providing me the expected speed and service, I have transfered the site to other hosting server, which is now giving the same problem of jquery, On this server too I tried to set the permissions to 777, and yet unable to load jquery files.
Rather than importing it from Google, you could always import a local version like so:
<?php
// load jQuery, if not loaded before
if(!JFactory::getApplication()->get('jquery')){
JFactory::getApplication()->set('jquery',true);
$document = JFactory::getDocument();
$document->addScript(JURI::root() . "templates/template_name/js/jquery.js");
}
?>
I'm using Foundation 4 (the Sass version) and most elements have styles applied to them that are coming from a source listed simply as ... When I click on it to see what it is I get the following:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
</body></html>
What is this source? Shouldn't everything be compiled into foundation.css?
Check your server: If you put an image (foo.jpg) in your directory, can you open it and see it in your browser? I don't have enough details to help you (OS, server, ...) but you probably need to look this way. If the file aren't opening, you have problems in your server config or file permission!
(#admins : sorry, it should be a comment but it seems I don't have sufficient rep to reply to the comment)
I just noticed that whenever .. shows up in Inspector the line number shown matches that of thee selector in the .scss file. I have no idea how this works, or what exactly is responsible for this.
Oh! Just figured it out! It was the experimental SASS support feature which I had enabled in Chrome!
Mystery solved.