Page 1 of 1

SOLVED - Problem with trying to add a new property for users in FEU 1.9

Posted: Wed May 19, 2010 8:40 am
by scotch33
Hi,

When i try to add an new property in FEU 1.9 I get the following issue...

INSERT INTO cms_module_feusers_propdefn (name,prompt,type,length,maxlength,attribs,force_unique) VALUES ('address_line_one','Address Line 1',0,80,255,'a:0:{}',1)
Unknown column 'force_unique' in 'field list'

Can anyone help?

Re: Problem with trying to add a new property for users in FEU 1.9

Posted: Wed May 19, 2010 11:15 am
by janb
Hi

There is a bug in FEU 1.9 method.install.php not adding column force_unique to sql table xxx_module_feusers_propdefn.
This bug is only relevant for new installation of FEU, not upgrading from older versions.

To fix this before an update is available make a new UDT (User Defined Tag) name it feu19tablefix and add this code:

Code: Select all

global $gCms;
$db = &$gCms->db;
$dict = NewDataDictionary($db);
$sql_add = $dict->AddColumnSQL(cms_db_prefix()."module_feusers_propdefn", "force_unique I1");
$sql_drop = $dict->DropColumnSQL(cms_db_prefix()."module_feusers_grouppropmap", "force_unique");
$dict->ExecuteSQLArray($sql_add);
$dict->ExecuteSQLArray($sql_drop);
Use the UDT in a content page like this {feu19tablefix}, load the page once and then remove the UDT from the page after you have checked that everything is ok. Then you can also delete the UDT.

JanB

Update: added fix to remove the extra "force_unique" column in module_feusers_grouppropmap.

Re: SOLVED - Problem with trying to add a new property for users in FEU 1.9

Posted: Wed May 19, 2010 12:44 pm
by scotch33
That's done it - thanks

Re: SOLVED - Problem with trying to add a new property for users in FEU 1.9

Posted: Wed May 26, 2010 12:34 pm
by zaskar
Hi,

it seems also that the FEU 1.9 installer create the force_unique column inthe wrong database table, as after applying your patch, if I can create properties, I still can't create groups getting a

Code: Select all

Column count doesn't match value count at row 1 INSERT INTO cms_module_feusers_grouppropmap.... 

dropping the force_unique column in the cms_module_feusers_grouppropmap table, solved my the problem.

Hope this helps

regards

Re: SOLVED - Problem with trying to add a new property for users in FEU 1.9

Posted: Wed May 26, 2010 12:37 pm
by janb
Yes, this is fixed in svn..

JanB

Re: SOLVED - Problem with trying to add a new property for users in FEU 1.9

Posted: Wed May 26, 2010 2:30 pm
by JM6891
Had this issue myself today...janb...your solution worked perfectly and so easy novices like me :)

Re: SOLVED - Problem with trying to add a new property for users in FEU 1.9

Posted: Wed May 26, 2010 2:58 pm
by JM6891
OK, so has anyone else come across the following error after resolving the initial error?

Column count doesn't match value count at row 1 INSERT INTO cms_module_feusers_grouppropmap VALUES('email',1,0,'2',1)

Came across this when trying to add a group after adding a new property.

The group seems to have been added anyway though.

Re: SOLVED - Problem with trying to add a new property for users in FEU 1.9

Posted: Wed May 26, 2010 3:02 pm
by janb
Have fixed this now in the UDT.

JanB

Re: SOLVED - Problem with trying to add a new property for users in FEU 1.9

Posted: Fri May 28, 2010 3:31 pm
by cacharopnet
Thanks a lot! That saved me.

Re: SOLVED - Problem with trying to add a new property for users in FEU 1.9

Posted: Sat Jun 05, 2010 2:44 am
by jmcgin51
very nice, janb!

Re: SOLVED - Problem with trying to add a new property for users in FEU 1.9

Posted: Fri Jun 11, 2010 5:41 pm
by michaelwalker
Sorry -this is not working for me:  I have a clean install of 1.7.1 and version 1.9.3 of FEU.  I added one property OK, but on trying to add a second, I got:

Code: Select all

Column count doesn't match value count at row 1
Checking in my SQL tables, I don't have a 'force_unique' column in the cms_module_feusers_grouppropmap table, but I do in feusers_propdefn table.  Any help/suggestions appreciated.