-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly handle root nodes for the dcaPicker #1001
Conversation
|
Interesting. Why do we use |
Not sure what you want to know exactly. But it looks like that in However, the basic problem remains. If the user page mount is on a childpage and the |
|
How exactly can I reproduce this? |
|
Ok, these are actually two cases: Page mount This is clearly a bug, which I have fixed in c0ca437. Page mount This does not seem like a bug to me, because if a user is not allowed to see anything above |
|
As an example: I have an extension which restrict the selection to the current page root (think about multi domain or multi language setups). So I will pass the root nodes IMO it makes totally sence to support root node IDs above or outside of the page mount children range. |
e939249
to
e66541e
Compare
e66541e
to
d72cbd1
Compare
|
As discussed in Mumble on September 7th, we want to support your use case. However, we are not sure about the |
|
I tested this with multiple root nodes from root pages by setting the ids of all multilingual root pages. No problems here. But when I set (why ever) a root and a child page id, like your example Fixed in 409e08c. |
| $arrRoot = array_intersect($arrRoot, array_merge($this->root, $this->Database->getChildRecords($this->root, $this->strTable))); | ||
| $arrRoot = $this->eliminateNestedPages($arrRoot); | ||
| $arrRoot = $this->eliminateNestedPages(array_unique($arrRoot, SORT_NUMERIC)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add the SORT_NUMERIC flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add the SORT_NUMERIC flag?
To compare the array values numerically.
But your solution in f3aafc0 works, too.
|
Fixed in f3aafc0. |

The handling of the rootNodes in the new dcaPicker is not working right for non admin backend users.
If the backend user is restricted to a page mounts and also a rootNode from a different level is defined as attribute for the picker, no pages will be shown at all.
Little example:
Let's say we have the following page structure

If the user is restricted to
ID 5and a rootNodeID 1is set as an attribute for the picker no pages will be shown. That's because theID 1is not a child ofID 5.The same happens when the attribute rootNode for the picker is also
ID 5. Because the rootNode itself is not included for the array intersection.So first the given rootNode(s) have to be added for the intersection. And secondly all the children have to be traversed down for the the rootNode attribute, too.