Developer forum

Currently discussing: Plans to implement a Consent module for GDPR compliance.

Join the discussion!

Forum » PIM » PIM Crashes when image folder is (re)moved

PIM Crashes when image folder is (re)moved

Imar Spaanjaars

I get the following exception when the image folder for a product is removed or renamed:

Server Error in '/' Application.

Could not find a part of the path 'D:\Projects\Dynamicweb\Sites\\Files\Images\RizzoDesignFolder\Products'.

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.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Projects\Dynamicweb\Sites\\Files\Images\RizzoDesignFolder\Products'.

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: 

[DirectoryNotFoundException: Could not find a part of the path 'D:\Projects\Dynamicweb\Sites\\Files\Images\RizzoDesignFolder\Products'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +271
   System.IO.FileSystemEnumerableIterator`1.CommonInit() +313
   System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) +117
   Dynamicweb.Admin.eComBackend.PimMultiEdit.GetImageFromShopPattern(Shop productShop, String imageCompiled) +698
   Dynamicweb.Admin.eComBackend.PimMultiEdit.GetImagesFromPatterns(Product product, String groupId) +733
   Dynamicweb.Admin.eComBackend.PimMultiEdit.GetImagePath(Product product, String groupId) +90
   Dynamicweb.Admin.eComBackend.ProductList.ProductImage(Product prod, String groupId) +31
   Dynamicweb.Admin.eComBackend.ProductList.AddRow(Product prod, String groupId, Int32 index, String langId, Boolean addStockColumns) +2589
   Dynamicweb.Admin.eComBackend.ProductList.LoadData() +277
   Dynamicweb.Admin.eComBackend.ProductList.Page_Load(Object sender, EventArgs e) +756
   System.Web.UI.Control.OnLoad(EventArgs e) +103
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1381



1. Create a new product and assign it a small image like /Files/Products/MyProduct1.jpg

2. Save your changes.

3. In the file manager, rename the containing folder. For example, rename /Files/Products to /Files/ProductImages

4. Go back to Ecommerce (double-click the top icon to reload everything) and browse to the group that contains the image.

Expected outcome 

- The product is shown, and the image control is cleared (or a warning shows up?)

Actual outcome:

- The error from above.



You must be logged in to post in the forum