-
Notifications
You must be signed in to change notification settings - Fork 333
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
5.1: Can't open settings tab of SiteTree objects, if you have a lot of members #2901
Comments
For the purposes of discussion, bear in mind that while this specific scenario is with 200k+ records, we don't know where the threshold is. It could be an issue with significantly less records than that, for all we know. There are a few options for resolving this that I can think of:
We could also implement a combination of these - e.g. provide a configuration property for now, and then work on listbox lazyloading as a future enhancement. Note that of the suggested solutions above, only 2 and 4 can be released as a patch. A workaround for now is to simply remove the offending fields in Note that in 5.2 this same problem will also affect SiteConfig. |
Thanks for this bug report, definitely an oversight on my part. Just jotting down thoughts to kick off resolution discussions - I don't think I think there are benefits to both option 1 (LazyLoading) and option 3 (configurability) proposed above. Both feel a little fiddly, and I'd say LazyLoading has the most potential for longer-term gains, so I'm leaning that way at the moment. Doing both does feel like a good idea though |
Regarding the workaround: You would have to overwrite the entire 'getSettingsFields()' if you want to do this in 'Page'. Since the |
Good point, that's a wrinkle. |
I've added that to our refinement session for next Monday and bumped the impact to high. If it's not practical to LazyLoad the list, maybe we just give people a way to easily opt-out of it in the short term. I think the lack of an AJAX driven DropdownField - something like a more generic version of TreeDropdownField - is a short coming we're overdue to address. Maybe we bring in a card around that in the CMS 5.2 milestone. |
As a really quick workaround: if you would ad a extension hook after |
Both implementing lazyloading and adding a new config or method API are minor release solutions. If we are intending to fix this in a patch, the best short-term solution is probably applying a
This would also need to be implemented in a minor release, as per our definition of public API We can be flexible with that definition when needed, but given there's a possible solution available that can be included in a patch release according to the existing definition, we should probably prefer to do that instead. We could then look at a more customisable solution for 5.2 |
@emteknetnz There's no linked PRs - please link all relevant PRs in the description |
Sorry, have linked |
@emteknetnz Please also apply this to the asset-admin list which was added at the same time as the one we're handling here. |
Done, linked above |
PRs merged, stop-gap solution in place. See silverstripe/silverstripe-admin#1618 for the long-term solution. |
If you have a large number of members in your database (> 200.000 in our case) and you click on any pages settings tab in the cms, it will fail to load.
The given error changes around. We have seen timeouts and memory exhaustions. Always in different low level functions and without a stack trace.
Steps to reproduce:
After stepping through the issue with xDebug I think the issue is caused by this change:
14eb767
In SiteTree::getSettingsFields the following line
$membersMap = Member::get()->map('ID', 'Name');
defines a map of all members. This gets passed on to the constructer of ListboxField for ViewerMembers. From there it eventually ends up in SelectField::getListMap where
toArray()
is called.Found on Silverstripe CMS 5.1 with PHP 8.1.24.
Acceptance criteria
Note
PR
The text was updated successfully, but these errors were encountered: