News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Menu Item Error 2.0.4

Started by teobgeno, April 12, 2012, 08:44:15 AM

Previous topic - Next topic

teobgeno

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



teobgeno

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.

Milbo

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

teobgeno

I am talking about joomla 1.5.26

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/

dezziner

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.

teobgeno

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.

bigfishtools

I have this issue with 2.0.6 have not tried 2.0.4 did you find any solution to this?

Thank you