Closed (works as designed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.x-dev
Component:
CCK in core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Sep 2010 at 13:01 UTC
Updated:
20 Jul 2012 at 19:39 UTC
Jump to comment: Most recent file
Comments
Comment #1
Yoran commentedComment #2
Yoran commentedA small patch to prove this is working nicely on at least on Postgresql and MySQL.
Comment #3
Yoran commentedUpdated patch for fieldgroup
Comment #4
mafrosis commentedI have wondered about this limit. I can no reason why it would be capped at 32 chars, and in a large application it is really difficult to maintain sensible naming conventions with such a limit in place.
Remember of course that 6 chars get taken for 'field_' as well!
Is this going to be changed in D7?
Comment #5
serg.remote commentedThanks for the patch, additionally you'd probably need to alter content_group_fields table to make fields varchar(64) instead of varchar(32)
Comment #6
karens commentedThe D7 version has the same limit, so changing it in D6 would make it impossible to upgrade to D7. The field name is used in many ways and there are some places where a limit is needed. I don't ATM remember all the reasons why it had to be 32, but I assure you that has been hashed out in the past.
Comment #7
serg.remote commentedI agree that this isn't a bug but having 32 bytes is rather difficult if you have hundreds of fields and need meaningful names for them. Isn't there a chance to review it and probably change for both D6 & D7?
Comment #8
Yoran commentedSorry to re-open this but you can't close an issue without giving more explanations than "I assure you that has been hashed out in the past". This limitation is a really bad design flaw (it reminds me MS-DOS 8.3 limitation... leading to cryptic file names ;-). As serg said, when you have hundred of fields, 32c with a "field_" penalty is just not enough. I understand that most Drupal users just don't care as everything is masked behind Views, but for developers, this is a real issue. So if I have to patch D7 in order to allow correct upgrade path, I'll do it. But please don't close this without explanations.
Comment #9
karens commentedThere is nothing else I can say, there is no point in re-opening this. This has always been built into the module, I don't remember what all the reasons were and have no time to try to find all the issues to point you to. It won't get changed in D6 or D7 so there is no point in letting people create fields that will break. If you want to patch things and see what breaks for you, you are welcome to do so in your own installation, but we can't add this into the code we maintain without confirming it will not break anything anywhere, and the subject has come up before so I know something somewhere *will* break.
Comment #10
admataz commentedFor anyone else hitting this seemingly arbitrary limitation, there is an explanation here that I discovered: http://drupal.org/node/198420#comment-652923 .
I hit the same limitation creating a CTools content-type plugin for the Panels module today.
Comment #11
serg.remote commentedKaren's explanation was that: "We already have problems with the size of CCK queries with all the long field and table names". However max query size is configurable on the DB server side and I believe with time there will be more demand to increase it because more large websites will switch to Drupal. As an example: I work on a growing website having 500+ CCK fields at the moment and it would be a real pain to have a separate translation spreadsheet for all the field names.
Comment #12
smokrisSee also #1191434: Standardize entity type is a maximum of 32 characters (not 64 or 128), where chx says:
and Dave Reid says: