[MGNLPN-416] Disabling traits has no effect Created: 15/Mar/18 Updated: 18/Oct/22 Resolved: 28/Mar/22 |
|
| Status: | Closed |
| Project: | Magnolia Personalization |
| Component/s: | Integration |
| Affects Version/s: | 1.4.8 |
| Fix Version/s: | 2.1.1, 2.0.16 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Richard Gange | Assignee: | Yen Lac Tue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | VN-Implementation | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 7h | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||||||||||
| Documentation update required: |
Yes
|
||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||
| Epic Link: | AuthorX Support | ||||||||||||||||||||||||
| Sprint: | AuthorX 6 | ||||||||||||||||||||||||
| Story Points: | 1 | ||||||||||||||||||||||||
| Team: | |||||||||||||||||||||||||
| Description |
|
The class TraitDefinition has a isEnabled() setting that has no effect. Even when disabling a trait it still shows up in the chooser. This creates a situation where traits have to be deleted from the system in order to keep them from being used by content editor, which then leads to warnings in the log. WARN info.magnolia.personalization.trait.storage.StorageAwareTraitCollector 08.03.2018 11:10:07 -- Trait couldn't be added. Definition "class info.magnolia.personalization.visitor.Visitor" doesn't exist. WARN info.magnolia.personalization.trait.storage.StorageAwareTraitCollector 08.03.2018 11:10:16 -- Trait couldn't be added. Definition "class java.util.Date" doesn't exist. |
| Comments |
| Comment by Richard Gange [ 15/Mar/18 ] |
|
Also, I could anticipate a situation where traits would be on a site-by-site basis. Meaning, traits for site-A are different then site-B. |
| Comment by Roman Kovařík [ 15/Mar/18 ] |
|
The class TraitDefinition has a isEnabled() setting that has no effect.
This property is meant for N2B, but it should not appear in the chooser when set to false though. WARN info.magnolia.personalization.trait.storage.StorageAwareTraitCollector 08.03.2018 11:10:07 -- Trait couldn't be added. Definition "class info.magnolia.personalization.visitor.Visitor" doesn't exist. WARN info.magnolia.personalization.trait.storage.StorageAwareTraitCollector 08.03.2018 11:10:16 -- Trait couldn't be added. Definition "class java.util.Date" doesn't exist. ^ You have to disable the detector filter, not the trait, to prevent this log. |
| Comment by Richard Gange [ 20/Apr/18 ] |
|
So I have double checked this. For example if I set Date to false like this: I also did a search for usage of info.magnolia.personalization.registry.ConfiguredTraitDefinition#isEnabled() and found nothing. The only way to get it out of this list is to completely delete the trait configuration. Then this leads to warnings in the log. But I guess by disabling the filter we can stop the warning. I will lower the prio since it is possible to workaround this but it would be nice if we could use the enabled property. |
| Comment by Jesus Alonso [ 28/Mar/22 ] |
|
Disabling traits is now possible adding the property enabled = false to the desired trait
|
| Comment by Roman Kovařík [ 28/Mar/22 ] |
|
Can we say the traits are disabled by hiding it in UI (I believe the detector filters are still executed). Haven't we fixed only |
| Comment by Roman Kovařík [ 29/Mar/22 ] |
would mean also:
otherwise we can just say ~
Depends if this issue is fixed by this, have we tested the log messages? |