ksemel
Member
Posted 6 months ago #
First off, great plugin! It's super useful for anyone who wants to extend the options for NextGen gallery.
Minor issue with the new version though. During the update process, the field_value column of TEXT field is converted to a VARCHAR 255 and loses the field data if it is longer than 255.
This line in particular is the issue, line 103:
$wpdb->query('ALTER TABLE '.$table_name.' MODIFY field_value varchar(255) CHARSET utf8;');
http://wordpress.org/extend/plugins/nextgen-gallery-custom-fields/
Good spot, and thanks for the feedback.
I have committed 1.2.1 changing the field value back to TEXT.
I have left the labels as VARCHARs, as they really shouldn't be that long anyway :)
yashiharu
Member
Posted 6 months ago #
I just make it work with changing from var255 to 1024 by phpMyAdmin ...
I would like to know if the data will lost if i updated to ver1.2.1?
No yashiharu, no data should be lost. It will just allow for MUCH more data to be stored now.
Sorry for the oversight originally.
ksemel
Member
Posted 6 months ago #
Thanks shauno! Looks great now. :)
theoutdoors
Member
Posted 3 months ago #
I need a drop-down that lists all US states and Canadian provinces, but this same issue prevents me from doing so.
I have manually updated the DB, but wanted to point this out.
Change line 76 of ngg_custom_fields.php from this:
$wpdb->query('ALTER TABLE '.$table_name.' MODIFY drop_options varchar(255) CHARSET utf8;');
to this:
$wpdb->query('ALTER TABLE '.$table_name.' MODIFY drop_options TEXT CHARSET utf8;');
I have made the change in the trunk code, but don't really want to release another update for such a change. The next release will have it in, so you can update at that time and nothing will break for you :)
[ Signature moderated. ]