Bug #355

Display Products in Admin produces 500 error

Added by John Wicks about 1 year ago. Updated about 1 year ago.

Status:Rejected Start date:04/20/2011
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:Products Spent time: -
Target version:2.0 (Stable version) Estimated time:1.00 hour

Description

Steps to Reproduce:

1. Install Joomla 1.5.23 or latest version with sample data and table prefix other than jos_
2. Checkout latest VM trunk. Change line 58 of administrator/components/com_virtuemart/install/install_sample_data.sql so hard coded jos_ is #__, See issue 354
3. Create installation package from latest VM trunk, install sample data
4. Open VM administration area
5. Click Products List button or Products/Products from the menu

Fatal error: Call to undefined function dump() in C:\Program Files (x86)\Zend\Apache2\htdocs\VirtueMart15Devel\administrator\components\com_virtuemart\models\product.php on line 689

Line 689 has the following code:
dump($this->_db,'product Id List');

Believe this should be commented out

History

Updated by John Wicks about 1 year ago

  • Target version set to 2.0 (Stable version)

Index: product.php ===================================================================
--- product.php (revision 3062)
+++ product.php (working copy)
@ -147,7 +147,7 @
$this->setId($product_id);

$child = $this->getProductSingle($product_id,$front, $withCalc,$onlyPublished);
- dump($child,'my id getProduct '.$product_id);
+// dump($child,'my id getProduct '.$product_id);
//store the original parent id
$pId = $child->product_id;
@ -159,7 +159,7 @
while(!empty($child->product_parent_id)){
$parentProduct = $this->getProductSingle($child->product_parent_id,$front, $withCalc,$onlyPublished);
$attribs = get_object_vars($parentProduct);
- dump($attribs,'my $$attribs '.$child->product_parent_id);
// dump($attribs,'my $$attribs '.$child->product_parent_id);
foreach($attribs as $k=>$v){
if(is_array($child->$k)){
if(!is_array($v)) $v =array($v);
@ -170,7 +170,7 @
}
}
}
- dump($child,'my $child with Parent level '.$i
+);
// dump($child,'my $child with Parent level '.$i+);
$child->product_parent_id = $parentProduct->product_parent_id;
}
$child->published = $published;
@ -686,7 +686,7 @
$this->_db->setQuery($q, $this->_pagination->limitstart, $this->_pagination->limit);
$productIdList = $this->_db->loadResultArray();
- dump($this->_db,'product Id List');
// dump($this->_db,'product Id List');
$products = array();
foreach ($productIdList as $id){
// dump($id, 'My id');
@ -996,7 +996,7 @
} else{
$data = JRequest::get('post', 4);
}
- dump($data,'my data saveProduct');
// dump($data,'my data saveProduct');
/* Setup some place holders */
$product_data = $this->getTable('product');

Updated by Christopher Roussel about 1 year ago

  • Status changed from New to Resolved

See [[http://dev.virtuemart.net/projects/virtuemart/wiki/Setting_up_a_Development_Environment]] under 'Setup an IDE and SVN' where it says

For development and testing we use JDump ([[http://extensions.joomla.org/extensions/miscellaneous/development/1509]]) In official releases (beta, RC and, of course, final), all dump() calls are removed or outcommented, but for SVN checkouts of development releases this extension is required.

Updated by Max Milbers about 1 year ago

  • Status changed from Resolved to Rejected
  • % Done changed from 0 to 100

Also available in: Atom PDF