[MGNLPN-205] Isocode for England is GB not UK Created: 27/Mar/15 Updated: 29/May/17 Resolved: 24/Nov/15 |
|
| Status: | Closed |
| Project: | Magnolia Personalization |
| Component/s: | Preview App |
| Affects Version/s: | 1.1 |
| Fix Version/s: | 1.2.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Tomáš Gregovský | Assignee: | Philip Mundt |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | support | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 2d 5.25h | ||
| Original Estimate: | 2d | ||
| 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: | |||||||||
| Sprint: | Basel 20 | ||||||||
| Story Points: | 5 | ||||||||
| Description |
|
In page "preview as visitor" when added new trait: country and selected "united kingdom" then traitProvider.get().getTrait(Country.class).getCountryIsoCode() return "UK" but this is not correct one by http://en.wikipedia.org/wiki/ISO_3166-1 , it should be GB. thank you |
| Comments |
| Comment by Ngoc Nguyenthanh [ 26/Oct/15 ] |
|
Root cause:
Solution: Fix wrong values
Impact:
|
| Comment by Ngoc Nguyenthanh [ 26/Oct/15 ] |
|
mgeljic Please have a look and approve for my solution above. Thanks in advance. |
| Comment by Ngoc Nguyenthanh [ 26/Oct/15 ] |
|
An idea comes to my mind:
|
| Comment by Mikaël Geljić [ 27/Oct/15 ] |
|
Hey ngoc.nguyenthanh, I approve what you propose in your first comment. Just two additions:
Regarding your idea; Java itself covers locales, languages and countries pretty well. As a future idea, I would rather reconsider country options for trait rules/values being a *configured* set. Since there are about 250 countries in there, we would have to make sure UX doesn't suffer from it. Anyway, it's beyond current ticket and sprint |
| Comment by Ngoc Nguyenthanh [ 28/Oct/15 ] |
|
Hi mgeljic Regard to my idea Locale.getISOCountries() is cover the code only. It's not all about my idea. Anyway, it's just a feature idea. So great if we can provide this convenience for users. |
| Comment by Ngoc Nguyenthanh [ 30/Oct/15 ] |
|
I fixed by:
You can check by query in workspace 'website' & 'segments' with query after upgrade or install fresh installation select * from [mgnl:contentNode] where [mgnl:contentNode].class = 'info.magnolia.personalization.geoip.CountryVoter' and [mgnl:contentNode].value = 'uk' Note: I don't want to use 'traitId' to check due to it have just added from 1.2.1 |
| Comment by Philip Mundt [ 04/Nov/15 ] |
|
Task actually fails because it tries to update nodes in versionStorage too: 2015-11-04 11:42:06,209 ERROR gnolia.personalization.setup.UpdateCountryCodeTask: Cannot update country code for node node /jcr:system/jcr:versionStorage/f8/56/6f/f8566f8d-936e-405e-be3d-b30d32ce2a94/1.1/jcr:frozenNode/mgnl:ruleSet/voters/voter0 javax.jcr.nodetype.ConstraintViolationException: Unable to perform operation. Node is protected. at org.apache.jackrabbit.core.ItemValidator.checkCondition(ItemValidator.java:276) at org.apache.jackrabbit.core.ItemValidator.checkModify(ItemValidator.java:248) at org.apache.jackrabbit.core.PropertyImpl.checkSetValue(PropertyImpl.java:278) at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:726) at org.apache.jackrabbit.core.NodeImpl$SetPropertyOperation.perform(NodeImpl.java:2058) at org.apache.jackrabbit.core.NodeImpl$SetPropertyOperation.perform(NodeImpl.java:2002) at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:1924) at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:1894) at info.magnolia.jcr.wrapper.DelegateNodeWrapper.setProperty(DelegateNodeWrapper.java:392) at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.setProperty(ContentDecoratorNodeWrapper.java:254) at info.magnolia.jcr.wrapper.DelegateNodeWrapper.setProperty(DelegateNodeWrapper.java:392) at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.setProperty(ContentDecoratorNodeWrapper.java:254) at info.magnolia.jcr.wrapper.DelegateNodeWrapper.setProperty(DelegateNodeWrapper.java:392) at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.setProperty(ContentDecoratorNodeWrapper.java:254) at info.magnolia.jcr.wrapper.MgnlPropertySettingNodeWrapper.setProperty(MgnlPropertySettingNodeWrapper.java:146) at info.magnolia.jcr.wrapper.DelegateNodeWrapper.setProperty(DelegateNodeWrapper.java:392) at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.setProperty(ContentDecoratorNodeWrapper.java:254) at info.magnolia.audit.MgnlAuditLoggingContentDecoratorNodeWrapper.setProperty(MgnlAuditLoggingContentDecoratorNodeWrapper.java:140) at info.magnolia.personalization.setup.UpdateCountryCodeTask.operateOnNode(UpdateCountryCodeTask.java:67) at info.magnolia.module.delta.NodeVisitorTask$1.visit(NodeVisitorTask.java:74) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:651) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:653) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:653) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:653) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:653) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:653) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:653) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:653) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:653) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:653) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:653) at info.magnolia.jcr.util.NodeUtil.visit(NodeUtil.java:653) at info.magnolia.module.delta.NodeVisitorTask.doExecute(NodeVisitorTask.java:82) at info.magnolia.module.delta.AbstractRepositoryTask.execute(AbstractRepositoryTask.java:57) at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:523) at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:505) at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:286) at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:421) at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:418) at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:392) at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:280) at info.magnolia.module.ui.ModuleManagerWebUI$2.run(ModuleManagerWebUI.java:123) at java.lang.Thread.run(Thread.java:745) |
| Comment by Philip Mundt [ 17/Nov/15 ] |
|
| Comment by Tomáš Gregovský [ 30/Sep/16 ] |
|
this fix is applied only for magnolia 5.4, since on 5.3.13 there is personalization-trait version only 1.1.4 ... just few days ago we had country:UK relevant issue on corporate website and after some deeper investigation brings us back to this issue which I thought was solved already ... luckily we will migrate to 5.4. soon but I guess there is more 5.3 websites running |