Hi,

I've been using CCK and its "contributions" so I'm quite familiar how it's working. I need to create a long form and for some reason I'm unable to add more fields to the current ones (about 60 - yeah it's huge fun). Is there any restrictions of how many fields you can use in a content type?

Thanks

Rob

Comments

rvarkonyi’s picture

I want to add another field as per normal, hit Save and the page just reloads without error message. I don't use any additional cck modules and I haven't modified any part of the code.

Any ideas?

Rob

blecheimer’s picture

same problem :-(

blecheimer’s picture

Version: 6.x-2.3 » 6.x-2.6

the same problem after update to 2.6

blecheimer’s picture

ryan258’s picture

I found this because I'm making an advertising content type that's just one straight form and the display is largely handled with views (it's a self contained piece of the site). Of course somewhere near the final leg I realize that some forms are just unresponsive to input.

Instead of deleting the content type and starting over it's been nice to be able to create a new content type, usher those fields in through existing fields and then they're usually pretty well intact and functional.

Makes adding fields to long existing content types nerve racking as anything, but this approach usually does the trick when I think "that's weird, maybe there's a maximum."

Happens to me in Drupal 6 on different sites independent of one another. Yet to experience this in 7.

arne_hortell’s picture

Issue summary: View changes

It is not possible in drupal to have more than 61 fields if running on MySQL.
Reason is, Drupal does joins for each field and when doing edit on a node with +60 field it becomes +60 joins which mysql cant handle and therefore simply dies.

Suggestion is, either do multiform for the content type when edit or restructure to some other situation where the node doesnt get +60 fields...

This applies to all drupal version, at least 6 & 7 which runs mysql, probably also 8.

Be happy :)

adam fermier’s picture

Can confirm Drupal 8/MySQL choked with 60+ tables... many of these were tied to taxonomies ... will investigate further and update from what I learn.

adam fermier’s picture

Tried switching out to MariaDB - to see if that database maybe able to overcome this issue - but ran into same issue - backed off to 31 fields of which 22 were entity references - hence getting us up to about 53 fields - have not hit the spec limit of 60 as suggested above - but may simply keep note that this is a limit.

See this reference that defines the spec: https://stackoverflow.com/questions/23389820/what-is-the-maximum-number-...

lowfidelity’s picture

I ran into this issue when preparing the upgrade from D8 to D9 for a pretty big application.

The app runs on Drupal 8.9 with MariaDB 15.x and does not seem to have the described problem (yet).

The application has a content type with 70+ fields (mostly BOOLEAN, ENTITY REFERENCE, and DATE fields). The application grew over the years and more and more fields were added over time, you probably know this story. While this is not a really good design, the app still does not trigger the errors mentioned above (MariaDB, ER_TOO_MANY_TABLES).

A problem I did experience though was a WSOD when services.yml or development.services.yml had http.response.debug_cacheability_headers: true set in it's parameters sections and I tried to edit a node with many fields.
The problem seems to be related to the maximum size of the HTTP header supported by PHP/FPM/FastCGI. See ie. https://www.drupal.org/project/drupal/issues/2844620