Expand my Community achievements bar.

SOLVED

SPA: "Current View" not displayed in VEC most of the time

Avatar

Level 4

Hi Everyone,

I am trying to get an Angular-based SPA working in Visual Experience Composer. The application has the following in targetGlobalSettings:

{
cookieDomain: <domain here>,
viewsEnabled: true,
pageLoadEnabled: true
}

The application uses AEP Data Collection (Adobe Launch) to load Target and initiate adobe.target.triggerView(<view_name>);
This works fine when I open the application in the browser: the personalization IS applied for the appropriate view.
However, when I open the application in VEC, it displays the "Current view" element in about 10% of occurrences, most of the time "Current View" is not displayed.
I am using "Adobe Experience Cloud Visual Editing Helper" extension, I am not using the Enahnced Composer. When I check in the console what targetGlobalSettings contains, I see {cookieDomain: <domain here>, viewsEnabled: true, pageLoadEnabled: true }.

When I try to trigger adobe.target.triggerView('home') from the console, "Current View" item does not appear.

Can anyone suggest what the root cause may be?

 

p13n-issue-currentview.png

1 Accepted Solution

Avatar

Correct answer by
Level 4

It turns out that it was "Adobe Experience Cloud Visual Editing Helper" extension that prevented setting the current view. I disabled the extension and added "frame-ancestors" directive to the CSP header, and it now works.

View solution in original post

4 Replies

Avatar

Correct answer by
Level 4

It turns out that it was "Adobe Experience Cloud Visual Editing Helper" extension that prevented setting the current view. I disabled the extension and added "frame-ancestors" directive to the CSP header, and it now works.

Avatar

Level 4

Hi @piyushvidhate ,

The extension is disabled in the browser.

"frame-ancestors" directive is configured by the application team on the web server side.

Dmytro_Panchenk_0-1727822720315.png

 

Avatar

Level 2

Hi @Dmytro_Panchenk,

 

Thanks for the solution.

I applied below steps showing in screenshot then I can get view name in mozila browser but still not in chrome browser.
https://experienceleague.adobe.com/en/docs/experience-cloud-kcs/kbarticles/ka-17409

 

piyushvidhate_0-1727930893053.png