VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: teobgeno on April 12, 2012, 08:44:15 AM

Title: Menu Item Error 2.0.4
Post by: teobgeno on April 12, 2012, 08:44:15 AM
joomla 1.5.26 vm 2.0.4

When i try to create a new menu item with type VirtueMart Product Details Layout it throws me

Fatal error: Cannot access empty property in libraries\joomla\registry\registry.php on line 194


Title: Re: Menu Item Error 2.0.4
Post by: teobgeno on April 12, 2012, 10:54:09 AM
After some research

Menu item VirtueMart Product Details use JElementVmproductsmenu class to create a drop down list of products to attach to menu item.this procedure is through

return JHTML::_('select.genericlist', $this->_getProducts(), $control_name . '[' . $name . ']', '', 'value', 'text', $value, $control_name . $name); in the same class file.

The private function $this->_getProducts() calls product model through VmModel

$productModel = VmModel::getModel('product');

$productModel  object (VirtueMartModelProduct class) calls $this->updateRequests() 

updateRequests()  calls $this->checkFilterDir function inherited from parent VmModel

checkFilterOrder calls

$app->setUserState( 'com_virtuemart.'.$view.'.filter_order_Dir',$filter_order_Dir);

The $view variable $view = JRequest::getWord('view'); is empty in my case but the error triggered from this

$app->setUserState( 'com_virtuemart.'.$view.'.filter_order_Dir',$filter_order_Dir);

If i modify it to

$app->setUserState( 'com_virtuemart'.$view.'filter_order_Dir',$filter_order_Dir);

it works fine and the menu item throws no error.

Why this dots conflict the $registry ? I cannot still figure it out.
Title: Re: Menu Item Error 2.0.4
Post by: Milbo on April 12, 2012, 12:31:30 PM
Hmm, I dont have this problem in 2.5.4
Title: Re: Menu Item Error 2.0.4
Post by: teobgeno on April 12, 2012, 12:37:10 PM
I am talking about joomla 1.5.26
Title: Re: Menu Item Error 2.0.4
Post by: Milbo on April 12, 2012, 12:40:37 PM
I know.
Title: Re: Menu Item Error 2.0.4
Post by: dezziner on April 26, 2012, 11:27:51 AM
hi,

Please let me know in which file we have to edit it?

Many Thanks,

Quote from: teobgeno on April 12, 2012, 10:54:09 AM
After some research

Menu item VirtueMart Product Details use JElementVmproductsmenu class to create a drop down list of products to attach to menu item.this procedure is through

return JHTML::_('select.genericlist', $this->_getProducts(), $control_name . '[' . $name . ']', '', 'value', 'text', $value, $control_name . $name); in the same class file.

The private function $this->_getProducts() calls product model through VmModel

$productModel = VmModel::getModel('product');

$productModel  object (VirtueMartModelProduct class) calls $this->updateRequests() 

updateRequests()  calls $this->checkFilterDir function inherited from parent VmModel

checkFilterOrder calls

$app->setUserState( 'com_virtuemart.'.$view.'.filter_order_Dir',$filter_order_Dir);

The $view variable $view = JRequest::getWord('view'); is empty in my case but the error triggered from this

$app->setUserState( 'com_virtuemart.'.$view.'.filter_order_Dir',$filter_order_Dir);

If i modify it to

$app->setUserState( 'com_virtuemart'.$view.'filter_order_Dir',$filter_order_Dir);

it works fine and the menu item throws no error.

Why this dots conflict the $registry ? I cannot still figure it out.
Title: Re: Menu Item Error 2.0.4
Post by: teobgeno on April 26, 2012, 14:25:56 PM
joomla 1.5.26
The file located at administrator/components/com_virtuemart/helpers/vmmodel.php .
This happens only with 2.0.4 with 2.0.6 i dont't have this issue.
Title: Re: Menu Item Error 2.0.4
Post by: bigfishtools on May 08, 2012, 23:25:18 PM
I have this issue with 2.0.6 have not tried 2.0.4 did you find any solution to this?

Thank you