NetBeans: Code changes to javascript & css files are not reflected in browser after saving - netbeans

This is driving me crazy. I'm developing an app in the NetBeans IDE in PHP, using the CodeIgnitor framework. I am making code changes to js and css files in NetBeans, saving them but the files the browser is loading do not contain the code changes. When I open the files directly outside of NetBeans, the saved changes aren't there.
I'm storing the javascript & css files in a folder called static, which is outside of the 'application' directory in CodeIgnitor. What's weird is any code changes in PHP files work fine. I'm guessing NetBeans is saving the changes to the js/css files somewhere else but can't find them on my hard drive. This just started happening, it was working 'normally' before.
Thanks for the help.
Al

I had the same problem, upon investigation, my browser cached my old style sheet that I had recently updated. Clearing the cache and refreshing showed my new styling, after around 20 minutes of frustration :D

This problem occurs due to browser cache. For chrome while testing open the developer mode by pressing the F12 key and set cache disabled in the network tab as shown in Image below. It will ensure that you will always get updated version of the page files.

Check to make sure that the files are where you think they are. I would imagine that CodeIgniter is rewriting the request to be inside your application folder and thus bypassing your specific folder.

Related

How to refresh content of opened files in VS Code?

I'm looking for a way to refresh the content of a file opened in editor after it was changed by other tool.
For instance I'm using angular command line which makes changes to files but VS Code doesn't refresh the content after that and I can't see any of that. What's worse when I try to save the file, VS Code by default tries to save the old content upon the newer (asks before of course, but still its not what I'm looking for).
I didn't find any keybindings for refresh the editor's content. Maybe there are any extensions?
Thank you.
It should reload itself automatically, but I had a machine that stopped auto-refreshing. I'd change the file externally (with vim or whatever), and the file I had in the editor wouldn't pop and refresh itself, which it used to do. It turned out to be a git-related extension. I disabled it, and autorefresh returned. If you haven't already, try it with extensions off.

TYPO3 - Error 500 in right panel of Filelist

Friend gave me access to TYPO3 CMS of his page to make some changes and I can not open Filelist.
The left panel with directories is displaying but on the right, a have error 500 message in IE or in Chrome just empty frame.
I did some modifications to that page some time ago and everything was working fine then.
Can anyone help me with that ?
If a folder contains to much files you might get problems opening it in the file list module, as the gathering of all information and maybe creating of preview thumbnails may take longer than is granted to any php process.
If it's only the preview images you might be able to load the folder after some attempts, as sometime all preview images are generated, but as it also can be other delays because of too much files you need to enhace the runtimelimit
or/and you might need to restructure the files and folders.
Be aware that a moving of files with FTP/SSH might break content in the FE as you might invalidate some FAL (sys_file) records so that used files are not found any more. Better: enhance the timeout (temporarily) and move the files in the backend.
in general: if you only got a blank page you disabled all error-messages (which is ok for FE, but will leave you without hint about errors).
As a first start you could take a look in the webserver-error-log.
If you got no clues: enable errormessages in TYPO3 Install Tool (enable debug mode in "Configuration presets")
Ok.
I solved that.
I disabled that extension and then when I looked at maintenance tab on this extension i saw something like "delete LOCAL installation of this ext".
After deleting local installation and enabling system FileList instance, everything is working just fine :)
Thank You for help.

Phoenix Live Reload working intermittently

I'm trying to figure out why Phoenix live reload works "most of the time" but not always.
My config.exs has:
# Watch static and templates for browser reloading.
config :bespoke_work, BespokeWork.Web.Endpoint,
live_reload: [
patterns: [
~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
~r{priv/gettext/.*(po)$},
~r{lib/bespoke_work/web/views/.*(ex)$},
~r{lib/bespoke_work/web/templates/.*(eex)$}
]
]
Whenever I edit one of the templates that ends in *.html.eex it usually works right away. But sometimes it does not. And when live reload doesn't work, no matter how many times I try to refresh the page / clear the cache or go salsa dancing, it just won't refresh the content.
My folder structure is like this:
/name/lib/name/web/templates/page
|-index.html.eex
|-menu.html.eex
|-module[1-5].html.eex
(there are five modules files, the first being module1.html.eex and so on)
Is the fact that the files are not directly under the templates folder a problem? (They're inside the templates/page folder)
The index.html is rendered inside the layout/app.html.eex layout and, inside the index file, there are calls to render the menu and the other modules.
Not sure what I am missing here.
I tried running mix phx.digest manually, it didn't made any difference (it is already being triggered whenever needed).
How can I fix this behavior?
Phoenix 1.3.0-rc.2
Phoenix Live Reload 1.0.8
Elixir 1.4.5
Erlang/OTP 20
Impaciência 10
I found the culprit: Spacemacs lock files.
As part of my workflow is working with Front-end specs, sometimes I need to adjust things by the pixel or make some other minor (and really fast) adjustment: as when you noticed you have a typo or something.
In those situations, what appears to happen is the following:
I switch to Spacemacs.
As soon as I start typing (switch to Evil Mode insert state), Spacemacs creates an lock file in the same directory.
Phoenix Live Reload notices the change in the directory and well, live reloads the code (which is still the same because the auto-save file is not used by the app).
When I save the altered file, usually right away, Live Reload was still refreshing the browser from the detected auto-save file creation.
Although I still can't understand why simply refreshing the screen (with Browser Cache disabled on Chrome) won't display the proper code.

SASS Not Reloading with Play 2.0

When I make a change to a SASS file Chrome and Safari will reload with the changes after a refresh.
Suddenly they do not. I reverted to a version I know was working and I still have the same issue.
If I clear the browser cache then the changes load.
Therefore Play seems to be doing its job, but how strange that this is not isolated to a single browser.
I am thinking something could be wrong with the ETags or 304's.
Anyone have any idea?
I am using sbt-sass.
Turns out this was the effect of a %20, or space, in the project's folder name.
Removing the space fixed the issue.
A reversion could not fix it since the folder in question was just one step outside of the version control.
If you are having the same problem I would recommend removing spaces in project directory names.

CodeKit Reload very slow

Codekit is so darn slow in reloading files. Why is that and what can I do against it?
I use MAMP3 on Yosemite with Chrome 39. Refresh delay is on 0 seconds.
I just have a bunch of php files and some less. Nothing extraordinary.
And it reloads the files with a delay of about 10seconds.
The LESS files are compiled very fast, but not the page reload. Internet sharing is deactivated.
What else could be the problem?
From time to time there is a message Codekit connection is unstable. But everything is hosted local. How can this be unstable?
Okay. I figured out some things who slow down codekit significantly.
Mistake Nr. 1: Amount of Files
It seems to play a huge role how much files are added per project. My cms lives outside webroot but my less & css live inside webroot. So I threw in the whole project including the cms. This way I had no path conflicts (lazy me). This resulted in about 4000 Files. That is too much for codekit.
Solution: Still throw in the whole project but exclude the cms folders in codekit (Yeah I know RTFM)
Mistake Nr. 2: custom file extension
I started to work with twig files (after php was done) and miraculously browser refresh stoped working. Because Codekit doesn't doesen't seem to know twig. In order to keep Browser reload working one have to add twig into the Generig Page Extensions.
Thats it. Everything works just fine now.