recently I got Chrome hanging, then crash on the "admin/content/node-type/[my-content-type]/fields/[my-field]" page.
After a couple of hours of digging, I found that the problem is from conditional fields.
In my case, I'm not trying to use conditional fields on this content type, but I have some node reference fields in this content type, most of them are referring to one content type - image, which has about 10,000+ nodes.
So, with 3 node reference fields in this content type, with each has 10K+ "allowed values", on the admin page, it generates a HTML page with multiple select with 10K+ options, which Chrome couldn't render. Firefox 6 managed to render it, but the page freeze for a minute and I have to "stop script" to make it load.
In my opinion, a field with too much allowed values should not be listed as candidates in the admin field form, for 2 reasons:
1. it crashes the browser
2. it doesn't really make sense to choose from 10k+ allowed values and generates conditional fields based on that.
So my solution is to not include any fields with more than 100 allowed values to be a controlling field candidate. Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| conditional_fields.too_many_candidates.patch | 686 bytes | yang_yi_cn |
Comments
Comment #1
roball commentedThis proposal seems to be more a feature request.
Comment #2
caschbre commentedWe recently came across this issue as well.
I've switched this back to a defect because the conditional fields module may cause the white screen of death if a reference field has a large number of values in it. Even if the reference field isn't desired as a condition, having conditional fields installed may make managing fields impossible until conditional fields is disabled.
Comment #3
roball commentedyang_yi_cn attached a patch - did you try it?
Comment #4
caschbre commentedThe issue we're seeing is that all of the values for the noderef are being loaded into memory. If what that noderef points to can contain a lot of values then we see the WSOD. We can increase the memory limit in the php.ini as a (temporary) work-around.
We tried the patch but that simply prevents the "display" of the noderef field but doesn't stop the values from being retrieved through hook_allowed_values().
We haven't had time to dive in deeper to find a solution. Off the top of my head I would probably look to create a conditional fields configuration screen where I can choose what fields make available as conditional fields. That would at least allow me to turn off any fields that could potentially cause issues.
So to summarize, the patch did not solve the issue for us.
Comment #5
roball commentedI see, thanks for the report, so the patch needs work.
Comment #6
peterpoe commentedThis might be a better solution: #969380: Limit list of controller fields.