Membership Saved Searches MySQL Error: Data too long for column

Re: [zick] Membership Saved Searches MySQL Error: Data too long for column

By Jason - November 7, 2011 - edited: November 7, 2011

Hi,

Sorry for the blank post.

What is happening here is that the text being entered is too long for the name field in the database. The "max length" value is only used for error checking when creating a record inside the cms.

The _website_saved_searches table that the plugin creates is of type varchar(255) (ie, can accept a maximum of 255 characters). Any reasonable length saved search name would be under that length. However, if you want to be able to increase this length, try this:

-edit your saved searches section and click modify for "name".
-under Advanced Options, in the MySql Column Type, type in MEDIUMTEXT NOT NULL

Remember to backup your database and files prior to attempting this.

This will increase the size of the name field to take in the length of name you are referring to.

The "Prevent this page from creating additional dialogs" is a javascript feature of your browser. It is meant to stop the same error from showing up multiple times. The error is still occurring, it just wouldn't be reported.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [zick] Membership Saved Searches MySQL Error: Data too long for column

By Dave - November 8, 2011

And you can also set maxlength="255" on your <input ... > field to prevent the user from entering more than 255 chars.
Dave Edis - Senior Developer
interactivetools.com