New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Umbraco 8 refresh nucache broken after using media service #7766
Comments
Hi there @teeto - this sounds like an excellent question for the forums where our friendly community can help you find the best solution for your requirements. |
Thanks @nul800sebastiaan i will post it on the forums. May it be related to this issue? |
Thanks @nul800sebastiaan as soon as 8.6.0 is published i will update the project and check for it. |
Finally i solved my issue. I write it here if i can help another user. Analyzing the error on the source code (see other related issue here: #7756) , i remembered one day i was moving a media folder with 6000 items inside an empty folder. The process hang and i had to reboot the application. I think that made an error on the db and some media items where not fine to load onto the cache. What i was doing was quering the items that where in db but not in cache and, using media service, getting them and resaving. That temporarily added the item to the cache and i could query it in the front site. But sometimes the cache gets rebuilt and the items come back to null on the queries. What i have done is create an empty new folder on media. Then resaving this items but before setting de ParentId to this new folder. That way they get moved to the new folder and i can rebuild the cache again. Then, i have made the process again moving them to the original folder. Now i dont get that error anymore. |
"8.6.0 final is out in a few days, this should no longer be a problem for you after you upgrade!" |
@andersbrohall 9 minutes after you asked.. because you asked, of course! 😂 https://twitter.com/umbraco/status/1244921666679046144 Some world pandemic got in the way of our plans, sorry about the delay. 😉 |
What! Sounds horrible! |
@andersbrohall if you have the same problem it is not solved on 8.6 |
Umbraco v8.5.3
I have a site where i had to manually import products from csv using content service.
After that i had to import media from a pictures folder using media service.
There is something wrong because i cant get some pictures using umbraco helper and querying by id (ie. Umbraco.Media(1310)), it gets null. But i can using the content service and then if i save it i can see the picture. Or editing the item using backoffice.
I have tried to rebuild the memory cache (from published status in settings section) but i get this error: System.NullReferenceException: Object reference not set to an instance of an object.
First lines of stack trace:
I have tried to rebuild the database cache, it gets no error but the problem persists and after that if i try to rebuild the memory cache i get same error.
Also, i have tried to query all media items in db and use the media service to save again using this code:
After that i clean temp files from app_data and restart the app and all the pictures go back.
Then if i try to reload cache problem goes back again.
I guess at some point there was an error in the database, but how could i fix this?
The text was updated successfully, but these errors were encountered: