News:

Support the VirtueMart project and become a member

Main Menu

VM 202 - 2.0.20b - COM_VIRTUEMART_ASSIGN_VM_TO_MENU

Started by lysov, March 16, 2012, 20:38:48 PM

Previous topic - Next topic

fedster

Hi there I'm getting the same error, but I'm not sure if it is the same case or a variant.

I have my menu item for all languages, the content of the products is there just in spanish. I can see the categories and access virtuemart from the menu, but I cant see the product pages, I get a 500 error on the log as you I get [10-Sep-2012 08:10:23 UTC] PHP Fatal error:  Cannot access empty property in path-to-joomla/libraries/joomla/registry/registry.php on line 336

I made the change you did to the router with no luck....

If I turn of Joomla's SEF I can see the product page.

any ideas are welcome and appreciated.

DaggaTora

Same here after update to 2.0.12b.

When i click on Ask a question i get: "Fatal error: Cannot access empty property in /libraries/joomla/registry/registry.php on line 336".
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

lysov

To avoid the message COM_VIRTUEMART_ASSIGN_VM_TO_MENU you need change the line #951 at the components/com_virtuemart/router.php from
$query = 'SELECT * FROM `#__menu`  where `link` like "index.php?option=com_virtuemart%" and client_id=0 and published=1 and (language="*" or language="'.$this->langTag.'")'  ;
to
$query = 'SELECT * FROM `#__menu`  where `link` like "index.php?option=com_virtuemart%" and client_id=0 and published=1 and (language="*" or language LIKE "'.$this->langTag.'")';

lysov


naseemj2

For General non-technical Public may follow the following solution.  I was deeply lost reading this form.  Thanks i did not alter Code.

[SOLVED]
Go to the 'Menus > Menu Manager > Main Menu' to create a menu item for your VirtueMart shop.

lysov

Quote from: naseemj2 on October 25, 2012, 06:36:21 AM
For General non-technical Public may follow the following solution.  I was deeply lost reading this form.  Thanks i did not alter Code.

[SOLVED]
Go to the 'Menus > Menu Manager > Main Menu' to create a menu item for your VirtueMart shop.

Your solution is not always acceptable. Do you have multilanguage site? There is router bug, the right decision - to build the correct SQL-query.

Milbo

#21
Quote from: lysov on October 20, 2012, 12:57:30 PM
To avoid the message COM_VIRTUEMART_ASSIGN_VM_TO_MENU you need change the line #951 at the components/com_virtuemart/router.php from
$query = 'SELECT * FROM `#__menu`  where `link` like "index.php?option=com_virtuemart%" and client_id=0 and published=1 and (language="*" or language="'.$this->langTag.'")'  ;
to
$query = 'SELECT * FROM `#__menu`  where `link` like "index.php?option=com_virtuemart%" and client_id=0 and published=1 and (language="*" or language LIKE "'.$this->langTag.'")';

lysov you are in the developer chat, why you never mentioned it? Why do you lament and cry here and in the meantime chatting with me and not saying anything? I think most people do not imagine how many posts are written on this board. I cannot and I must not check the forum daily. If I would do that, the core would be like march 9 months ago, because instead of developing I would answer alll the time posts, explaining that the bug is not fixed, because I am answering. If there is a problem and an unanswered thread, write a pn, ask me skype, that is the reason that we have this developer chat.

and I read your explanations and we do with the language tag this:

self::$_jpConfig->lang = strtolower(strtr($siteLang,'-','_'));


So if you need a like, then there is something else broken and using LIKE is bad, because it is slowing down the query, therefore I did not add it yet. Additionally others solve the problem just assigning an menu item, because 99% of people need it anyway.

So and before I fix something for free for just 1% of vm users,then I prefer to fix something for free which helps 50% of vm users, that is just a lot more economic.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Rune Rasmussen

WOW - Is it really only 1 percent of VM users who have a multilingual site??

Thanks lysov, your fix saved my day on a multilingual site witch indeed had menu items for VM, but still throw out the annoying error message.

#someoneblindfolded
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

lysov

Not at all. Have to wait until it's developers will make a small correction. I am surprised at their tenacity