Closed (fixed)
Project:
Title
Version:
7.x-1.0-alpha5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2012 at 17:43 UTC
Updated:
6 Jul 2019 at 00:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
IWasBornToWin commentedAny suggestions?
Comment #2
jacobpov commentedYeah same problem here I wonder how to change it ?
Comment #3
IWasBornToWin commentedI installed validate module and set restrictions there.
Comment #4
Volx commentedI created a patch with a new configuration setting. On the title configuration page admin/config/content/title in the "General" tab you can set the maximum field length.
But beware that this can only take effect when no title field has been created for the specific entity type, i.e. if you have a title field for one node type and want to add a title field for another node type the setting will have no effect, since the database table for the field has already been created with the initial field length.
If you want to change the field length for an existing field I think you could change that directly in the database by changing the field config in the data column of the field_config table AND change the the actual datatype for the title_field_value column in the field_data_title_field and the field_revision_title_field tables.
Comment #5
fox_01 commentedWhy isn't it possible to change the length from existing fields by changing the settings in your new form? This would be great.
Comment #6
Volx commentedIt would be indeed, but the setting influences how the database table for the title field is created, i.e. the length of the field. Because there is only one title field (only instances are created after the first one), they all use the same database table.
I don't think it is feasable to change the database automatically, because this may cause a lot of issues with content. If you need to change it, you can do so manually without much work as I have written above.
Comment #7
fox_01 commentedOk. Is it normal that the field setting show 50 character even if I changed the databse settings how you described above?
Comment #8
Volx commentedYes, the setting will have no effect after the database table has been created and will not be synchronized with the database, but you can still change the setting to match the database so you will not be confused in a year from now :)
Comment #9
fox_01 commentedHow do you adivce to modify the data column which is a serialized binary? Thats looks not as easy as editing a normal column.
Comment #10
pifagor commentedComment #12
pifagor commented