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

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
scotch33
Dev Team Member
Dev Team Member
Posts: 284
Joined: Tue Feb 14, 2006 9:56 pm

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

Post 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?
Last edited by scotch33 on Wed May 19, 2010 12:44 pm, edited 1 time in total.
janb

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

Post 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.
Last edited by janb on Wed May 26, 2010 3:01 pm, edited 1 time in total.
scotch33
Dev Team Member
Dev Team Member
Posts: 284
Joined: Tue Feb 14, 2006 9:56 pm

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

Post by scotch33 »

That's done it - thanks
zaskar
New Member
New Member
Posts: 5
Joined: Wed Sep 16, 2009 9:43 am

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

Post 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
--------------------------------------
Zaskar
janb

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

Post by janb »

Yes, this is fixed in svn..

JanB
JM6891
Forum Members
Forum Members
Posts: 150
Joined: Thu Mar 18, 2010 2:35 pm

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

Post by JM6891 »

Had this issue myself today...janb...your solution worked perfectly and so easy novices like me :)
JM6891
Forum Members
Forum Members
Posts: 150
Joined: Thu Mar 18, 2010 2:35 pm

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

Post 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.
janb

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

Post by janb »

Have fixed this now in the UDT.

JanB
cacharopnet
Forum Members
Forum Members
Posts: 20
Joined: Tue May 25, 2010 12:43 am

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

Post by cacharopnet »

Thanks a lot! That saved me.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

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

Post by jmcgin51 »

very nice, janb!
michaelwalker
Forum Members
Forum Members
Posts: 41
Joined: Thu Jul 02, 2009 3:51 pm
Location: Cambridge UK

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

Post 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.
Post Reply

Return to “Modules/Add-Ons”