Jump to content

BUG: Column type for CheckboxSet is wrong in Converter


Go to solution Solved by bfarber,

Recommended Posts

Custom field of type CheckboxSet has always multiple values. It cannot be used with type INT in database, or you get an error for wrong integer type '' if no value is selected. However, in the converter you set the field to the type INT if is not defined as multiple:

				case 'CheckboxSet':
				case 'Member':
					if ( $data['multiple'] )
					{
						$columnDefinition['type']	= 'TEXT';
					}
					else
					{
						$columnDefinition['type']	= 'INT';
						$columnDefinition['length']	= 10;
					}
					break;

It is not possible to save a record with field type CheckboxSet that is defined as INT.

The type should be moved down to:

				case 'CheckboxSet':   <-------------
				case 'TextArea':
				case 'Upload':
				case 'Address':
				case 'Codemirror':
				case 'Select':
				case 'Youtube':
				case 'Spotify':
				case 'Soundcloud':
				case 'Item':
					$columnDefinition['type'] = 'TEXT';
					break;

 

Edited by Sonya*
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...