After upgrading to 2.0.8e, get the following error on any cart pages like adding/editing shipping addresses, viewing past orders, etc.
QuoteNotice: Undefined property: VirtuemartViewUser::$JUser in /home/wwwlovin/public_html/dev/components/com_virtuemart/views/user/tmpl/login.php on line 28
Notice: Trying to get property of non-object in /home/wwwlovin/public_html/dev/components/com_virtuemart/views/user/tmpl/login.php on line 28
I happens if the user is logged in or not but happens for first time customers only. The message goes away when someone enters their shipping address in the Add/Edit address page. It does NOT show the message for returning customers (who have ordered before - because their address is recorded already).
You can view here: http://tinyurl.com/cgy6fvw
Please help! I am trying to launch my site!!!
Hi growfish,
Firstly are you using template overrides? If so your line number will be referencing something completely different to what the core code is... For example, I have an original install, untouched... and that line in my login.php file reads:
} else{
which is within this condition statement
if (empty($this->url)){
$uri = JFactory::getURI();
$url = $uri->toString(array('path', 'query', 'fragment'));
} else{
$url = $this->url;
}
...??? it makes no reference at all to $JUser
Also, you may want to check your javascript file (spritely.js) and remove/hash any lines that uses console.log() as it's writing crazy amount of lines in the console which makes debugging annoying.
I hope this helps. ;D
Thanks for the reply.
To my knowledge I am NOT using any template overrides. It's a fresh install of VM on a template that I purchased.
But my line reads different then yours for some reason. My line 28 of login.php is
if ($this->show and $this->JUser->id == 0 ) {
of
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
if(!class_exists('shopFunctionsF')) require(JPATH_VM_SITE.DS.'helpers'.DS.'shopfunctionsf.php');
$comUserOption=shopfunctionsF::getComUserOption();
$uri = JFactory::getURI();
$url = $uri->toString(array('path', 'query', 'fragment'));
// vmdebug('$this->show ',$this);
if ($this->show and $this->JUser->id == 0 ) {
JHtml::_('behavior.formvalidation');
JHTML::_ ( 'behavior.modal' );
// vmdebug('cart',$this->cart);
All that is greek to me - but at least it does make mention of JUser.
Any ideas?
anyone?!
Disable the template, which you bought to be sure.
I get the error even when my custom Joomla template is deactivated/disabled. Any ideas? I'm desperate here?!?!
But then the error should show an other line, because the line you gave us is not the original one.
That code is in the version of login.php included in VM 2.0.2 but not in the 2.0.8e version. So either it is an incomplete update to 2.0.8e or there is an old override file being used.