A while back I made the mistake of adding some images to media folders manually using windows explorer. I realized this was a mistake the next time I tried to open the media section in the Umbraco back office (forget exactly what happened, but it was noticeable that there was a problem). I removed the files I added, but the media section has never been the same. I can add items okay, but whenever I try to delete them, I get an error message saying that no document was found with some long UUID looking number. The items are removed from the back office, but not from the folder structure (when I go to the actual media folder, all my deleted items are still there). In the past, I would've just reinstalled Umbraco, but I've actually been able to make enough progress that I don't want to reinsall EVERYTHING. I'm wondering if there's a way to reset just the media section. I realize that many of the database tables are interconnected and that media and documents share a table, so maybe there's nothing I can do, but if anyone knows any way of solving this issue, I would really appreciate the help.
There's an option to "clean" the media folder in the FALM Housekeeping package I have no idea if it will help you, but maybe worth a shot if Richard's suggestion doesn't work?
Richard, I have a feeling your solution would probably work . . . I'm just not sure I have the patience for that at the moment. From what I've read, upgrading Umbraco is less than straight-forward. Think I'll give Dan's suggestion a try.
EDIT: Well, FALM Housekeeper does have a "clean" function for the media section. Unfortunately, all it does it check for orphan folders in the media folder. My problem seems to be something related to UUIDs, like they aren't lining up correctly somehow. It looks like I'll have to give upgrading a try.
I'm curious what would happen if I deleted all the content in my media section, manually deleted everything in the media folder, and manually deleted all media entries in the DB. I thought about trying it, but the relational mappings in the DB are so complicated, I'd be afraid I missed something and end up with an even worse problem than I have now.
Ok, after a couple hours work (and a few headaches), I went from 4.7.2 to 4.8, but it didn't solve the issue. When I delete items in the media section, I still get the error saying it can't find the item. Additionally, I now have a root "media" item with a subfolder called "media." So it just lodged my previous structure under the current one. I've yet to try upgrading to 4.9 (that'll have to wait for another day), but I'm not optimistic now that it'll work. And I'll probably end up with three levels of "media."
Any other thoughts? Essentially, somehow my back office is out of sync with the database and file system.
There shouldn't be any cascade delete issue unless the media item is referenced in another table, but as long as you remove unwanted rows from all tables it should be fine.
I don't understand why an upgrade would hold onto previous directories - but then I'm not 100% on exactly which tables get hit by the upgrade. Obviously it's not all of them or it would wipe all your content.
If you "show all files" in visual studio, are the folders there? The GUID should be the name
I have not tried manually removing anything yet. I'll try upgrading to 4.9 first. Since they made a lot of changes in 4.9 to the media section, there's a chance that that will correct the issue. I might be able to do that tonight if I have time. But if that doesn't work, my next idea is to try the manually deleting to restart with a clean media section.
Fixing database issues
A while back I made the mistake of adding some images to media folders manually using windows explorer. I realized this was a mistake the next time I tried to open the media section in the Umbraco back office (forget exactly what happened, but it was noticeable that there was a problem). I removed the files I added, but the media section has never been the same. I can add items okay, but whenever I try to delete them, I get an error message saying that no document was found with some long UUID looking number. The items are removed from the back office, but not from the folder structure (when I go to the actual media folder, all my deleted items are still there). In the past, I would've just reinstalled Umbraco, but I've actually been able to make enough progress that I don't want to reinsall EVERYTHING. I'm wondering if there's a way to reset just the media section. I realize that many of the database tables are interconnected and that media and documents share a table, so maybe there's nothing I can do, but if anyone knows any way of solving this issue, I would really appreciate the help.
I'm using Umbraco 4.7.2.
Andrew
I'm not certain of this but I think either reinstalling or better yet, upgrading Umbraco should clean this up.
Upgrade would be better option and won't mess with your content.
Although I would make sure you have a full backup of the project and DB before doing this.
There's an option to "clean" the media folder in the FALM Housekeeping package I have no idea if it will help you, but maybe worth a shot if Richard's suggestion doesn't work?
Richard, I have a feeling your solution would probably work . . . I'm just not sure I have the patience for that at the moment. From what I've read, upgrading Umbraco is less than straight-forward. Think I'll give Dan's suggestion a try.
EDIT: Well, FALM Housekeeper does have a "clean" function for the media section. Unfortunately, all it does it check for orphan folders in the media folder. My problem seems to be something related to UUIDs, like they aren't lining up correctly somehow. It looks like I'll have to give upgrading a try.
I'm curious what would happen if I deleted all the content in my media section, manually deleted everything in the media folder, and manually deleted all media entries in the DB. I thought about trying it, but the relational mappings in the DB are so complicated, I'd be afraid I missed something and end up with an even worse problem than I have now.
Ok, after a couple hours work (and a few headaches), I went from 4.7.2 to 4.8, but it didn't solve the issue. When I delete items in the media section, I still get the error saying it can't find the item. Additionally, I now have a root "media" item with a subfolder called "media." So it just lodged my previous structure under the current one. I've yet to try upgrading to 4.9 (that'll have to wait for another day), but I'm not optimistic now that it'll work. And I'll probably end up with three levels of "media."
Any other thoughts? Essentially, somehow my back office is out of sync with the database and file system.
Did you try to manually remove the rows from db?
There shouldn't be any cascade delete issue unless the media item is referenced in another table, but as long as you remove unwanted rows from all tables it should be fine.
I don't understand why an upgrade would hold onto previous directories - but then I'm not 100% on exactly which tables get hit by the upgrade. Obviously it's not all of them or it would wipe all your content.
If you "show all files" in visual studio, are the folders there? The GUID should be the name
I have not tried manually removing anything yet. I'll try upgrading to 4.9 first. Since they made a lot of changes in 4.9 to the media section, there's a chance that that will correct the issue. I might be able to do that tonight if I have time. But if that doesn't work, my next idea is to try the manually deleting to restart with a clean media section.
is working on a reply...