Keyword field size limit Keyword field size limit
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Keyword field size limit

Started by jaus, September 27, 2013, 01:31:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jaus

I see that the keyword field in the  image database is 255 characters.   Can that be expanded?   I want to create a large gallery searchable by keywords and many of my images are having their keyword lists truncated because of the limit.

Αndré

Sure. I currently have no option to look at the database, but you probably have to change the data type to something like TEXT, as we usually use VARCHAR, which supports only 255 characters. Additionally, you probably have to extend Coppermine's forms. Again, without code access I'm not quite sure. If you don't know your way around, let me know and I'll give more detailed instructions as soon as possible.

jaus

Thanks, I'll try just changing the keyword field to text with a length of about 400.

I have noticed however that, when I have keywords that exceed the 255 char limit, sometimes keywords are truncated at the beginning, and at the end of the list.   What would cause that?

jaus

Well I set the field type to TEXT, and the length values to 400 (although that field in phpmyadmin now reads blank), but I still get the same truncation of my keywords.

Perhaps there is code that limits ingested keywords to a total of 255 chars?

Αndré

Have you adjusted any PHP code yet?

jaus


Αndré

Adjust the following values to your needs:
Quote from: edit_one_pic.php<input type="text" style="width: 100%" name="keywords" maxlength="255" value="{$CURRENT_PIC['keywords']}" id="keywords" class="textinput" />
Quote from: editpics.phparray($icon_array['keyword'] . $keywordLabel, 'keywords', 0, 255),

I haven't found any limitations at the keyword manager. If I missed a form where you can change keywords, let me know.

jaus

I also found this in upload.php:

Quote$form_array[] = array($keywordLabel, 'keywords', 0, 255, 1);

Would this cause the keywords in uploaded images to be truncated to 255 even if the database field was 400?

Αndré


jaus

Expanding the KEYWORDS field in the PICUTURES table, and settting the keywords dimensions in the three lines quoted above to match the field width seems to have fixed the problem.

Thanks.