Page 1 of 1

[Solved] Calendar Custom Fields not working

Posted: Fri Aug 31, 2007 8:51 pm
by cubitus
I've installed a fresh version of cmsms 1.1.1 and Calendar 0.7.10

Values of custom fields where not persisted in the db. Found the problem :

The table cms_module_calendar_event_field_values was not created on my db. I don't know why ...

I'm running cmsms on WinXP, Apache 2.2.4, PHP 5.2.3 and MySQL 5.0.45-community-nt

I've simply run the following sql script in order to create the missing table :

Code: Select all

CREATE TABLE cms_module_calendar_event_field_values ( 
	field_name 	varchar(255) NULL,
	event_id   	varchar(25) NULL,
	field_value	text NULL 
	)
GO
Hope that will help someone

Re: Calendar Custom Fields not working

Posted: Sun Sep 02, 2007 4:11 pm
by codepoet
I suspect that this is caused by a change to the code between 0.7.9 and 0.7.10 in method.install.php line64, where there is an extra comma on the end of the list of fields:
// create event_field_values table
$fields = "
field_name C(255) KEY,
event_id I KEY,
field_value X[glow=red,2,300],[/glow]
";
$sql_array = $dict->CreateTableSQL($this->event_field_values_table_name, $fields, $table_options );
$dict->ExecuteSQLArray( $sql_array );
No change was made for mathod.upgrade.php, so it should work it you have upgraded from 0.7.9. I will run some tests to confirm this is the cause, and then make a change to sort it out of the next release.

Re: Calendar Custom Fields not working

Posted: Sun Sep 02, 2007 4:23 pm
by codepoet
Indeed that was the cause of the problem. If you want to get 0.7.10 to install from scratch you will need to remove the comma mentioned above before installing the module via the admin. It will be fixed in the next version.