[MGNLPN-389] NPE when replacing new audience for variant page Created: 09/Jun/17 Updated: 23/Aug/22 |
|
| Status: | Open |
| Project: | Magnolia Personalization |
| Component/s: | Personas App |
| Affects Version/s: | 1.3.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Sang Ngo Huu | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
magnolia-enterprise-pro-cp13n-demo-5.4.13 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Date of First Response: | |||||||||
| Team: | |||||||||
| Description |
|
Step to reproduce: 1. Case 1
2. Case 2
Above 2 cases do not happen in 5.4.12 and in demo author 5.5.4 If publish this variant, the error will be gone. Please see log and screen shot for more detail |
| Comments |
| Comment by Roman Kovařík [ 09/Jun/17 ] |
|
The problem is the deletion of the old variant which probably doesn't trigger the registry reload, then: public Node info.magnolia.personalization.variant.RegistryVariantResolver#resolveVariant(Node node, TraitCollector traitCollector) throws RepositoryException { .... JcrItemId variantItemId = variant.getItemId(); //such item doesn't exist anymore variantNode = (Node) JcrItemUtil.getJcrItem(variantItemId); //returns null ... return variantNode; } As a side note, the code should not use an UI code (JcrItemId/JcrItemUtil).
That triggers the reload of registries |