Hello,
I recently upgraded our solution from the build 14.2.8.0 to 15.1.7.0.
I'm currently facing a problem with the control Image Zoom and not sure how to address the problem. The control was behaving as expected in 14.2.8.0 and is not working in 15.1.7.0. From the console in javascript I receive the error : this.zoomWindow is null
This error was not present in the previous version. If it can help you, here's the code we are using to create the Image Zoom.
Controller
public ActionResult PreviewThumbnail(string Data)
{
int Id = DecryptId(Data);
IdentificationPhotoZoomViewModel model = new IdentificationPhotoZoomViewModel();
var docItem = GetResponse(bll.GetDocumentImport(Id)).Element;
string thumbnailPath = AleopLib.Configuration.SettingsProvider.CurrentSettings.ThumbnailFolder;
model.ThumbFolder = string.Format(@"{0}/Invoices/{1}", thumbnailPath, docItem.Guid);
return PartialView("_IdentificationPhotoZoom", model);
}
PartialView
@using AleopWeb.Core.Caching
@using AleopWeb.Core.HtmlHelpers
@using System.Web.UI.WebControls
@model string
<div style="margin-top: 10px;">
@Html.DevExpress().ImageZoomNavigator(
settings =>
{
settings.Name = "zoomNavigator";
settings.SettingsAutoGeneratedImages.ImageHeight = Unit.Pixel(300);
settings.SettingsAutoGeneratedImages.ImageWidth = Unit.Pixel(300);
settings.SettingsAutoGeneratedImages.LargeImageHeight = Unit.Pixel(900);
settings.SettingsAutoGeneratedImages.LargeImageWidth = Unit.Pixel(900);
settings.SettingsAutoGeneratedImages.ThumbnailHeight = Unit.Pixel(75);
settings.SettingsAutoGeneratedImages.ThumbnailWidth = Unit.Pixel(75);
settings.SettingsAutoGeneratedImages.ImageCacheFolder = Model + "/Thumb/";
settings.Styles.Thumbnail.ImageHeight = Unit.Pixel(75);
settings.Styles.Thumbnail.ImageWidth = Unit.Pixel(75);
settings.ActiveItemChangeAction = ActiveItemChangeAction.Click;
settings.NavigationButtonVisibility = NavigationButtonVisibilityMode.Auto;
}).BindToFolder(Model + "/").GetHtml()
</div>
<div style="margin-top: 10px;">
@Html.DevExpress().ImageZoom(
settings =>
{
settings.Name = "imgValidationEdit";
settings.ShowHint = true;
settings.EnableExpandMode = true;
settings.LargeImageLoadMode = LargeImageLoadMode.OnFirstShow;
settings.SettingsZoomMode.MouseBoxOpacityMode = MouseBoxOpacityMode.Inside;
settings.SettingsZoomMode.ZoomWindowPosition = ZoomWindowPosition.Right;
settings.ZoomWindowText = "Zoom Window Text";
settings.ExpandWindowText = "Expand Window Text";
settings.AssociatedImageZoomNavigatorName = "zoomNavigator";
}
).GetHtml()
</div>
You can also find in attachment the difference between the render of the two versions.
Thanks in advance for you help, this is a show stopper for our next release.
Hi,
I have created a small sample project that covers your scenario and operates correctly as shown in the attached screencast. I hope reviewing it will help you find a solution to this problem. If this does not help, please update my sample to illustrate the problem. Then, I will see what is going wrong and do my best to find a solution.
Hello,
I managed to run your sample project but I'm not quite sure it's accurate since there's a lot of version of assembly version that was not matching. (IE sample project was built with visual studio 2010, mvc 3, jquery 1.4 and we are using vs2010, mvc 5, jquery 1.11).
I took my project that is not working and downgraded to 14.2.8.0 and it worked. I'll try to make a simplified version and send it to you
As promised. You will a sample project with 14.2 that is working.
In the next post, a sample project in 15.1 that is not working (with the same code, only version has changed).
Thanks
and here is the 15.1 project
Hello Sebastien,
I've reproduced this issue and forwarded it to our developers for further investigation. We will update this report once any news regarding this subject is available.
Hi again,
As mentionned previously, this bug is currently holding back our next release. My boss came down and is getting worried and impatient. Is there anything we can do to temporary fix the problem? We are currently looking for going back to 14.2.8.0 but we are using new features from 15.1.7.0 so it would be quite a task to downgrade.
Could you provide us some news so we can make a decision about our strategy?
Thanks,
Hello Sebastien,
We are still looking for a permanent solution, and have yet to come up with a workaround or hot fix.
We will do our best to address this issue as soon as possible and will post updates to this ticket once any news is available.
Hello,
While we are working on a fix, we can provide the following temporary solution:
Add a fake 1*1 px image with the white background and assign it explicitly via the ImageZoomSettings.ImageUrl property:
@Html.DevExpress().ImageZoom(settings => { ... settings.ImageUrl = Url.Content("~/Content/EmptyImage.png"); }).GetHtml()
Thank you really much for the hotfix.
We tested it and it's working. We had to tweak it a little bit and here's what we had to do (in hope it will help you in finding the solution). Basically we have two scenario on where we use the ImageZoom
On the first click, only the ImageZoomNavigator is displayed and the error this.zoomWindows = null is still displayed. (we can see the emptyImage.png as the Image). If we click again, everything is working fine (both image are correctly loaded and there's no more error). So even if it's not really clean, we call 2 time the ajax method to display the image and it working fine.
Hope it can help,