This project is read-only.
1

Resolved

Select Images Button 404

description

Getting a 404 error when I click on the Select Images Button. It's trying to go to mysite.com/Amba.ImagePowerTools/Multipicker/Index?scope=... and not into the modules directory.

Also noticed on the cache settings page I get an unhandled exception

Could not find a part of the path mysite.com\Media\Amba.ImageCache

Any ideas?

comments

musukvl wrote Mar 14, 2013 at 6:17 AM

ImagePowerTools module creates Media\Amba.ImageCache folder to store resized images. Looks like site domain user have no permissions to create folders.
Please, check if Amba.ImageCache folder exists in Media folder.
Could you provide log error for this case?

x3graphics wrote Mar 14, 2013 at 4:13 PM

Well tried reinstalling the module this morning, and still having issues, here is the log entry

2013-03-14 08:10:33,048 [43] Orchard.Exceptions.DefaultExceptionPolicy - An unexpected exception was caught
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\inetpub\wwwroot\VCC2013\Media\Amba.ImageCache'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator1.CommonInit()
at System.IO.FileSystemEnumerableIterator
1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost)
at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
at System.IO.DirectoryInfo.GetFiles(String searchPattern, SearchOption searchOption)
at Amba.ImagePowerTools.Services.ImageResizerService.CacheStatistics(Int64& fileCount, Int64& totalSize)
at Amba.ImagePowerTools.Controllers.AdminController.Cache()
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary
2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<InvokeActionMethodWithFilters>b__10()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func
1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
at System.Web.Mvc.ControllerActionInvoker.In

x3graphics wrote Mar 19, 2013 at 12:30 AM

So I manually added the Amba.ImageCache folder to Media. This fixed the Image Cache Settings page. But I was still getting a 404 error when trying to add media.

So I dug into it and found that in ImageMultiPickerDashboard.js line 119:
var newWin = window.open("/Amba.ImagePowerTools/Multipicker/Index?scope=" + base.options.scope + "&mediaPath=" + encodeURI(mediaPath),

you are assuming that the site is being ran in the root folder, mine isn't.

kenncurtis wrote Jun 14, 2013 at 7:47 PM

i am having the same issue i am new to orchard and programming so im not sure, what to set my path too if you can be a little more clear about the path you used or what you changed it too that would be helpful thanks.

here is my error log

Amba Image Multi Picke Tasks Cache Cleanup Task

2013-06-14 10:18:35,337 [28] Amba.ImageMultiPicker.Tasks.CacheCleanupTask - Amba.ImageMultipicker Cache cleanup task failed
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\testuser\Documents\Orchard amba test\src\Orchard.Web\Media\Amba.ImageCache'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator1.CommonInit()
at System.IO.FileSystemEnumerableIterator
1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.GetDirectories(String path, String searchPattern, SearchOption searchOption)
at Amba.ImageMultiPicker.Services.ImageResizerService.DeleteOldCache() in c:\Users\testuser\Documents\Orchard amba test\src\Orchard.Web\Modules\Amba.ImageMultiPicker\Services\ImageResizerService.cs:line 278
at Amba.ImageMultiPicker.Tasks.CacheCleanupTask.Sweep() in c:\Users\testuser\Documents\Orchard amba test\src\Orchard.Web\Modules\Amba.ImageMultiPicker\Tasks\CacheCleanupTask.cs:line 40

x3graphics wrote Jun 14, 2013 at 8:35 PM

I believe the latest release fixes the issue, so I would update

kenncurtis wrote Jun 16, 2013 at 10:40 AM

Thanks for the fast response...yes the latest release does fix the issue thanks again