12 views

Description

The header menu widget cannot be cloned because it references a directive that lives in the file system that has hard-coded template names. Also, sp_ng_template records are not copied.

Steps to Reproduce

1) Widgets > Header Menu
2) Clone Widget > Creates "Copy of Header Menu"
3) Navigate to Menus > Instances with Menu
4) Find the one with Title "SP Config Menu"
5) On this menu, change the widget to "Copy of Header Menu"
6) Now navigate to sp_config page.
7) Check the Developers console and you will see multiple errors. Other functions like right click won't work.
----> You will get same errors as seen on screenshot.
 
Looked into the Header Menu Widget and found this:
 <li ng-repeat="item in data.menu.items" ng-class="{dropdown: item.items.length > 0}" ng-include="'menuTemplate'"></li>
------> it is using the "menuTemplate"
 
The cloned widget also has this piece of code. However, the templates did not get cloned over. So I believe it kept looking for this template and thus resulted in all those error messages and broken form. 
 
Actual Behavior: The sp_config page breaks if there is a custom header.
Expected Behavior: The sp_config page does not break while using custom header.

Workaround

The only known practical workaround is to copy the existing sp_ng_template record(s) for the original widget, make the new record reference your cloned widget, give the new sp_ng_template record a different, unique ID (e.g., "menuTemplateCustom1" for a copy of "menuTemplate"), and replace the hard-coded original template ID in your cloned widget with that new ID (e.g., replace ng-include="menuTemplate" with ng-template="menuTemplateCustom1").


Related Problem: PRB688317

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-09-20 00:06:57
Published:2018-09-20