When embedding an Asset Publisher with randomNamespace as instanceId in a web content, a StackOverflow error appears in the console.
Steps to Reproduce
1. Navigate to Content > Web Content
2. Create a structure called "test" and add a text field
3. Create a template called "testing", add "test" as the structure and add the following in the script:
4. Create a Web Content using "test" structure, add a title and some text and then publish it.
5. Go to the main page and click the + to add content to page and notice errors in console.
Note: The console errors may appear after the user saves the web content, returns to the main page or the user will need to add the content to the page.
No console errors appears.
StackOverflow exceptions appear in the console. In portletpreferences in the database, the portletId column will display multiple ids related to the asset publisher instance.