[MGNLUI-2931] Add Component action availability Created: 21/May/14 Updated: 17/Mar/16 Resolved: 11/Jul/14 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | actionbar, pages app, user interaction |
| Affects Version/s: | 5.2.4, 5.3 |
| Fix Version/s: | 5.2.7, 5.3.1 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Richard Gange | Assignee: | Mikaël Geljić |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | support | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
—
The good news is that there is already a 'custom' availability mechanism in page-editor that checks for client-side "addibility", since |
| Comments |
| Comment by Roman Kovařík [ 05/Jun/14 ] |
|
Please solve together with |
| Comment by Aleksandr Pchelintcev [ 02/Jul/14 ] |
|
Instead of Also instead of |
| Comment by Roman Kovařík [ 07/Jul/14 ] |
|
Reopen:
|
| Comment by Roman Kovařík [ 07/Jul/14 ] |
|
Reopen: [INFO] [talledLocalContainer] java.lang.NullPointerException [INFO] [talledLocalContainer] at info.magnolia.pages.app.availability.CanAddComponentRule.isAvailableForItem(CanAddComponentRule.java:87) Looks like area doesn't have to have a definition, the code should handle that. |
| Comment by Roman Kovařík [ 07/Jul/14 ] |
|
Reopen:
|
| Comment by Philip Mundt [ 08/Jul/14 ] |
|
Log message doesn't correspond to return value of isAvailableForItem method. Method will return true but the log.warn says ..returning false... |
| Comment by Philip Mundt [ 08/Jul/14 ] |
|
Attention: Last commit wasn't integrated to master yet but to 5.2.x-branch. Integrated in git commit: |
| Comment by Roman Kovařík [ 10/Jul/14 ] |
|
Reopen: incorrect error log message: log.warn("Error evaluating availability for node [{}], returning false: {}", areaNode, e); } } return true; |
| Comment by Espen Jervidalo [ 10/Jul/14 ] |
|
second part of the ticket is still not solved, reopened during QA The problem with the current implementation, is that it is moving up the hierarchy to get the pages template definition, and then tries to get the areas definition directly from the page template: String template = NodeTypes.Renderable.getTemplate(areaNode.getParent()); if (template != null) { TemplateDefinition parentTemplateDefinition = templateRegistry.getTemplateDefinition(template); AreaDefinition areaDefinition = parentTemplateDefinition.getAreas().get(areaNode.getName()); if (areaDefinition != null) { Looking at the template definitions the content node is defined under the main area node, and not directly under the page template. See attached screenshot. The resulting areaDefinition for "content" is null. |
| Comment by Philip Mundt [ 11/Jul/14 ] |
|
Doesn't work with extras1, because the template cannot be found. |
| Comment by Philip Mundt [ 11/Jul/14 ] |
|
Resolving maxComponents which are defined in the prototype template definition is currently not possible. |
| Comment by Mikaël Geljić [ 11/Jul/14 ] |
|
We should revert the CanAddComponentRule, see updated description. |
| Comment by Mikaël Geljić [ 11/Jul/14 ] |
|
https://git.magnolia-cms.com/gitweb/?p=magnolia_ui.git;a=shortlog;h=refs/heads/MGNLUI-2931-mge |