36597 uve style editor styling non default persona content fails with content not found#36618
Conversation
|
Claude finished @dario-daza's task in 5m 8s —— View job Claude finished @dario-daza's task in 2m 54s —— View job PR ReviewI reviewed the backend and frontend changes against Resolved
New IssuesNo blocking issues found. The change is internally consistent:
Notes (non-blocking)
The prior review's concern is fully addressed and the fix is the correct one (backend guard). LGTM. |
🟠 Possible default-visitor regression — worth verifying before mergeNice fix for the non-default persona path. One case I'd double-check: the Default Visitor. The backend converts the tag here ( final String personalization = UtilMethods.isSet(containerEntry.getPersonaTag()) ?
Persona.DOT_PERSONA_PREFIX_SCHEME + StringPool.COLON + containerEntry.getPersonaTag() : // "dot:persona:" + tag
MultiTree.DOT_PERSONALIZATION_DEFAULT; // "dot:default"For the Default Visitor,
So It likely wasn't caught because:
Suggestions (pick one):
Either way, adding a default-visitor test asserting the row lands on
Reviewed and drafted by Claude (Claude Code), on behalf of @zJaaal. |
…ult as personaTag
Good catch, and worth double-checking carefully given how easy it'd be to reintroduce the exact bug we just fixed. I traced through the actual render path to see whether $pageData().personaTag really can be "dot:persona" for the Default Visitor:
So viewAs.persona is genuinely absent for both "no persona param sent" and "explicitly selected Default Visitor," which means $pageData().personaTag is undefined in practice, not "dot:persona". That said, the underlying worry is legitimate as a robustness concern, personaTag is client-supplied on a public REST endpoint, and if this assumption were ever wrong (a future change, a different client, a bug in persona resolution) the effect would be a silently-wrong personalization key rather than a loud error. So we added the guard anyway rather than relying on "we checked, it can't happen today": Also added test_updateStyles_with_defaultVisitor to lock down the contract — asserts both null and the bare "dot:persona" prefix resolve to dot:default, so this can't silently regress. |
|
Tick the box to add this pull request to the merge queue (same as
|
Proposed Changes
Additional Info
Previously, saving a style change while viewing a page under a non-default Persona threw an error ("Contentlet not found...") because the save request always looked for the default Persona's version of the content, even when a different Persona was selected in the editor. This fix makes sure the currently selected Persona is included when the style change is saved, so it lands on the correct personalized content.
This PR fixes: #36597