Go to previous topic
Go to next topic
Last Post 6/2/2020 1:29 PM by  Will Strohl
Category Images - unable to upload
 29 Replies
 1 Subscribed to this topic
 1 Subscribed to this forum
Author Messages





Basic Member






--
7/29/2018 6:54 PM
    Hi all,
    Just trying to update my category images & i recieve an error about my files being the wrong file type (this is not correct - files are either .jpg or .png - I have tried resaving them using photoshop etc)

    [img]http://test1.gfmdesign.co.nz/portals/1/Capturecategoryimages.PNG[/img]

    It but looking into the admin logs there seems like there is an issue with the photo resizer, i get this error when loading an image for a category. - i have tired clearing the databases and re importing products / categories.

    "Message:
    System.ArgumentException: Unable to create temporary file: {0}The file exists. at Hotcakes.Web.TempFiles.GetTemporaryFileInfo() at Hotcakes.Web.Images.ShrinkImageFileOnDisk(String originalFile, String newFileName, Int32 maxWidth, Int32 maxHeight) at Hotcakes.Commerce.Utilities.ImageProcessing.ShrinkImage(String originalFile, String outputDirectory, Int32 maxWidth, Int32 maxHeight)"

    I have just also realised that my Product images are not importing correctly via excel.

    Any help would be awesome! - if anyone knows any sql to correctly clear the HCC databases i think this would help alot as well.





    Basic Member






    --
    7/30/2018 1:08 AM
    Hi
    How big are your images? There's no visual feedback while uploading the images. You have to wait until they appear on the preview.
    For your excel import problem: Can you provide some test data? I imported several hundreds of images without problem.
    I do not have a clean-db script. I would do backups and rollback on a test environment.

    [Edit]
    I see you are using a sub portal (portals/1/) and not the default portal (portals/0/) for your shop. I never tested this. As HC was bundled with DNN before there could be a (potential) problem with this setup. Cannot test this atm.
    [/Edit]





    Basic Member






    --
    7/30/2018 7:44 PM
    Hi Reto,
    Thank you for you reply.

    Images are not that big, majority are around 400 x 400 px at 35kb. this isnt the issue.
    I had orginally been able to import images into products via spreedsheet, it had worked the first 5 times I imported (including uploading category images manually). Different portals does not seem to be the issue as I have had this store working fine on other portals.

    The issue is that after I had cleared the database of products and categories using the SQL console I could not upload images, as from the error it seems whatever is recreating the images as small and medium is having issues. (hence the error message "System.ArgumentException: Unable to create temporary file: {0}The file exists. at Hotcakes.Web.TempFiles.GetTemporaryFileInfo() at Hotcakes.Web.Images.ShrinkImageFileOnDisk(String originalFile, String newFileName, Int32 maxWidth, Int32 maxHeight) ")

    I had used these to clear the database. - This makes me think there is another table i have not cleared yet.
    DELETE FROM
    {databaseOwner}{objectQualifier}hcc_categoryxproperty
    DELETE FROM
    {databaseOwner}{objectQualifier}hcc_category
    DELETE FROM
    {databaseOwner}{objectQualifier}hcc_product
    DELETE FROM
    {databaseOwner}{objectQualifier}hcc_productimage

    I have 1900 products that I've been trying to import, everything but the images are working. (but the images were working before i cleared the database)

    I hope im making sense :)





    Basic Member






    --
    7/31/2018 12:49 AM
    When you deleted the shop data from the database, did you delete the data in the following directories too?
    [list][*]"\Portals\0\Hotcakes\Data\products\"
    [*]"\Portals\0\Hotcakes\Data\categoryicons\"
    [*]"\Portals\0\Hotcakes\Data\categorybanners\"[/list]





    Basic Member






    --
    8/5/2018 9:06 PM
    Yes, I had removed content from those directories (apart from the categorybanners as there was nothing in this folder).

    I've had no progress on this issue so far, so it looks like I might need to uninstall this module and possibly spin up a new instance / database. then reinstall. It is most likley due to removing the Products from the database via SQL console has cause this issue.





    Veteran Member






    --
    8/6/2018 7:50 PM
    It's difficult to determine what's causing the issue, but direct database queries is never a good idea for any system, even if it's open source.

    I'm not sure which version of Hotcakes Commerce you're on, but some earlier versions had the image import not working. This is why the project below was created.

    https://github.com/Hotcak.../ProcessImagesModule

    It's possible that the portal path is an issue, but we never ran into the in the past.
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Basic Member






    --
    8/12/2018 6:47 PM
    Hi Will,

    Thank you for your reply, I have spun up a new instance of DNN and created a new database to reimport. I am having the same issues.

    I installed the image process module but I am having the same issue with that module as i am with the import. it seems to create the product image folder and move the main image into the folder but nothing else.

    Originally importing images created a /medium/ image file and also a /small/ file these dont seem to be getting created. the folder structure for /small/ is being created but the folder left empty.

    Portals\0\Hotcakes\Data\products\5f7f984f-bc49-45ca-94bb-7ca2372da046 - has original image in.
    Portals\0\Hotcakes\Data\products\5f7f984f-bc49-45ca-94bb-7ca2372da046\small - image folder empty


    This was showing the medium image file, this is now not working as there is no medium image created.
    <img class="hc-autosize" src="@Model.ImageUrls.MediumlUrl" alt="@Model.Item.ProductName" />

    This was showing the Small image file, this is now not working. folder is being created but no image
    <img class="hc-autosize" src="@Model.ImageUrls.SmallUrl" alt="@Model.ImageUrls.SmallAltText" />

    This shows the original image - working.
    <img class="hc-autosize" src="@Model.OriginalImageUrl" alt="@Model.Item.ProductName" />





    Veteran Member






    --
    8/13/2018 2:00 PM
    I just tested this in Hotcakes 3.2.0 and it appears that the image is indeed being imported and added to the correct areas. What's not happening is the product is not being updated to know the image(s) exist for some reason. This appears to have broken at some point. I've created an issue in GitHub to get this fixed at some point in the future.

    https://github.com/Hotcak...erce/core/issues/153
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Basic Member






    --
    8/13/2018 4:45 PM
    Thanks Will, appreciate the assistance with this issue!





    Basic Member






    --
    8/23/2018 9:22 PM
    Doesn't this pretty much render this module almost usless, if someone cannot load pictures to a product?

    You cannot even add the image manually through the backoffice. you can setup the /medium folder then copy the images into /medium & / small but this isnt practical when setting up an online store for a client





    Veteran Member






    --
    8/26/2018 5:01 PM
    Not at all. The only thing that's broken with images is when you use the import process. There are workarounds in the meantime, including using the API, the sample process images module, and individually updating products.
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Basic Member






    --
    8/26/2018 8:44 PM
    Hi Will,

    I cannot add images manually to products or cateories, even if I added the product manually I still cannot add images.
    I can only get images to display in the product list if I change the code within the list template, images are broken in the back office as they are also broken in product edit details view.

    The sample process image module doesn't solve any of my issues, from what i could tell it re-created the folder sturcture. but didnt create a small / medium folder or image file.

    Here is a video of me showing this: https://www.useloom.com/s...449294447650f437f6af
    Appologise for my slow PC

    I've setup mutiple instances of DNN wiuth hotcakes installed even one with the Hotcakes CRM build into DNN this is also broken.
    Unless I'm missing a massive step in the setup process.

    It doesnt create a medium folder nor does it add a small image into the small folder rendering the product to look broken.





    Veteran Member






    --
    8/27/2018 2:37 PM
    That's odd. I'm able to add/save images just fine in a clean installation.

    As for the broken image links, this is often due to there not being a primary domain name (site alias) associated with the website. It's also possible that your URL settings are conflicting (especially if you have another custom URL provider installed).
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Basic Member






    --
    8/29/2018 8:18 PM
    Hi Will and co

    I work with Gilderroot and am now helping him to try to work though this issue.

    I think there may be some confusion due to the fact thta this thread was orginally talking about bulk importing images and we have now realised there is a larger issue with uploading issues via the Hotcakes Administration.

    Here is the current state of play:
    we are self hosting on two Azure Virtual Machines, one for DB and one for web and files.
    Microsoft-IIS/10.0
    DNN PLATFORM v. 09.02.00
    Hotcakes v. 3.2.0

    Only one URL extension provider installed - Hotcakes Url Extension Provider
    Have tested on portal 0 and also other child portals - same result
    We have tried complete fresh installs of DNN and Hotcakes
    have tested using subdomains and also base domain
    have ensured that only one site Alias is set and have tried canionical and redirect

    We really are at a loss here as to what is causing this and how to fix it so any help would be greatly appreciated in pointing us in the right direction.

    [b]Steps to recreate issue[/b]
    create new product via Hotcakes Administration.
    Browes and add a new image- image displays fine in the browser
    save or save and close the product
    on viewing the product there is no product image and only a broken image path.
    viewing the portal folders shows a unique folder for the product which contains the orginal uploaded image and a folder labeled "small"
    the folder label small is empty.
    on checking the event viewer I can see the below error message

    when trying to add 'Additional Images' to a product we are seeing the exact same result.


    [b]Error Message[/b]

    Severity:Error

    AssemblyVersion:9.2.0

    PortalID:17

    PortalName:Testing Store

    UserID:1

    UserName:host

    ActiveTabID:426

    ActiveTabName:Home

    RawURL:/DesktopModules/Hotcakes/Core/Admin/catalog/Products_Edit.aspx?id=b69006c8-93f4-4eca-8542-9ea03c29fba6

    AbsoluteURL:/DesktopModules/Hotcakes/Core/Admin/catalog/Products_Edit.aspx

    AbsoluteURLReferrer:http://test1.gfmdesign.co...ca-8542-9ea03c29fba6

    UserAgent:Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

    DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

    ExceptionGUID:1405b686-da0e-44d5-b5c0-3b48e210afc1

    InnerException:Unable to create temporary file: {0}The file exists.

    FileName:

    FileLineNumber:0

    FileColumnNumber:0

    Method:Hotcakes.Web.TempFiles.GetTemporaryFileInfo

    StackTrace:

    Message:

    System.ArgumentException: Unable to create temporary file: {0}The file exists. at Hotcakes.Web.TempFiles.GetTemporaryFileInfo() at Hotcakes.Web.Images.ShrinkImageFileOnDisk(String originalFile, String newFileName, Int32 maxWidth, Int32 maxHeight) at Hotcakes.Commerce.Utilities.ImageProcessing.ShrinkImage(String originalFile, String outputDirectory, Int32 maxWidth, Int32 maxHeight)
    Source:

    Server Name: WebVM








    Veteran Member






    --
    8/31/2018 5:26 PM
    You'll see that a clean instance of Hotcakes uploads images without issue in the video I just created below.

    https://www.youtube.com/watch?v=Urr61_mec3Q

    The exception you've posted suggests another scenario though. It sounds like there is already a file of the same name in the file system. I'd suggest clearing out the Hotcakes import folder from the respective portal folder. An example is below.

    ~/Portals/{0}/Hotcakes/Data/import/
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Basic Member






    --
    9/2/2018 6:59 PM
    Hi Will

    Thanks again for looking at this. Following you suggestion I went to clean out the Import folder, however there was no folder called 'import'.

    In this path \Portals\17\Hotcakes\Data\ I have a 'products' folder and a 'temp' folder.

    In 'products' I have a unique folder for each new product created which then contains the orginal image upload and an empty folder called small

    In the temp folder is my most recent image upload that has been renamed.

    Here is a short video showing the file structure https://www.useloom.com/s...4283b722e740b2e0920d

    you will note that the sampl products that come with the install have the expected folder structure and images. and it is simply the new product I have added this morning that is missing the files and folders.

    Also not I renamed an image on my PC to 'MondayMorning.jpg' before attempting to load to the site, this way I could be confidant the image didn't already exist in the hotcakes file system.

    not sure what to check next.





    Veteran Member






    --
    9/18/2018 1:19 PM
    Can you try deleting the Temp folder and try again?
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Basic Member






    --
    9/18/2018 6:05 PM
    Hi Will

    I have tried that this morning to no avail.

    After deleting the Temp folder and on uploading a new image to a product, hotcakes adds the orginal image to the product folder then recreates the Temp folder and adds the image there(with unique file name). no small or medium images are created.

    video showing folder behavior during upload https://www.useloom.com/s...424abe4e8336db76f5da






    Veteran Member






    --
    9/21/2018 3:43 PM
    Is this on a multi-portal instance of DNN? If yes, how many instances have you run the installation wizard on?

    Does this website have 2sxc installed? If yes, which version?
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Basic Member






    --
    9/23/2018 6:46 PM
    [quote=Will Strohl;1023]Is this on a multi-portal instance of DNN? If yes, how many instances have you run the installation wizard on?[/quote]
    Yes this is a multi-portal instance of DNN.
    Setup wizard has been run once each on Portal 0 and Portal 17.


    [quote=Will Strohl;1023]Does this website have 2sxc installed? If yes, which version?[/quote]
    No 2Sxc isn't installed on this instance of DNN(although we do have it installed on another instance in the same server)






    Basic Member






    --
    9/23/2018 10:32 PM
    [b]UPDATE - Fresh DNN install[/b]

    OK so in the interests of testing this and ruling out any possible external influences from other modules I have gone ahead and done a completely fresh install of DNN 9.2.1 with new file sand a new database.

    Once the new install of DNN was complete I downloaded a fresh install file of Hotcakes and installed the module, with no errors. I then ran the setup wizard from portal 0 and added my first product and once again I have had the same issue with no products being created.

    Here are the steps I took directly after the fresh install of DNN
    https://www.useloom.com/s...49878ea7b67fa53937a9

    A couple of things that I have noticed that may or may not be relevant to the issue at hand is:
    in the admin menu under 'manage' there were 2 p[ages added both called 'Hotcakes Administration' the first one goes to here /DesktopModules/Hotcakes/Core/Admin/Default.aspx and displays the Hotcakes dashboard. The second ones goes to /Host/Hotcakes-Administration/portalid/0 and displays a blank page.

    looking at this further I have created a a standard administrator user in DNN and logged in as this user and when i do so I can not see either of these pages at all https://www.useloom.com/s...470bab4353c68d94dc3e

    Do we have any confirmed reports of users successfully installing Hotcakes to a fresh install of DNN 9.2.1?
    I'm wondering if these is some kind of issue with DNN 9.2.1 and Hotckaes that hasn't been spotted yet as people have been upgrading from earlier versions?

    Or is it potentially an issue with how we have our Azure VMs setup ie one web server and one database server?














    Veteran Member






    --
    10/11/2018 3:51 PM
    The original issue was that the ImageResizer was creating this issue... Is that still correct? If yes, can you look at the properties of the DLL and tell us what version it is? Also, please look in the web.config and tell us if this DLL is in the redirectBinding section. If it is, it would be helpful to have that pasted here.
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Basic Member






    --
    10/11/2018 4:06 PM
    [quote=Will Strohl;1045]The original issue was that the ImageResizer was creating this issue... Is that still correct? If yes, can you look at the properties of the DLL and tell us what version it is? Also, please look in the web.config and tell us if this DLL is in the redirectBinding section. If it is, it would be helpful to have that pasted here.[/quote]


    ImageResizer.dll version 3.4.2.549

    a search of the web.config file return zero results for 'imageresizer'








    Veteran Member






    --
    11/14/2018 3:28 PM
    I just did a clean installation again to see if I can finally reproduce the issue. I still can't. In the video example below, you'll see that I have a clean installation of DNN 9.2.1 and Hotcakes Commerce 3.2.1, and I'm able to create a category with an image and no errors.

    https://www.screencast.com/t/K7pOsRrD9HJE

    (Except for the DNN theme error that I've logged after creating this video :) )

    https://github.com/Hotcak...erce-core/issues/185
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Basic Member






    --
    11/18/2018 11:16 PM
    [quote=Will Strohl;1045]The original issue was that the ImageResizer was creating this issue... Is that still correct? If yes, can you look at the properties of the DLL and tell us what version it is? Also, please look in the web.config and tell us if this DLL is in the redirectBinding section. If it is, it would be helpful to have that pasted here.[/quote]

    Hi Will, as I mentioned in a previous post the image resizer dll isn't referenced in the web.config at all. should it be/ and if so can you share the code with me that your instance has and I can try adding that?

    I can see from your video that everything seems to be working 100% fine for you but I'm still at a loss to explain what is happening on any of our installs.








    Basic Member






    --
    11/19/2018 7:11 PM
    [b]We have finally found the cause for this error and a solutions for it. [/b]

    what has happened is the temp windows directory that hotcakes uses to create the various resized images was full and therefore could not create the images.

    After clearing the temp directory we can see that normal behavior has returned to the image uploading and at this stage we have no issues.

    One final question remains, should Hotcakes be deleting these temp files it creates after it is finished with them?





    Veteran Member






    --
    11/20/2018 12:04 PM
    The original forum thread that this one is based on asks for that folder to be deleted.

    This is a known issue.

    https://github.com/Hotcak...merce-core/issues/44
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Basic Member






    --
    11/20/2018 4:02 PM
    [quote=Will Strohl;1072]The original forum thread that this one is based on asks for that folder to be deleted.

    This is a known issue.

    https://github.com/Hotcak...merce-core/issues/44 [/quote]

    To be clear the temp folder that has been discussed earlier in this thread was at the portal level:

    "Thanks again for looking at this. Following you suggestion I went to clean out the Import folder, however there was no folder called 'import'.

    In this path \Portals\17\Hotcakes\Data\ I have a 'products' folder and a 'temp' folder. "

    The temp folder we are now discussing is completely outside of DNN and is a windows directory C:\Windows\Temp









    Veteran Member






    --
    11/20/2018 5:05 PM
    [quote=Bryan;1073]The temp folder we are now discussing is completely outside of DNN and is a windows directory C:\Windows\Temp[/quote]

    Oh... Wow. That's a first. I haven't heard of that one getting filled before. The Hotcakes routine has its own temp folder that it uses. This one would require some additional research, as it's definitely going to be some more related to how .NET and ASP.NET works, versus Hotcakes itself.
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Veteran Member






    --
    6/2/2020 1:29 PM
    We just finished cooking up a fresh batch of Hotcakes for you. Enjoy! ;)

    https://dnncommunity.org/...ks-a-Major-Milestone
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes


    ---