I am trying to use django-filebrowser. I have installed in correctly according to the instructions, but i get a JS error every time i try to upload a file.
I should note that i am able to browse to 'filebrowser/browse/', create directories etc.
The problem is that when i chose to upload a file, i can see in the html source that a file 'CollapsedFieldsets.js' is included but cannot be found.
The location of this file is supposed to be here: django-install/django/contrib/admin/media/js/admin/ but the file is nowhere to be found.
django-filebrowser references this JS file in filebrowser/templates/upload.html
The error i get is:
invalid object initializer
$('#id_file').uploadify({
That probably happens because the file in question cannot be found.
I am using Django 1.3 and that file is not included in the download.
Please help!
I may have got the same trouble some days ago when I was using django-filebrowser. I can also create the directory, but when I click the 'browse' button, it fails with the same error that you got: 'CollapsedFieldsets.js' can not be found.
at last, I found that:
MEDIA_URL = 'http://domain/static/'
FILEBROWSER_URL_FILEBROWSER_MEDIA =MEDIA_URL+ 'filebrowser/'
because the MEDIA_URL has no 'www', so when I visit my website with no 'www', the filebrowser works well; but if with 'www', I will still get the error.
I am not sure this answer is right, hope it can help you.
Related
After an automatic WordPress update the plugin forms (Contact Form 7) now display a slash just below them and are no longer firing the wpcf7mailsent listener event, so it is no longer being redirected to the thanks page after submitting the form.
This error: “the server responded with a status of 409 or also known as net :: ERR_ABORTED 409” from what I see is a problem loading styles.css and scripts.js files.
This must be the reason why it is not issuing the wpcf7mailsent listener event and a slash just below the forms.
Strangely if on the same page I manually click and open the styles.css file via URL, the file starts to load on the page and it stops showing that bar just below the form.
For this reason I am saying that you are not loading the styles.css and scripts.js files, as they do not even appear in the uploaded files folder, just after I open them by URL.
Here’s the test I did to show it:
The error happening:
https://ibb.co/Vvm8jwG
Did not load CSS file and JS file:
https://ibb.co/kHszgW9
After I open the CSS style link that says it didn’t load:
https://ibb.co/FXcLRXQ
https://ibb.co/997nMgK
You no longer see the error that you did not upload the CSS file and now the file has been uploaded to the folder showing the contents. The same will happen with the JS file if I manually load it as the CSS file.
https://ibb.co/jGPQ2MH
https://ibb.co/chVjRTQ
What I already tried to do to fix, but it didn’t work:
– I disabled several plugins
– I updated the plugin
– I reinstalled the plugin
– I tested in other browsers, the error persists
Other sites with Contact Form 7 are also experiencing the same.
Environment Settings:
Theme: Javelin
WordPress: 5.2.4
PHP: 7.1.24
Hosting: Hostgator
The page I need help with: https://verdecia.com.br/central-de-atendimento/
For anyone who is facing this issue, this is a known issue in bluehost and hostgator hosting. Basically the root reason for this seems to be that they are blocking image/js/css or other assets in any path with contact string.
The reason that contact form 7 assets are randomly blocked is probably also due to this same reason.
I had html websites running on my server where contact (or any other) page with assets in for example /images/contact/ folder also did not load with 409 conflict error, due to the contact path in the assets folder.
Unfortunately I found no solution to this just like many many users out there. Check out these links:
Link 1
Link 2
What is the solution?
Well wasting time with hosting provider support is of no use. I just use
hostgator/bluehost for development purpose. There are many hosting providers out there,
so next time you can choose some other one, especially for live websites.
For custom websites, avoid naming your assets folder to anything that has contact in it.
For CF7 in wordpress stop loading the assets in wp-config file using define( 'WPCF7_LOAD_JS', false ); define( 'WPCF7_LOAD_CSS', false ); and manually load the files in the header by separately downloading the files and importing them.
EDIT:
I have been using a simpler fix recently when using CF7, just rename the plugin folder from contact-form-7 to anything without contact keyword, like cf7. This will start loading all assets without the conflict.
While trying to deploy Extjs Applicaiton getting blank portlet in Liferay not sure what is the issue can someone tell where to add js file currently I am adding them in .html file also i tried to add them all in Liferay-Portal.xml. one more thing which all file need to add to these location i am adding App.js, Main.js, ext-all.js
Below are files I have added in liferay-portal-xml.
before this I have also tried to add all files in index.jsp
<?xml version="1.0"?>
<liferay-portlet-app>
<portlet>
<portlet-name>d1523bb0-7f00-0001-4cfb-83e75e3cc848</portlet-name>
<requires-namespaced-parameters>false</requires-namespaced-parameters>
<icon>/img/task_list.png</icon>
<instanceable>false</instanceable>
<header-portlet-css></header-portlet-css>
<footer-portlet-javascript>/examplecalculator/ext-all-debug.js</footer-portlet-javascript>
<footer-portlet-javascript>/examplecalculator/app.js</footer-portlet-javascript>
<footer-portlet-javascript>/examplecalculator/theme-crisp-debug.js</footer-portlet-javascript>
<footer-portlet-javascript>/examplecalculator/app/view/main/Main.js</footer-portlet-javascript>
<footer-portlet-javascript>/examplecalculator/app/view/main/MainModel.js</footer-portlet-javascript>
<footer-portlet-javascript>/examplecalculator/app/view/main/MainController.js</footer-portlet-javascript>
<user-principal-strategy>screenName</user-principal-strategy>
<private-request-attributes>false</private-request-attributes>
<active>true</active>
</portlet>
</liferay-portlet-app>
According to the documentation for <footer-portlet-javascript> (emphasis mine):
Set the path of JavaScript that will be referenced in the page's footer relative to the portlet's context path.
e.g. your examplecalculator/ in the declaration doesn't belong there.
I have been coding up a localhost, and I made the localhost by using of course a JavaScript file to do so, and I then made it reference an HTML file. However, I noticed that when I am using localhost to serve up the HTML file I get this error:
"GET http://localhost:3333/filetesting.js"
The filetesting.js is that js file, there are also other things I'm referencing too, like websites. I'm referencing it by using script tag src.
I looked at the network on developer tools of it and it says it's a 404 error not found. I'm trying to figure out how to reference my script tag src's without having localhost:3333 go before it.
When I run the HTML file without using the localhost, it works just fine when it comes to the script tag src's. If you do not entirely understand what I'm asking for, just ask.
Assuming that your script will always reside in the root level of your website, you can simply target it with the root-relative prefix /:
<script src="/filetesting.js"></script>
This will load your script from the root, regardless of the site the file is hosted on. For example, on http://localhost:3333/ it will load the file from http://localhost:3333/filetesting.js, and from http://localhost:3333/folder/, it will attempt to load the file from the same location.
If you move your files over to a proper website, it will still work the same way: www.example.com will look for the file at www.example.com/filetesting.js, and www.example.com/folder/ will look for the same file at www.example.com/filetesting.js.
Hope this helps! :)
I'm writing a html file that includes several .js libraries from open sources Projects for example:
<script src=“js/three.min.js"></script>
But it says:
Failed to load resource: the server responded with a status of 404 (Not Found).
When I clicked on it, it says The requested URL /blabla/js/three.min.js was not found on this server. The .js files are in the folder called js which is stored in the same place as the html file. I've already gone through tons of Google search but couldn't find a way to solve it. Maybe it's a dumb question as I'm new to JavaScript. Can anybody kindly inform me what is the problem?
Many thanks in advance!
Can I see your code? In meantime, you can have reference from below
<script type="text/javascript" src="http://www.your_external_domain/blabla/js/three.min.js"></script>
Is the file local or online ?
If online try to call http://www.your_external_domain/blabla/js/three.min.js with your browser.
If you can receive the file with your browser, your html should be although able to do it.
If not, maybe you cannot receive this file from your school server.
Everyone is answering saying he has to add type="text/javascript" as well.. but this isn't necessary anymore. If script tags do not contain the type property, it's Javascript automatically.
I read you're on your school server, so that might be it.. (the directory might require to read your username and password).
Try uploading the file somewhere (maybe here: http://yourjavascript.com/) and referring it that way.
Try <script type="text/javascript" src="/js/three.min.js"></script> (added a / in front of js).
I logged in to my FTP from Filezilla and tried to open a JS file, and it gave me the following error:
Script: C:/.../slider.js
Line: 1
Char: 1
Error: 'document' is undefined
Code: 800A1391
Source: Microsoft JScript runtime error
I have jQuery linked to the .php file as well...'document' comes from:
$(document).ready(function() {
//Code is here...
});
I tried downloading the file and opening it, I tried removing the $(document).ready();, I tried removing jquery (which by the way, when I opened the jQuery file it gave me the same almost the same error). Any help is appreciated. Thanks!
EDIT:
One of the tags for this post was "asp.net", but to be honest I don't even know if it is related to asp.net...
I had the same issue and fixed it by doing the following in Filezilla:
Go to Edit > Settings
Go to the 'File editing' section
Under 'Default Editor': Ensure that Notepad++ is selected as your custom editor
Change the radio button from 'Use filetype associations if available' to 'Always use default editor'
You say that you're right clicking and clicking "View/Edit", and it throws that error.
The error is occurring because Windows is executing the script, and the script has a problem (because it relies on another script being loaded).
So although you may be clicking "View/Edit", and expecting that this will open the file in Notepad++, what it is actually doing is assuming that "View" means "Run the script".
Clearly, Notepad++ is not the default action for this file type, or at least it isn't according to Filezilla. Maybe the default action isn't actually set the way you think it is, or maybe it's Filezilla that isn't respecting your default action.
The solutions:
If Filezilla has an option "Open with..." that allows you to pick the program to open the file with, then use that and select Notepad++ manually. Even better, if it has the option to then make that the default, then tick it, and the problem should be solved permanently.
Alternatively, just download the file to your local machine before trying to open it.
I got this working in FileZilla by doing the following: -
Edit -> Settings
File editing -> Use custom editor [file path to notepad ++] then
|___File editing -> Filetype associations
Adding the line -> js "C:\Program Files (x86)\Notepad++\notepad++.exe"
Click OK to save changes
This will stop windows script host from attempting to run the file and open in notepad++.
While the question has effectively been identified previously in the post I hope that someone finds this 'how-to' useful.
This is not a programming problem. It's a file association problem - Windows is trying to execute your .js file instead of opening it in an Editor.
See this question on SuperUser: running-javascript-files-js
There's also some explanation of the error here.
Check your file associations again. Try restarting your machine. You will get more help if you ask this type of a question on SuperUser.
It's worked for me after adding the file association.
Edit -> Settings
File Editing -> Select Use filetype association if available checkbox.
Select Filetype Associations -> add association here
js "C:\Program Files\Sublime Text 3\sublime_text.exe"
OK
Note: change association according to your text editor application.
Just follow these steps. It is an easy one to do. Change the default file type for opening the js files.
Edit -> Settings
File editing -> Filetype associations
Adding the line -> js "C:\Program Files(x86)\Notepad++\notepad++.exe"
That's it. Finally, Click OK to save changes.
It will work afterwards.