[PAGES-1494] Area Inheritance: maxComponents and type:single inconsistant Created: 30/Oct/23 Updated: 14/Dec/23 Resolved: 09/Nov/23 |
|
| Status: | Closed |
| Project: | Magnolia pages module |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0, 6.2.33 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Anh Vu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Σ Remaining Estimate: | 0d | Remaining Estimate: | 0d |
| Σ Time Spent: | 5d 5h | Time Spent: | 5d 5h |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Issue Links: |
|
|||||||||||||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||||||||||||
| 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: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
|||||||||||||||||||||||||
| Release notes required: |
Yes
|
|||||||||||||||||||||||||
| Date of First Response: | ||||||||||||||||||||||||||
| Epic Link: | SPA Editor Backlog | |||||||||||||||||||||||||
| Sprint: | DevX 50 | |||||||||||||||||||||||||
| Story Points: | 3 | |||||||||||||||||||||||||
| Team: | ||||||||||||||||||||||||||
| Work Started: | ||||||||||||||||||||||||||
| Approved: |
Yes
|
|||||||||||||||||||||||||
| Description |
|
The area properties "type:single" and "maxComponents" work inconsistantly when using "Component Inheritance" in Freemarker and in headless mode. Expectation: Inherited components are treated just like actual components in an area as regards to those two properties.
Current behaviour: In all cases, the area already has 1 inherited component. Freemarker with maxComponents:1 -> Author can add another component. (Unexpected.) Freemarker with type:single -> Author cannot add another component. (As expected.) SPA with maxComponents:1 -> Author can add another component. (Unexpected.) SPA with type:single -> Author can add another component. (Unexpected.) Notes: This demo project may be useful for this bug: https://git.magnolia-cms.com/projects/DOCUMENTATION/repos/component-inheritance-examples/browse |
| Comments |
| Comment by Anh Vu [ 01/Nov/23 ] |
|
Discovery output: The problem is that the getComponents() function of CmsNode class is used to check if the Add component button is enabled and the component place holder area is shown but the inherited components from parents are not cms node, hence they are not counted. Solution: We can use "showAddButton" and "showNewComponentArea" properties to check instead. |