News:

Support the VirtueMart project and become a member

Main Menu

Order problem with VM 3.0.8

Started by baqpad, September 22, 2015, 18:36:05 PM

Previous topic - Next topic

baqpad

Hi,

I've got a problem with orders. Some users could view orders that doesn't belong to them  :-\ Also when I click on an user to get the info (VM BE) the following error comes up:
--------------------------
1052 Column 'username' in field list is ambiguous SQL=SELECT SQL_CALC_FOUND_ROWS ju.id AS id , ju.name AS name , ju.username AS username , ju.email AS email , IFNULL(vmu.user_is_vendor,"0") AS is_vendor , IFNULL(sg.shopper_group_name, "") AS shopper_group_name , ui.name as uiname , company , first_name , last_name , ju.name , username , email , shopper_group_name FROM zaosc_users AS ju LEFT JOIN zaosc_virtuemart_vmusers AS vmu ON ju.id = vmu.virtuemart_user_id LEFT JOIN zaosc_virtuemart_vmuser_shoppergroups AS vx ON ju.id = vx.virtuemart_user_id LEFT JOIN zaosc_virtuemart_shoppergroups AS sg ON vx.virtuemart_shoppergroup_id = sg.virtuemart_shoppergroup_id LEFT JOIN zaosc_virtuemart_userinfos AS ui ON ui.virtuemart_user_id = vmu.virtuemart_user_id WHERE company LIKE "%YASMINAHERNANDEZ%BETANCORT%" OR first_name LIKE "%YASMINAHERNANDEZ%BETANCORT%" OR last_name LIKE "%YASMINAHERNANDEZ%BETANCORT%" OR ju.name LIKE "%YASMINAHERNANDEZ%BETANCORT%" OR username LIKE "%YASMINAHERNANDEZ%BETANCORT%" OR email LIKE "%YASMINAHERNANDEZ%BETANCORT%" OR shopper_group_name LIKE "%YASMINAHERNANDEZ%BETANCORT%" GROUP BY ju.id ORDER BY ju.id DESC LIMIT 0, 100
--------------------------
In particular this user doesn't exist in Joomla's user section, just in VM ?????

I'm not sure if upgrading to VM 3.0.10 is secure in this case.

Joomla 3.4.4
VM 3.0.8
PHP 5.4.39

I hope someone can give me a hand with this problem. Thanks very much.

Milbo

1052 Column 'username' in field list is ambiguous

Seems to be an older shop. This error should now be prevented no database level. Check your table "zaosc_virtuemart_userinfos " and look if you have there the column username

"ju.username AS username , ju.email AS email , IFNULL(vmu.user_is_vendor,"0") AS is_vendor , IFNULL(sg.shopper_group_name, "") AS shopper_group_name , ui.name as uiname , company , first_name , last_name , ju.name , username , email , shopper_group_name FROM zaosc_users"

As you can see here, the "username" is used twice.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

baqpad

#2
Hi Milbo,

Thanks for your reply. Have checked table "zaosc_virtuemart_userinfos" and there is really a column "username". But have to say that I'm not good with DB. Could you please advise how to go on with this problem?

Thanks a lot.

Edit: And yes this site was migrated from Joomla 2.5.28 + VM 2.6 to Joomla 3.4 + VM 3.0

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

serge-web54

i have got exactly the same issue, do you have solved it ?