News:

Support the VirtueMart project and become a member

Main Menu

Upgrading VM2 to 3

Started by madscotsman, December 04, 2014, 08:53:30 AM

Previous topic - Next topic

madscotsman

HI all,

I am trying to update my site from VM2 to VM3. I have a local copy on my local PC. I am using Joomla 2.5.27 and VM2.6.14. I also have the JoomSEF Virtuemart extension. JoomSEF is version 4 and the VM extension is up to date, which it says on their website will work with VM 2 and 3.

I have read the guide at

http://docs.virtuemart.net/tutorials/installation-migration-upgrade/198-upgrade-virtuemart-2-to-virtuemart-3.html


Any time I try and update  from VM 2 to 3, I get a display which looks like

( ! ) Notice: Undefined property: stdClass::$link in C:\wamp\www\Nav-e-gate4less\administrator\modules\mod_vmmenu\tmpl\default.php on line 41
Call Stack
#   Time   Memory   Function   Location
1   0.0005   692128   {main}( )   ..\index.php:0
2   0.5389   19831432   JAdministrator->render( )   ..\index.php:52
3   0.5580   19902248   JDocumentHTML->render( )   ..\application.php:202
4   0.5580   19902248   JDocumentHTML->_renderTemplate( )   ..\html.php:433
5   0.9079   22121776   JDocumentHTML->getBuffer( )   ..\html.php:652
6   0.9079   22122392   JDocumentRendererModules->render( )   ..\html.php:371
7   1.8871   22795456   JDocumentRendererModule->render( )   ..\modules.php:39
8   1.8872   22796200   JModuleHelper::renderModule( )   ..\module.php:107
9   1.9008   22850368   include( 'C:\wamp\www\Nav-e-gate4less\administrator\modules\mod_vmmenu\mod_vmmenu.php' )   ..\helper.php:173
10   1.9099   22896808   require( 'C:\wamp\www\Nav-e-gate4less\administrator\modules\mod_vmmenu\tmpl\default.php' )   ..\mod_vmmenu.php:34

( ! ) Notice: Undefined property: stdClass::$text in C:\wamp\www\Nav-e-gate4less\administrator\modules\mod_vmmenu\tmpl\default.php on line 41
Call Stack
#   Time   Memory   Function   Location
1   0.0005   692128   {main}( )   ..\index.php:0
2   0.5389   19831432   JAdministrator->render( )   ..\index.php:52
3   0.5580   19902248   JDocumentHTML->render( )   ..\application.php:202
4   0.5580   19902248   JDocumentHTML->_renderTemplate( )   ..\html.php:433
5   0.9079   22121776   JDocumentHTML->getBuffer( )   ..\html.php:652
6   0.9079   22122392   JDocumentRendererModules->render( )   ..\html.php:371
7   1.8871   22795456   JDocumentRendererModule->render( )   ..\modules.php:39
8   1.8872   22796200   JModuleHelper::renderModule( )   ..\module.php:107
9   1.9008   22850368   include( 'C:\wamp\www\Nav-e-gate4less\administrator\modules\mod_vmmenu\mod_vmmenu.php' )   ..\helper.php:173
10   1.9099   22896808   require( 'C:\wamp\www\Nav-e-gate4less\administrator\modules\mod_vmmenu\tmpl\default.php' )   ..\mod_vmmenu.php:34

How do I get round this?


GJC Web Design

1. these are only notices - not errors
2. this is the VM admin module and at those lines it should detect that your version is VM3 and not show

if(JVM_VERSION<3){
      $vmMenu='<ul id="menu" >';
      $vmMenu.='<li class="node '.$class.'"><a href="'.$vmComponentItems->link.'">'.$vmComponentItems->text.'</a>';//LINE 41
   } else{
      $vmMenu='<ul id="menu" class="nav '.$class.'" >';
      $vmMenu.='<li class="dropdown" ><a class="dropdown-toggle" data-toggle="dropdown" href="#">'.$vmComponentItems->text.'<span class="caret"></span></a>';
   }

hmmmm
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

madscotsman

Thanks for that.

So how do I stop Joomla displaying these notices? I have debug set to off in the Global Configuration.


GJC Web Design

the problem is if you really are now are VM3 then this check 

if(JVM_VERSION<3){

is failing (it shouldn't - your version isn't less than 3)  and therefore giving the notices .. so even though they are only notices I assume your BE admin menu for VM doesn't work?

if that is the case one assumes this is a bug? - maybe JVM_VERSION isn't defined in the module?

to test try at the top of administrator\modules\mod_vmmenu\tmpl\default.php

define( 'JVM_VERSION', '3' );

or just comment out the <3 part

/*if(JVM_VERSION<3){
      $vmMenu='<ul id="menu" >';
      $vmMenu.='<li class="node '.$class.'"><a href="'.$vmComponentItems->link.'">'.$vmComponentItems->text.'</a>';//LINE 41
   } else{*/
      $vmMenu='<ul id="menu" class="nav '.$class.'" >';
      $vmMenu.='<li class="dropdown" ><a class="dropdown-toggle" data-toggle="dropdown" href="#">'.$vmComponentItems->text.'<span class="caret"></span></a>';
//   }
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation