Recently, we were given the task of using Sitecore 7.1 for a client that requires a single-instance, multi-site environment. We also need to set it up in a way which allows for dynamic additions of home nodes without the need to update the <site> definitions in the config files.
How do we accomplish this? Simple, with a custom site resolver that scans the nodes on the content tree. The nodes must inherited from a certain template to indicate they are homepage nodes. You can get more details from an older post:
http://mrstevenzhao.blogspot.com/2014/04/sitecore-multi-site-setup-wo-updating.html
Everything is going smoothly when at one point, we attempted to swap out an image with another image in the media library via the content editor. Hit "browse" and you will see a dialog window. What is this dialog that you see? It is totally different from what you have seen in the past. It looks like the media library dialog got a facelift. The worst part is, it doesn't work after applying the custom site resolver. I did a little research and found out this is the new "Speak UI" library of modals and dialogs that are part of the Sitecore 7.1 release.
I firebugged this sucker and checked out all the HTTP requests being made. Apparently this dialog window makes quite a few. Here is a sample of how the URLs are for the requests via service calls:
http://local.domain/-/item/v1/sitecore/shell?facetsRootItemId={7F43D3D0-CAC6-45D8-96FE-B76F4A117F9B}&search=&root={3D6658D8-A0BF-4E75-B3E2-D050FABCF4E1}&searchConfig={B0DF45DF-EA31-4C11-9E34-98B41DF549C5}&sc_content=master&language=en&format=%24convert_date_to_friendly_format&fields=__Created|Dimensions&pageIndex=0&pageSize=20
As you can see, the query path is not like other conventional paths. This one has the "/-/" part after the domain. This could probably be messing with the custom site resolver. I did further investigating and found out that a custom HTTP handler is defined in the web.config to handle these new URLs. The handler could be at fault and not handle the URLs properly in conjunction with the custom site resolver. I did not spend too much time investigating the issue and it is definitely not worth rewriting the handler.
As a simple fix, I disabled the Speak UI library for now until we find a legitimate use for it besides looking prettier. If you disable it, the original dialog window to browse the media library is used, which is fine. Until the Speak UI handler is improved or Sitecore finds a way to make it handle URLs in a better way, I will be sticking with the traditional dialogs that WORK.
Disable the Speak UI simply by renaming these 3 files to have the ".disabled" file extension:
Sitecore.Speak.config
Sitecore.Speak.ItemWebApi.config
Sitecore.Speak.Mvc.config
No comments:
Post a Comment