Hello there,
I've discovered that the length of both descriptions and alt texts is limited to 128 characters.
I tried to remove that limitation with Firebug and everything worked fine then (the longer text was stored and displayed).
So what is the reason of this limit? Are there any problems which could occur when ignoring that limit (e.g. breaking the database)?

Thanks for your answers.

(I am using the latest versions of CCK and Imagefield)

Comments

wmnnd’s picture

Anybody?

wmnnd’s picture

*bump*

andreasreiser’s picture

I am asking myself just the same question! If anyone could answer - that would be very nice! :-)

wmnnd’s picture

Category: support » bug

Is any of the developers reading this?

andreasreiser’s picture

Subscribe!

techninja’s picture

Title: Length of description and alt texts » Length of description and alt texts too small
Version: 6.x-3.0-alpha2 » 6.x-3.0-alpha4

I completely agree. The DB field has been changed to serialized text data and can certainly hold an awful lot more than 128. I vote for per imagefield widget option to select either single line text field (limit 255, a reasonable number for short descriptions) or a text area of selectable rows and no maximum char limit for both ALT and description fields.

This would greatly increase the usefulness of these fields attached to the images and the code changes are slight.

On a side note, three cheers for the beta4 update which finally repaired my mostly screwed up DB from the imagefield alpha1 d5 to d6 upgrade! Yahoo!

guillaumeduveau’s picture

Category: bug » feature

I REALLY need to be able to input more text information about image in imagefields, too. I think the best scenario is to limit the title and the description field to 128 like it is now, but to allow a description of any size... Changing to feature request as it really isn't a bug. Could we have the opinion of imagefield developpers ?

jtjones23’s picture

subscribe!

guillaumeduveau’s picture

Project: ImageField » FileField
Version: 6.x-3.0-alpha4 » 6.x-3.0-alpha6
Status: Active » Closed (duplicate)

For accessibility reasons, the "alt" attribute should be limited, some consider to 60.
So allowing more than 128 characters would be bad.
For the description, marking this as a duplicate of #331713: Increase maximum length of title and alt attributes

guillaumeduveau’s picture

Project: FileField » ImageField
Version: 6.x-3.0-alpha6 » 6.x-3.0-alpha4
codevoice’s picture

+subscribe. I agree it's bad form to make the alt text longer, but in some cases it's justified (like in the case of screen readers).

okokokok’s picture

Description is not exclusively used for alt texts. I've used it several times in other ways. Note that there's no limit of 128 characters for the title. Which seems the reverse of what one would expect. I really think it should be easier to change this limit.

#348030: Increase the max size of the Imagefield description mentions adding the following to settings.php:

$conf['filefield_description_length'] = 1024;
$conf['filefield_description_type'] = 'textarea';

...which is not ideal. So maybe I'm going to put it in a custom module with hook_boot().

rynqu’s picture

I checked hook_boot() and it doesn't work in my case. But try to put it into hook_init() like this:

<?php
function hook_init() {
	global $conf;
	$conf['filefield_description_length'] = 1024;
	$conf['filefield_description_type'] = 'textarea';
}
?>

It works fine. Thank's for a clue, guaka!