[HACKED] CBJuice Save Users Error

15 years 7 months ago #71901 by rapereira
[HACKED] CBJuice Save Users Error was created by rapereira
I just hacked the code to solve this. After line 1158
in admin.cbjuice.php I added:
if($columnname == 'params'){ $columnname = 'c.'.$columnname;}
Because this was the only ambiguous column, the query worked.

ORIGINAL PROBLEM

I have just installed CBJuice (com_cbjuice_1-5_rc2.zip)
I am running Joomla 1.5.6 with legacy 1.0 enabled
I have CB 1.2 rc2 installed and running nicely.
When I clicked on "Save Users" in cbjuice I got the following error

function defined
SQL error in comprofilerDB function failed with error number 1052
Column: 'params' in field list is ambiguous SQL=SELECT name,lastvisitDate,registerDate,username,firstname,middlename,lastname,lastupdatedate,email,hits,password,params,cb_school,cb_bigten,cb_bigeast,cb_womensbball,cb_big12,cb_acc,cb_sec,cb_pac10,cb_sunbelt,cb_patriot,cb_wac,cb_wcc,cb_a10,cb_mvc,cb_bcs,cb_ncaa,cb_d2,cb_d3,cb_italian,cb_irish,cb_jewish,cb_greek,cb_hunky,cb_spanish,cb_black,cb_military,cb_yucks,cb_politicalsatire,cb_beer,cb_football,cb_mensbball,cb_lacrosse,cb_baseball,cb_division,cb_title,usertype FROM jos_users u LEFT JOIN jos_comprofiler c on (u.id=c.user_id)
SQL =

SELECT name,lastvisitDate,registerDate,username,firstname,middlename,lastname,lastupdatedate,email,hits,password,params,cb_school,cb_bigten,cb_bigeast,cb_womensbball,cb_big12,cb_acc,cb_sec,cb_pac10,cb_sunbelt,cb_patriot,cb_wac,cb_wcc,cb_a10,cb_mvc,cb_bcs,cb_ncaa,cb_d2,cb_d3,cb_italian,cb_irish,cb_jewish,cb_greek,cb_hunky,cb_spanish,cb_black,cb_military,cb_yucks,cb_politicalsatire,cb_beer,cb_football,cb_mensbball,cb_lacrosse,cb_baseball,cb_division,cb_title,usertype FROM jos_users u LEFT JOIN jos_comprofiler c on (u.id=c.user_id)


Can anyone help please. I know why this is happening (params is in both tables), what I don't know, is how I can fix this. Where is this query built, and why doesn't it make use of the alias' it creates for the tables? [FROM jos_users u LEFT JOIN jos_comprofiler c ] This sounds like a great component and I would love to make use of it.

Post edited by: rapereira, at: 2008/08/21 18:08

Post edited by: rapereira, at: 2008/08/21 18:30

Please Log in to join the conversation.

15 years 7 months ago #71919 by wrongjon
Replied by wrongjon on topic Re:[HACKED] CBJuice Save Users Error
SUPERB!

I've been looking at this all evening and been on the email with Paul the developer...

Ill try your suggestion and if works email him it..

thanks
Jonathan

Please Log in to join the conversation.

15 years 7 months ago #71969 by jciconsult
Replied by jciconsult on topic Re:[HACKED] CBJuice Save Users Error
Can someone please explain ASAP how I can duplicate the problem. I think the fix is obvious but I would like to test it. I did a clean xampp installtion of cb 1.2rc2 but did not get the params field. Has there been a change to the released code or what? I installed RC2 - still no second params field in comprofiler. How is it created?

Post edited by: jciconsult, at: 2008/08/22 16:02

Post edited by: jciconsult, at: 2008/08/22 16:15

Please Log in to join the conversation.

15 years 7 months ago #71975 by nant
Replied by nant on topic Re:[HACKED] CBJuice Save Users Error
jciconsult wrote:

Can someone please explain ASAP how I can duplicate the problem. I think the fix is obvious but I would like to test it. I did a clean xampp installtion of cb 1.2rc2 but did not get the params field. Has there been a change to the released code or what? I installed RC2 - still no second params field in comprofiler. How is it created?

Post edited by: jciconsult, at: 2008/08/22 16:02

Post edited by: jciconsult, at: 2008/08/22 16:15


There is no params column in comprofiler table.

Please Log in to join the conversation.

15 years 7 months ago #71976 by jciconsult
Replied by jciconsult on topic Re:[HACKED] CBJuice Save Users Error
I am guessing that fields are being added to comprofiler from other components. That is almost impossible to test. I am working on a version which will use u.fieldname and c.fieldname as appropriate. When I have tested it as well as I can, I will put it up tomorrow.

Please Log in to join the conversation.

15 years 7 months ago #71977 by rapereira
Replied by rapereira on topic Re:[HACKED] CBJuice Save Users Error
I don't know why, but there is a params column in my jos_comprofiler table. However, it is always null. I should have used if($columnname == 'params'){ $columnname = 'u.'.$columnname;}
to get the params data from jos_users.

I am going to remove the params column from my jos_comprofiler table and that should be that.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.226 seconds

Facebook Twitter LinkedIn