VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: baqpad on September 22, 2015, 18:36:05 PM

Title: Order problem with VM 3.0.8
Post by: baqpad on September 22, 2015, 18:36:05 PM
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.
Title: Re: Order problem with VM 3.0.8
Post by: Milbo on September 23, 2015, 09:09:54 AM
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.
Title: Re: Order problem with VM 3.0.8
Post by: baqpad on September 23, 2015, 11:17:48 AM
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
Title: Re: Order problem with VM 3.0.8
Post by: Milbo on September 23, 2015, 15:21:25 PM
http://extensions.virtuemart.net/support/support-for-10-minutes-detail

is a 10 minutes support ticket.
Title: Re: Order problem with VM 3.0.8
Post by: serge-web54 on October 22, 2015, 14:40:58 PM
i have got exactly the same issue, do you have solved it ?