Umbraco can't find any files within `Views` folder
Hi, I have started working as a dev on a web platform that has already been running for a couple of years. I have never used Umbraco before so I have a local copy of the build that I'm using to learn this CMS and this specific site setup.
I have it running fine on localhost through Visual Code and SQL Server Management Studio except when I try to access the Media folder and I get many 404 errors (within backoffice), e.g.:
Request error: The URL returned a 404 (not found):
views/media/edit.html
Request error: The URL returned a 404 (not found):
views/dashboard/media/mediafolderbrowser.html
Both these files exist and are in those locations so I'm not sure where the 404 is coming from? Perhaps they are referenced incorrectly elsewhere in some configuration file?
Can you check the browser developer console to see if there are any errors in the console? These are sometimes more specific. You can also check logs in /App_Data/Logs/ in case these hold more clues.
Sometimes these type of errors can be caused by a corrupted cache. So I'd go to the /App_Data/ folder in Umbraco and delete the entire contents of the /TEMP/ folder in there. This will get re-created with fresh versions. You can also try clearing your browser cache for the site, too.
You can also try running in debug mode (ie. setting debug='true' in web.config) to see if this helps (this disables Umbraco's JS caching via the Client Dependency framework).
Okay, so I deleted the contents of the /TEMP/ folder but no change, also debug mode is already set to true in web.config actually.
I can't actually add new Media as I get a 404 for create.html as well. These missing files are all under the ..\Umbraco\Views\media\ (create and edit) or ..\Umbraco\Views\dashboard\media\ (mediafolderbrowser) folders. Are they the correct places?
Yes, so all those files are there and in the right place but the /Media/ folder doesn't correspond at all with what's in the Media section of the backoffice. Would that cause a 404 for the html files used to browse those images then, if the images themselves were missing?
Sorry, I am new to Umbraco. I knew there were missing images but thought I should still be able to add my own. I'll need to get the relevant images and folders from the site creator to get it to work properly, I guess?
Yes, so all those files are there and in the right place but the
/Media/ folder doesn't correspond at all with what's in the Media
section of the backoffice. Would that cause a 404 for the html files
used to browse those images then, if the images themselves were
missing?
Yep, that would.
Basically, Umbraco stores the physical media files (by default) in the filestore, within the /Media/ folder. Each file appears within a folder with a unique number.
However, the actual media entries that appear in the Media tree are all stored in the database. So basically the database holds the references to the files on the filestore. But if those files are missing, then the database reference will be pointing to a missing file, which can cause a 404.
So it sounds like your database is referencing files that don't exist - so, yes, you'd need to get a copy of the /Media/ folder from the site creator.
Umbraco can't find any files within `Views` folder
Hi, I have started working as a dev on a web platform that has already been running for a couple of years. I have never used Umbraco before so I have a local copy of the build that I'm using to learn this CMS and this specific site setup.
I have it running fine on
localhost
through Visual Code and SQL Server Management Studio except when I try to access the Media folder and I get many 404 errors (within backoffice), e.g.:Both these files exist and are in those locations so I'm not sure where the 404 is coming from? Perhaps they are referenced incorrectly elsewhere in some configuration file?
Thanks for your help,
John
Can you check the browser developer console to see if there are any errors in the console? These are sometimes more specific. You can also check logs in
/App_Data/Logs/
in case these hold more clues.Sometimes these type of errors can be caused by a corrupted cache. So I'd go to the
/App_Data/
folder in Umbraco and delete the entire contents of the/TEMP/
folder in there. This will get re-created with fresh versions. You can also try clearing your browser cache for the site, too.You can also try running in debug mode (ie. setting
debug='true'
inweb.config
) to see if this helps (this disables Umbraco's JS caching via the Client Dependency framework).So here's what's in the console when in the Media folder in the backoffice:
I'll try the other bits you mentioned now - thanks!
Okay, so I deleted the contents of the
/TEMP/
folder but no change, also debug mode is already set totrue
inweb.config
actually.I can't actually add new Media as I get a 404 for
create.html
as well. These missing files are all under the..\Umbraco\Views\media\
(create
andedit
) or..\Umbraco\Views\dashboard\media\
(mediafolderbrowser
) folders. Are they the correct places?Thanks!
Umm, strange. You should have the following files in
/umbraco/views/media/
folder:Is it the view that is missing or the associated media file? Are the corresponding media files in your
/Media/
folder?Yes, so all those files are there and in the right place but the
/Media/
folder doesn't correspond at all with what's in the Media section of the backoffice. Would that cause a 404 for the html files used to browse those images then, if the images themselves were missing?Sorry, I am new to Umbraco. I knew there were missing images but thought I should still be able to add my own. I'll need to get the relevant images and folders from the site creator to get it to work properly, I guess?
Yep, that would.
Basically, Umbraco stores the physical media files (by default) in the filestore, within the /Media/ folder. Each file appears within a folder with a unique number.
However, the actual media entries that appear in the Media tree are all stored in the database. So basically the database holds the references to the files on the filestore. But if those files are missing, then the database reference will be pointing to a missing file, which can cause a 404.
So it sounds like your database is referencing files that don't exist - so, yes, you'd need to get a copy of the
/Media/
folder from the site creator.is working on a reply...