Issues with reordering images in gallery

Dec 14, 2012 at 4:09 PM

I am trying to reorder images in my gallery, but the drag-and-drop function does not work in any of the browsers I have tried. The anchors are there, but don't respond when clicked. Is anyone else having this issue? Are there any work-arounds or fixes?

 

Thanks

Mar 4, 2013 at 3:13 PM
I have the same issue. When dragged and dropped, a HTTP POST message is sent to /Admin/ImageGallery/Reorder
This POST message fails with status code 500, due to a null reference exception. The following is a part of the response:
<div>
  <h1 id="page-title">Oops. Something went wrong ... sorry</h1>
  <div>
      <p>An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back</p>
      <p>Object reference not set to an instance of an object.</p>
      <p>System.NullReferenceException: Object reference not set to an instance of an object.
   at Mello.ImageGallery.Services.ImageGalleryService.ReorderImages(String imageGalleryName, IEnumerable`1 images)
   at Mello.ImageGallery.Controllers.AdminController.Reorder(String imageGalleryName, IEnumerable`1 images)
   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, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass15.&lt;InvokeActionMethodWithFilters&gt;b__12()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass15.&lt;&gt;c__DisplayClass17.&lt;InvokeActionMethodWithFilters&gt;b__14()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass15.&lt;&gt;c__DisplayClass17.&lt;InvokeActionMethodWithFilters&gt;b__14()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)</p>
  </div>  
</div>
Can you help Gabriel?
Apr 5, 2013 at 9:10 AM
futuresaurus wrote:
I am trying to reorder images in my gallery, but the drag-and-drop function does not work in any of the browsers I have tried. The anchors are there, but don't respond when clicked. Is anyone else having this issue? Are there any work-arounds or fixes?   Thanks
I had this issue using Orchard 1.6. It turn out that jQuery-sortable used in gallery module is a bit obsolete fot jQuery version that CMS provides. But Orchard's jQuery module already contains appropriate version of sortable library, so fix is pretty quick:

in View\Admin\Images.cshtml I substituted line:
@{ Script.Require("jQueryUISortable"); }
with line
@{ Script.Require("jQueryUI_Sortable"); }
Apr 15, 2013 at 9:22 PM
The reordering now technically works in terms of being able to drag-and-drop, but the settings are not saved to the site. I can drag-and-drop to my heart’s content, but upon page refresh everything is back to the default sorting (alphabetical). No change on the front end, either.