I've run into a strange error. The "Title" field of images suddenly has a length restriction that it didn't have before. The site I'm working on has ld content with very long text for the title. (Because we were actually using them to show captions. (Because this site was made before the ImageField Extended Fields module.))
Now, if we try to update that old content, we get errors like this:
Title cannot be longer than 500 characters but is currently 877 characters long.
Title cannot be longer than 500 characters but is currently 879 characters long.
The site never complained about the length before, and the text is loaded from the database fine, so I know it's not a limitation of the database. I'm assuming this has something to do with the ImageField module, but I can't be sure. (By Googling I found that Ubercart has caused similar errors, but that isn't what's causing it in my case.)
Any tips for lifting this new length limitation for image titles?
Comments
Comment #1
mattgilbert commentedHere's some more info about the problem: It appears to originate in modules/imagefield/imagefield_widget.inc. There's a line that reads:
For me, the variable "imagefield_title_length" is not defined. I'm not sure why, but I would like it to be. Should I:
a) manually override the module (making a change that would not be preserved if the module gets updated).
b) update the module, hoping this was a bug that was fixed in a more recent version
c) create the variable in the database by hand.
Comment #2
quicksketchThis limitation isn't really new. It was introduced quite a while ago (and actually extended) in #331713: Increase maximum length of title and alt attributes.
To make this limit longer (or removed) on your own site, set an override variable in your settings.php (or you can make it in the database by hand, that works too).
In settings.php (preferably at the bottom so it doesn't get overridden earlier in the file):
Looks like this issue is almost a year to the day old, so I'm going to mark it fixed directly. We're not going to change the limit at this point in D6.