[MAGNOLIA-6399] JcrResourceOrigin should not filter out resources which were marked as deleted Created: 02/Oct/15 Updated: 02/Feb/16 Resolved: 06/Oct/15 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | resource-loader |
| Affects Version/s: | 5.4.2 |
| Fix Version/s: | 5.4.3 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Ilgun Ilgun | Assignee: | Ilgun Ilgun |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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 13 | ||||||||||||||||
| Story Points: | 1 | ||||||||||||||||
| Description |
|
JcrResourceOrigin uses some simple logic to determine whether a jcr node is a valid resource/folder, and does not expose the nodes that do not follow this logic. Currently the following criteria is used:
However, when a node is deleted via info.magnolia.commands.impl.MarkNodeAsDeletedCommand the content (properties and sub-nodes) of the node is always erased, so the above criteria for resource stops working and resource marked as deleted disappears from the origin. As a solution it is proposed to make the resource filter criteria to be less strict: we assume that anything of type mgnl:content is at least a file (and => is eligible to be considered a resource). As it is mentioned in the linked issue - all the JCR resources should have mgnl:content as a primary type, so it is safe to make such an assumption. |
| Comments |
| Comment by Ilgun Ilgun [ 02/Oct/15 ] |
|
Fix can be found in fix/ |