RhymedCode Forum » Custom Write Panel

Bug in creating/editing new custom field

(2 posts)
  • Started 2 years ago by dmdevnull
  • Latest reply from niftycorp

  1. dmdevnull
    Member

    Forgive me if this has already been addressed--I searched the forum and didn't find anything, but may have missed it.

    I'm using Wordpress 2.3 and the plug-in seems to work fairly well--I was able to create and edit a post with a custom field.

    There does seem to be a bug when creating or editing a field that has a list of options (checkbox list, radiobutton list, dropdown list or listbox). If I add more than 19 options, the options are not saved--when I try to edit the custom field, the option list is empty.

    Additionally, even if I successfully create an option list when I create the field, if I try to edit the option list later, I get the following error:

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON DUPLICATE KEY UPDATE options = 'a:18:{i:0;s:1:"a";i:1;s:1:"b]
    INSERT INTO wp_rc_cwp_custom_field_options (custom_field_id, options, default_option) values (17, 'a:18:{i:0;s:1:"a";i:1;s:1:"b";i:2;s:1:"c";i:3;s:1:"d";i:4;s:1:"e";i:5;s:1:"f";i:6;s:1:"g";i:7;s:1:"h";i:8;s:1:"i";i:9;s:1:"j";i:10;s:1:"k";i:11;s:1:"l";i:12;s:1:"m";i:13;s:1:"n";i:14;s:1:"o";i:15;s:1:"p";i:16;s:1:"q";i:17;s:1:"s";}', 'a:1:{i:0;s:0:"";}') ON DUPLICATE KEY UPDATE options = 'a:18:{i:0;s:1:"a";i:1;s:1:"b";i:2;s:1:"c";i:3;s:1:"d";i:4;s:1:"e";i:5;s:1:"f";i:6;s:1:"g";i:7;s:1:"h";i:8;s:1:"i";i:9;s:1:"j";i:10;s:1:"k";i:11;s:1:"l";i:12;s:1:"m";i:13;s:1:"n";i:14;s:1:"o";i:15;s:1:"p";i:16;s:1:"q";i:17;s:1:"s";}', default_option = 'a:1:{i:0;s:0:"";}'

    Thanks for listening, and please keep up the great work on this very useful plug-in!
    Dave

    Posted 2 years ago #
  2. Hi Dave,

    I have been grappling with a similar problem, and just found a soultion in an earlier post: http://forum.rhymedcode.net/topic.php?id=18&page&replies=2

    My list was ok up to about 12 items, but I lost the list if I added any more.

    I made the change suggested in the post listed abvoe and it's working beautifully!

    annette :)

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.