Category Images Gone After 2.2 Upgrade

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Upgraded to 2.2 and everything seems okay except all my category images are now gone. Where are these images stored? I have backups of the web and database content, but not sure how to fix this...
12 years ago
We had this issue. Going from 1.7-1.9-2.2   all the way through. We solved it by making sure we left 'store images in database' until we got to 2.2 THEN changed it to store in the file system through admin panel of 2.2  you may have to wait a touch as it puts them into the thumbs folder.

Hope it helps as it worked for us twice!
12 years ago
That probably won't help as we already had them in the file system... So I think it is looking in the wrong place or something...
12 years ago
Don't get it... the images are in the content directory AND the database (categories and pictures tables) so what the heck is going on? Doesn't seem this forum is very helpful, I'm afraid to say...
12 years ago
(it's only been a few hours since you posted :)

Check the Category to Picture relationship

SELECT c.Id, c.Name, c.PictureId, p.Id as Found
  FROM Category c
  LEFT OUTER JOIN Picture p
     ON p.Id = c.PictureId
12 years ago
Interestingly we have just had this same issue.

Did you get it sorted. Also did if you look under media settings does it say database? And in all settings (page 11) media.images.storeindb  say false. Ours does they dont seem to match. If you click on change in the admin area it throws an exception. You can change it in all settings though.

However it still doesnt find the images
12 years ago
Parameter is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Parameter is not valid.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[ArgumentException: Parameter is not valid.]
   System.Drawing.Bitmap..ctor(Stream stream) +459961
   Nop.Services.Media.PictureService.ValidatePicture(Byte[] pictureBinary, String mimeType) in f:\Own\NopCommerce\Sources\src\Libraries\Nop.Services\Media\PictureService.cs:529
   Nop.Services.Media.PictureService.UpdatePicture(Int32 pictureId, Byte[] pictureBinary, String mimeType, String seoFilename, Boolean isNew) in f:\Own\NopCommerce\Sources\src\Libraries\Nop.Services\Media\PictureService.cs:660
   Nop.Services.Media.PictureService.set_StoreInDb(Boolean value) in f:\Own\NopCommerce\Sources\src\Libraries\Nop.Services\Media\PictureService.cs:771
   Nop.Admin.Controllers.SettingController.ChangePictureStorage() +66
   lambda_method(Closure , ControllerBase , Object[] ) +62
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +208
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +55
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +263
   System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +191
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8897857
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
12 years ago
Yeah, I got that error too when I tried to switch storage locations... Well, this bites. I really don't want to go through and upload dozens of photos again...
12 years ago
Table relationships seem fine...

One thing I don't get... how does nopCommerce know where the file is stored? There's no physical file path in the "Picture" table. Also, what does the "new" field do?
12 years ago
My images are back now...

Here's a tip: make sure you copied the images from "Content/Images" to the new install!

Actually, I thought I did that but for some reason they weren't there. They are now.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.