How to solve the issue with tab switching in Experience Editor while using Sitecore Experience Accelerator
If you are using Sitecore Experience Accelerator and find yourself in a situation when you cannot change any tab in Experience Editor like on the gif below
and browser console shows errors like this:
1 2 3 4 5 6 7 8 9 10 11 Uncaught TypeError: Cannot read property 'length' of undefined at Object.Sitecore.LayoutDefinition.getRenderings (4220844722980350560.js:3081) at Object.Sitecore.LayoutDefinition.getRenderingsWithDatasources (4220844722980350560.js:3093) at Object.setHighlightState (/sitecore/shell/client/Sitecore/ExperienceEditor/Commands/ShowDataSources.js:55) at Object.canExecute (/sitecore/shell/client/Sitecore/ExperienceEditor/Commands/ShowDataSources.js:26) at Object.<anonymous> (/-/speak/v1/ExperienceEditor/ExperienceEditor.js:954) at Function.each (/sitecore/shell/client/Speak/Assets/lib/core/1.1/deps/jQuery/jquery-2.1.1.js:375) at Object.runCommandsCollectionCanExecute (/-/speak/v1/ExperienceEditor/ExperienceEditor.js:935) at Object.displayTab (/-/speak/v1/ExperienceEditor/ExperienceEditor.js:461) at displayTab (/-/speak/v1/ribbon/Strip.js:3) at HTMLAnchorElement.<anonymous> (/-/speak/v1/ribbon/Strip.js:52)
this post is for you.
Please go to the next section and see what you can do to mitigate the issue.
- Open non-SXA page in Experience Editor (for example
- Open View tab
- Uncheck Associated content checkbox
The post will be updated once the fix for the issue will be delivered with the next public release of SXA.