Page 1 of 1

SOLVED: calendar extra fields not written into existing db table

Posted: Fri Sep 07, 2007 11:07 am
by millhaus
hi there,

first question , does calendar 0.7.9. run with cms 1.0.8 at all or wiould i need >1.1.x?

i browsed the form and tried some solutions others found, but still it doesn't work.

i succesfully manually created the missing db table as suggested in the other thread:

CREATE TABLE xxx_module_calendar_event_field_values (
field_name varchar(255) NULL,
event_id  varchar(25) NULL,
field_value text NULL
)

where xxx is my custom db-prefix instead of default "cms"

but still the problem persists:

when i add a custom field, it says " --Add Me - module:Calendar string:fieldadded--", but it isn't written into the db.

has anyone an idea why that is?

i'm not very familiar with mysql and sql queries in general, may it be something regarding write permissions to the db??


SOLUTION:

in Calendar.module.php there were some wrong table names in the functions GetFields(), AdminDisplayFields, AdminAddField, AdminDeletefield, AdminUpdateField

in each of these functions you should have a "$this->event_field_values_table_name" somewhere, sometimes it has "$this->fields_table_name" and sometimes both (why?????), changing some of the fields_table_name into event_field_values_table_name solved the problem for me, though i have no idea if this two different tabels and referes are a bug or will make some sense in another context... ???

:) taedaaaaaaaaaaaaaaaaaa  ;D

Re: calendar extra fields not written into existing db table

Posted: Fri Sep 07, 2007 12:19 pm
by millhaus
browsing through Calendar.module.php i see that there is another table missing: "module_calendar_fields"

does anyone know what that is for?

UPDATE: i ve found some errors in the Calendar.module.php where table names got mixed up, it looks beter now, at least it reads, displays and uses custom fields that i inserted manually via db-admin, so maybe soon i'll find the rest i need to change in the ode to make it work.

thanks :)

Re: SOLVED: calendar extra fields not written into existing db table

Posted: Fri Oct 05, 2007 6:12 pm
by neis
I had the same problem (Custom Fields values not being saved to the database). This problem was fixed after I installed the Patch 1843 (http://dev.cmsmadesimple.org/tracker/index.php?func=detail&aid=1843&group_id=20&atid=159). I had to Uninstall the module and Reinstall it. (WARNING! Make a backup of your database FIRST. The uninstall will remove the Calendar module tables.)