News:

Support the VirtueMart project and become a member

Main Menu

VM 203B, CMS in Debug Mode - Error #500

Started by lysov, March 11, 2012, 13:44:52 PM

Previous topic - Next topic

lysov

Joomla 252, VM 203 - Joomla in the Debug Mode. When I trying to open BE product list, system report about following error
500 - An error has occurred.
JDatabaseMySQLi::query: 1052 - Column 'virtuemart_shoppergroup_id' in field list is ambiguous SQL=SELECT virtuemart_shoppergroup_id FROM `lt_virtuemart_vmusers` as `u` LEFT OUTER JOIN `lt_virtuemart_vmuser_shoppergroups` AS `vx` ON `u`.`virtuemart_user_id` = `vx`.`virtuemart_user_id` LEFT OUTER JOIN `lt_virtuemart_shoppergroups` AS `sg` ON `vx`.`virtuemart_shoppergroup_id` = `sg`.`virtuemart_shoppergroup_id` WHERE `u`.`virtuemart_user_id` = "42"

The URL looks like http://www.site.local/administrator/index.php?option=com_virtuemart&view=product

lysov

And some potential bugs in constructions "switch (xxxxx) {
                case 'xxxxx';
                break;
                default ;

For example, router.php contains
        switch ($view) {
                case 'virtuemart';
                                . . .
                case 'category';
                                . . .
                default ;

Try search like this:
$ grep -r 'default ;'  .
./components/com_virtuemart/router.php:         default ;
./administrator/components/com_virtuemart/models/product.php:                 default ;

Milbo

The first bug is afaik fixed in the svn.

The other thing. What is the problem with it? default dont need a break, it is the last entry
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lysov

#3
Only two variants of the syntax for control structures are supported with switches. The use of undocumented options (such as "case 1;") may cause undesired operation code, like in the VM  :) For more information, see syntax for control structures http://www.php.net/manual/en/control-structures.alternative-syntax.php  :)
Try to set "Error Reporting" to "Development" (Joomla Global Configuration) and you'll be surprised at the number of VM errors...