-
Notifications
You must be signed in to change notification settings - Fork 36
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
DashboardSectionEditorPanel loads the whole page tree by default: Doesn't scale #41
Comments
Yeah, good catch. I'm all for using TreeDropdownField if I can hide the pages that have no children. Does the API support that? I'll take a look. |
…heese#41) Stopgap solution until a better UI is found for this. Also backports an additional canCreate() check which is already in place for master.
Good fix for the short term. I'll merge it. I'm playing around with TreeDropdownField and setFilterFunction() to keep the tree limited to only those nodes with children. The biggest issue is that there seems to be a problem with TDFs being instantiated when hidden. This could be related to the old bug we used to see with Chosen dropdown fields not laying out properly when on a hidden tab in the CMS edit form. Basically, the layout just blows up when you flip over the panel. If I remove: .dashboard-panel .dashboard-panel-configure {
display: none;
} It displays fine, so it appears to be an issue with the plugin. |
Disallow creation of section editor panel on large page trees (#41)
Integreated TreeDropdownField in 03d8d2f |
The DashboardSectionEditorPanel recursively traverses the whole hierarchy by default, since its ParentID setting is 0. This effectively means that CMS editors have the ability to (accidentally) bring down the CMS, due to PHP timeouts and memory exhaustion. Given this is the starting page after login, for them it simply means "the CMS is broken".
Why can't we use TreeDropdownField in this case? If there's a good reason, we should at least limit the number of items in the traversed hierarchy, and show a warning if it gets larger than ~250 items.
The text was updated successfully, but these errors were encountered: