vanjarosoftware / Vanjaro.Platform

Vanjaro is all-in-one integrated Website Builder, CMS, Online Store, Memberships, and Digital Marketing platform that grows with your business.
https://www.vanjaro.com
MIT License
57 stars 25 forks source link

Image Upload not working properly #2167

Open inu-web opened 2 years ago

inu-web commented 2 years ago

Product & Version Bug applies to Vanjaro for DNN v.1.3.0 on DNN v.9.10.2 with Telerik dependencies removed as recommended by dnn

Describe the bug When uploading an image by double clicking an image block and pressing "+" in the Vanjaro Assets manager for image, an error toast message appears saying "Error: image upload failed - see logs"

To Reproduce Steps to reproduce the behavior:

  1. Install a fresh DNN v.9.10.2
  2. Install Vanjaro for DNN v.1.3.0. module
  3. Add a page with Vanjaro Skin
  4. Add a section, a grid and then an image inside a column of the grid
  5. double click the image block to open the vanjaro assets manager for images
  6. In the Image browse area click "+" to add a new image e.g. to the siteroot/images folder
  7. select an image from your computers drive

Expected behavior The toast message should show "image upload success" and the image should appear in the assets manager and to be selectable by double click for the selected image block

Current behavior The toast message shows "Error: upload failed" and the image does not appear in the assets manager. The "Progress is staying in state "Processing" forever image image no errors are shown in the browsers webinspector-console

If you reload the page and doubleclick the image again the uploaded files are visible in the assets manager

The following error is logged in the dnn-logs:

04/08/2022 15:17:54 General Exception ############## ############## AbsoluteURL /API/Image/upload/files DefaultDataProvider DotNetNuke.Data.Sq AbsoluteURL:/API/Image/upload/files DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke ExceptionGUID:745a0f14-7e5b-4f2a-9558-04f3ea4c7b88 AssemblyVersion: PortalId:-1 UserId:-1 TabId:-1 RawUrl: Referrer: UserAgent: ExceptionHash:UQQzV4rsacWJACCgn2h7YlT9lH0= Message:Der Typeninitialisierer für "ImageProcessor.Plugins.WebP.Imaging.Formats.NativeMethods" hat eine Ausnahme verursacht. StackTrace: bei ImageProcessor.Plugins.WebP.Imaging.Formats.NativeMethods.WebPFree(IntPtr pointer) bei ImageProcessor.Plugins.WebP.Imaging.Formats.WebPFormat.EncodeLossly(Bitmap bitmap, Int32 quality, Byte[]& webpData) bei ImageProcessor.Plugins.WebP.Imaging.Formats.WebPFormat.Save(Stream stream, Image image, Int64 bitDepth) bei ImageProcessor.ImageFactory.Save(Stream stream) bei Vanjaro.Common.Factories.BrowseUploadFactory.CropImage(String FileName, String FileExtension, IFolderInfo FolderInfo, Stream FileStream) bei Vanjaro.Common.Factories.BrowseUploadFactory.SaveFile(HttpFileCollection files, IFolderInfo folderInfo, Int32 i, String& Response, Int32 maxsize, String filetypes) bei Vanjaro.Common.Factories.BrowseUploadFactory.SaveFiles(HttpContext context, HttpFileCollection files, PortalSettings portalSettings) InnerMessage:Cannot load libwebp.dll InnerStackTrace: bei ImageProcessor.Configuration.NativeBinaryFactory.<>c__DisplayClass7_0.<RegisterNativeBinary>b__0(String b) bei System.Collections.Concurrent.ConcurrentDictionary"2.GetOrAdd(TKey key, Func"2 valueFactory) bei ImageProcessor.Plugins.WebP.Imaging.Formats.NativeMethods..cctor() Source:ImageProcessor.Plugins.WebP FileName: FileLineNumber:0 FileColumnNumber:0 Method: Server Name: ##########

Screenshots image

Additional context Add any other context about the problem here including the Browser/OS version. Windows 10 Pro, Chrome Version 99.0.4844.84 (Offizieller Build) (64-Bit)

mksmanish79 commented 2 years ago

You installed on x32 or x64 system? Please confirm if ImageProcessor.dll and ImageProcessor.Plugins.WebP.dll is present in your bin folder.

Tychodewaard commented 2 years ago

Same issue here, x64 system and both files are present in bin. This happens in earlier versions of DNN and Vanjaro as well btw

Tychodewaard commented 2 years ago

And it also happens when you do not have Telerik removed

inu-web commented 2 years ago

Bboth files are present in the bin folder x64 system thanks and regards Gerald

mksmanish79 commented 2 years ago

Please check if your site app pool Enable 32 bit Application is set to False.

image

inu-web commented 2 years ago

Yes it is set to False

image

inu-web commented 2 years ago

@Tychodewaard ... were you able to work around that issue in any way? Any help would be highly appreciated Thanks Gerald