VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: melsonmarketing on November 27, 2019, 10:43:40 AM

Title: Editing addresses doesn't work ?!
Post by: melsonmarketing on November 27, 2019, 10:43:40 AM
I just updated a site and now it's impossible to edit customer accounts in the FE.

calling "index.php?option=com_virtuemart&view=user&layout=edit" leads to a "0 - Call to a member function get() on null"

Php7.2.18
J! 3.9.13
VM 3.6.10

disabling

- overrides
- JCH Optimize
- SEF

Doesn't make a difference.

Thanks for your assistance

Michael
Title: Re: Editing addresses doesn't work ?!
Post by: GJC Web Design on November 27, 2019, 14:53:19 PM
use Joomla debug to get the full error trace so we know where the error is thrown
Title: Re: Editing addresses doesn't work ?!
Post by: melsonmarketing on November 28, 2019, 11:14:11 AM
Here is the error:

Call to a member function get() on null
/path/to/page/components/com_virtuemart/views/user/view.html.php:282
Call stack
#    Function    Location
1    ()    JROOT/components/com_virtuemart/views/user/view.html.php:282
2    VirtuemartViewUser->shopper()    JROOT/components/com_virtuemart/views/user/view.html.php:142
3    VirtuemartViewUser->display()    JROOT/components/com_virtuemart/controllers/user.php:59
4    VirtueMartControllerUser->display()    JROOT/libraries/src/MVC/Controller/BaseController.php:710
5    Joomla\CMS\MVC\Controller\BaseController->execute()    JROOT/components/com_virtuemart/virtuemart.php:120
6    require_once()    JROOT/libraries/src/Component/ComponentHelper.php:402
7    Joomla\CMS\Component\ComponentHelper::executeComponent()    JROOT/libraries/src/Component/ComponentHelper.php:377
8    Joomla\CMS\Component\ComponentHelper::renderComponent()    JROOT/libraries/src/Application/SiteApplication.php:194
9    Joomla\CMS\Application\SiteApplication->dispatch()    JROOT/libraries/src/Application/SiteApplication.php:233
10    Joomla\CMS\Application\SiteApplication->doExecute()    JROOT/libraries/src/Application/CMSApplication.php:196
11    Joomla\CMS\Application\CMSApplication->execute()    JROOT/index.php:49
Title: Re: Editing addresses doesn't work ?!
Post by: Milbo on November 28, 2019, 17:42:38 PM
Ahh dam. My error. You can solve it by having a menu item for your account maintenance. But it should also work without.

Or use the attached file. Remove the .txt and upload it to yourRoot/components/com_virtuemart/views/user
Title: Re: Editing addresses doesn't work ?!
Post by: Linnemann on November 29, 2019, 08:55:59 AM
Dear Milbo,

thank you for quick reply.
After making a menu item and changing the file Root/components/com_virtuemart/views/user/view.html.php the problem with editing adress is solved.
But now I have a problem with the Joomla Register funktion.
If I click on the "Register" link in login form I get an error ...

Debug Mode now says:

0 Call to a member function get() on null
/*ROOT*/components/com_virtuemart/views/user/view.html.php:362

Call stack
#    Function    Location
1    ()    JROOT/components/com_virtuemart/views/user/view.html.php:362
2    VirtuemartViewUser->lVendor()    JROOT/components/com_virtuemart/views/user/view.html.php:146
3    VirtuemartViewUser->display()    JROOT/components/com_virtuemart/controllers/user.php:59
4    VirtueMartControllerUser->display()    JROOT/libraries/src/MVC/Controller/BaseController.php:710
5    Joomla\CMS\MVC\Controller\BaseController->execute()    JROOT/components/com_virtuemart/virtuemart.php:120
6    require_once()    JROOT/libraries/src/Component/ComponentHelper.php:402
7    Joomla\CMS\Component\ComponentHelper::executeComponent()    JROOT/libraries/src/Component/ComponentHelper.php:377
8    Joomla\CMS\Component\ComponentHelper::renderComponent()    JROOT/libraries/src/Application/SiteApplication.php:194
9    Joomla\CMS\Application\SiteApplication->dispatch()    JROOT/libraries/src/Application/SiteApplication.php:233
10    Joomla\CMS\Application\SiteApplication->doExecute()    JROOT/libraries/src/Application/CMSApplication.php:196
11    Joomla\CMS\Application\CMSApplication->execute()    JROOT/index.php:49

Can you help me, too?

Kind regards


--
Joomla 3.9.13 | VirtueMart 3.6.10 10211 | No overrides
Title: Re: Editing addresses doesn't work ?!
Post by: Milbo on December 03, 2019, 14:38:27 PM
alright, the error is two times there. So last time I fixed only one place. Comes due an optimisation, but I should find a pattern which more failproof.
Title: Re: Editing addresses doesn't work ?!
Post by: Linnemann on December 03, 2019, 15:10:55 PM
Now it works fine in my installation.

Thank you. I'm glad you're taking on the ploblem so quickly.
Title: Re: Editing addresses doesn't work ?!
Post by: melsonmarketing on December 09, 2019, 14:08:32 PM
It's working here too

Thank you!
Title: Re: Editing addresses doesn't work ?!
Post by: stAn99 on December 17, 2019, 16:14:32 PM
hello, just to index this properly, i am adding full details of this error:

1 Call to a member function get() on null in file: /components/com_virtuemart/views/user/view.html.php line: 282

on VirtueMart 3.6.10 10211

best regards, stan
Title: Re: Editing addresses doesn't work ?!
Post by: EIF on February 20, 2020, 12:45:54 PM
Is it possible the create an alias for url ../index.php?option=com_virtuemart&view=user , to use a more friendly url when people want to register themselves / create an account?
Title: Re: Editing addresses doesn't work ?!
Post by: Linnemann on February 20, 2020, 12:57:07 PM
Quote from: EIF on February 20, 2020, 12:45:54 PM
Is it possible the create an alias for url ../index.php?option=com_virtuemart&view=user , to use a more friendly url when people want to register themselves / create an account?
Yes it is possible, you just have to creat a menu item. With Munetyp "Virtuemart" -> "VirtueMart Kontenpflege" (in german) [it is the 8th one].

Nils
Title: Re: Editing addresses doesn't work ?!
Post by: EIF on February 21, 2020, 10:46:54 AM
I already have to menu option, but only for registered (logged in) users. That works correct with the alias.
When I use the same menu option, with a differrent alias for Public users, it doesn't work.
But when I am writing this, i've found out what is wrong. I use a template with a direct link ../index.php?option=com_virtuemart&view=user. My menu with the alias for this doesn't work now, of course. When i change the link to the alias, it DOES work.
Title: Re: Editing addresses doesn't work ?!
Post by: GJC Web Design on February 21, 2020, 11:40:44 AM
and if u add the &Itemid=xxx to it?

although this bug will be fixed in the next release ( already fixed in the test VM3.6.11 series )