Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John Dawson 24 posts 146 karma points
    Nov 13, 2018 @ 10:13
    John Dawson
    0

    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?

    Thanks for your help,

    John

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Nov 13, 2018 @ 10:29
    Dan Diplo
    1

    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).

  • John Dawson 24 posts 146 karma points
    Nov 13, 2018 @ 10:36
    John Dawson
    0

    So here's what's in the console when in the Media folder in the backoffice: enter image description here

    I'll try the other bits you mentioned now - thanks!

  • John Dawson 24 posts 146 karma points
    Nov 13, 2018 @ 11:01
    John Dawson
    0

    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?

    Thanks!

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Nov 13, 2018 @ 11:17
    Dan Diplo
    1

    Umm, strange. You should have the following files in /umbraco/views/media/ folder:

    create.html
    delete.html
    edit.html
    emptyrecyclebin.html
    move.html
    recyclebin.html
    restore.html
    

    Is it the view that is missing or the associated media file? Are the corresponding media files in your /Media/ folder?

  • John Dawson 24 posts 146 karma points
    Nov 13, 2018 @ 11:26
    John Dawson
    0

    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?

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Nov 13, 2018 @ 13:04
    Dan Diplo
    101

    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.

Please Sign in or register to post replies

Write your reply to:

Draft