Skip to content
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

Open
chillu opened this issue Aug 29, 2013 · 3 comments

Comments

@chillu
Copy link
Contributor

chillu commented Aug 29, 2013

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.

@unclecheese
Copy link
Owner

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.

chillu added a commit to PutmanMedia/silverstripe-dashboard that referenced this issue Aug 29, 2013
…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.
@unclecheese
Copy link
Owner

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.

unclecheese pushed a commit that referenced this issue Aug 29, 2013
Disallow creation of section editor panel on large page trees (#41)
@unclecheese
Copy link
Owner

Integreated TreeDropdownField in 03d8d2f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants