Jump to content

Community

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 post
Share on other sites
  • Sonya* changed the title to BUG: Column type for CheckboxSet is wrong in Converter
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy