Wampserver localhost opening wrong files? - wampserver

So, I'm trying to update my homepage for my school project, and I've made some noticeable changes in my html file, but when I open localhost, it shows the old ones.
Yes, I have tried saving, and it still opens the old ones. I tried emptying the www folder and putting the files back, but that doesn't work either.
I did notice that it's accepting the changes in css files, but it doesn't want to update html files.

Might be cache problems. Just clear you browser cache and try.
Make sure you are putting the right file, sometime the file you are editing and the file you have in the server might be different.

Related

having external files in an electron application

I have an electron app, and when I make it, it packages and compiles everything.
Sounds like it works perfectly right?
Well, problem is I want one of the folders to not be compiled, but still be accessible by my static files, so the users can add or remove content from the folders.
I've tried making it in a seperate folder, but then it can't find the files even when it's placed in the correct relative path.
Overall, I want my app to exist next to a folder and my <script src="./folder/script.js"></script> to actually be able to access it.
I'm new to basically anything node or electron so i'm probably making some dumb mistake.
Thanks in advance.
Having your user touching files close to your Electron application may be fraught with danger. If they accidently overwrite an important file or accidently delete an important file then your application may stop working and require the user to perform a re-install.
Instead, have any default files the user may need to "touch" packaged up with your application and then upon your applications first run, copy these files (and any necessary folder structure) over to the users home, desktop, documents, downloads or even userData directory.
That way, your application will always know where to find them and the directory is a directory your user will already be comfortable adding files to and removing files from.
You can always let the use choose where these files are stored as a settings option which persists in an application setting file, using something similar to path.join(app.getPath('userData'), 'settings.json');
See Electron's app.getPath(name) for more information.

Why can't I view or edit Umbraco templates?

When I open the Umbraco (7.6.3) backoffice, I'm unable to view or make changes to templates. It seems like other functionality is unaffected, and I can create & edit specific pages. However, attempting to open the templates themselves just leads to a white screen. This problem exists across browsers:
Other screens render just fine:
What gives?
Checking the console when attempting to load gives an interesting error:
Error: Argument 'Umbraco.Editors.Templates.EditController' is not a function, got undefined...
Resolution:
The issue seemed to be caused by outdated files in the Umbraco folder. Copying most directories over from packages\UmbracoCms.7.6.3\UmbracoFiles\umbraco\ seems to have done the trick.
Looking at the changelog, it seems like the JS folder was the most influential in getting this fixed.
Are you sure that you're on 7.6.3? The UI appears to be pre-7.6 (I can tell because the colours haven't been updated).
If you have just upgraded, it's possible that your browser has cached the JS which is used - hard refresh your browser to see if the UI updates.
Umbraco also uses a dependency service to compile all of the used JS/CSS files together into one large one. This service will not be used if your website is in debug mode. Either:
Turn debug mode on in the Web.config
Delete any files in the \App_Data\ClientDependency\ folder as this is where the cached compiled files are kept (these will be regenerated)
My first thought would be file permissions.
Have you run the health check for permissions in the developer section? Need to make sure that your application pool user has write permissions on the Views folder.

Using Backload to upload image to project file but images do not appear until project is rebuilt

Using MVC 4 I downloaded Blackcity Backload from nuget, I am trying to save the uploaded images to a file that is within my project. Everything works great and it shows that the image uploaded, except for the fact that after you upload a new image, and refresh the page the image does not appear in the list of returned images even though it was saved. Also if you delete a file it comes off the list at first but again if you refresh the page it is back. If you rebuild the application then everything appears as it should and the images in the backload file list are all listed correctly and they match what is in the actual file.
I thought it may be a server cache issue but I did all i can to prevent the server from caching and still same problem.
I think it may have to do with the fact that Backloader is dynamically creating folders to put the images in and they are not included in the project even though they are in the file structure. So since they are not part of the project they are not being returned in the get request. Its not until you rebuild that they are recognized as part of the project.
Is there a way to dynamically include new files in the project without rebuilding?
Please help. This is killing me.
Ok this is solved. Had to remove filters.Add(new AuthorizeAttribute()) from my global filters and then add [Authorize] to each controller and it worked.

how to extract css and html from already opened page which has been changed and modifed locally

i am faced with a huge problem. I have been developing a website since many days now. I have a style1.css which i use through dream weaver. today morning i was starting work on a new page and i by mistake linked an old style1.css from another website folder into my current HTML/JSP page(that i started work on today) and i continued everything. It got saved and the latest style1.css got replaced by the older one and got updated. This is screwed up eveything, and i dont have a backup because i never made such a blunder ever and the file that i linked was from an older backup. I didnt know. Now i have an old Reg.html(the proper one) page open in my Opera browser. What i want to do is copy the css and HTML from the browser itself from memory. Because if i view source and click on my linked CSS file, it shows the current(wrong one) and also the HTML source maybe wrong. I have replaced about 3-4 days of work, i cannot afford to rework, so if there any way i can extract html and css from an opened page from memory. (what i am saying is that if i refresh, my work is gone, so i havent refreshed it and carefully trying to extract out.) I tried recuva file recovery software locally, in my css folder, but it doesnt work. in windows previuos versions also there is nothing. In dreamweaver is there any backup mechanism from which i can restore it? I think my only option is to extract from opera. Is there any software or mechanism i can use to do that? or do i have to work again. The latter means that i have to do all the work again on multiple pages. Please help me! :(

Force SquishIt to refresh/recreate minified files

Am looking to integrate SquishIt with our webapp. What I have noticed from the testing locally is, SquishIt generates the file only once. Based on other SO answers and reading the SquishIt code I gather that the file generation happens if the HttpCache doesn't contain a value of the generated hashed key.
If without restarting the app, or without clearing the HttpCache, if I delete the generated minified file, then SquishIt doesn't recreate the file.
Is there any way to force SquishIt to recreate the file, if it doesn't exist?
Earlier we were using RequestReduce and we noticed the it didn't always pick up css/js changes if only the css/js files were edited (ie, web.config was not edited and the app was not restarted). To ensure that the changes are picked up, we always delete all generated files when deploying.
Will SquishIt ALWAYS detect the changed code, even if web.config is not modified, the app is not restarted and the HttpCache is not cleared?
The [BundleCache.Add] (https://github.com/jetheredge/SquishIt/blob/master/SquishIt.Framework/BundleCache.cs#L40-54) method's code helps answer this question
Can I force SquishIt to generated files by simply deleting the generated files?
After thinking about the scenario I need to handle, this is the wrong question to ask.
EDIT:
What are the cache headers sent to the client for these generated files?
My scenario is as follows. I switched from the default JS minifier to JsMinMinifier. After deleting the files (RenderOnlyIfOutputFileIsMissing is set) and restarting the app, the minified files got generated. However, they had the same name as the previous files (I wrongly assumed it would have a different name).
Refreshing my browser showed that the newly generated files were sent by the server. How did this happen? If the assets had a long expiration cache header set on them, then the browser shouldn't have requested the new file from the server. (Inspecting the assets in Firebug, I am unable to understand the cache policy. To me it looks like it's set to cache for a couple of mins).
EDIT 2:
My take away is, there is no need to delete the generated file to cause regeneration. If the corresponding source files change, SquishIt WILL generate an appropriate file.
It should - we are adding cache dependencies for source files (not the generated ones) so if one of them is edited the entry in the bundle cache should be invalidated. See BundleCache.Add
No - once an entry is in the bundle cache we assume the output file will be there, so you'd end up with the file not being found. This is by design, we haven't really heard a compelling case against it.
Deleting generated files when deploying should be fine though, even if not strictly necessary - don't you need to restart the app then anyway?
If you are really concerned about files lingering you may want to consider using SquishIt without the file system

Resources