VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: rage76 on November 24, 2020, 15:17:41 PM

Title: no homepage after VM update
Post by: rage76 on November 24, 2020, 15:17:41 PM
Hi, I updated VM from 3.8.2 to 3.8.6

and my home page is gone. I just see "Using $this when not in object context"

I am on Joomla 3.9.22

Please guide suitably !!
Title: Re: no homepage after VM update
Post by: pinochico on November 24, 2020, 15:20:47 PM
template problem
Title: Re: no homepage after VM update
Post by: rage76 on November 24, 2020, 15:29:13 PM
Thanks. Is this a quickfix problem or a big one?

could this be creating an issue?

$tpath = $this->baseurl.'/templates/'.$this->template;

What needs to be changed?
Title: Re: no homepage after VM update
Post by: AH on November 24, 2020, 16:46:00 PM
It depends where you are using it and what $this-> is

But generally that construct will fail before it is related to an update issue
Title: Re: no homepage after VM update
Post by: GJC Web Design on November 24, 2020, 17:45:57 PM
as always ---  joomla debug on so u create a trace so u know where the problem is.....
Title: Re: no homepage after VM update
Post by: rage76 on November 25, 2020, 07:26:06 AM
Thank you for replying AH & GJC

with error reporting & debug on, only the following line is displayed:

Fatal error: Using $this when not in object context in C:\xampp\htdocs\tech\administrator\components\com_virtuemart\models\category.php on line 161

If I unpublish virtuemart categories module, this error disappears as well and there is a blank page.

Title: Re: no homepage after VM update
Post by: AH on November 25, 2020, 10:13:52 AM
Did you update the AIO

Is the category module core VM or a third party plugin
Title: Re: no homepage after VM update
Post by: GJC Web Design on November 25, 2020, 10:31:49 AM
QuoteFatal error: Using $this when not in object context in C:\xampp\htdocs\tech\administrator\components\com_virtuemart\models\category.php on line 161

hmmm ... no $this is used in that function?
Title: Re: no homepage after VM update
Post by: pinochico on November 25, 2020, 11:00:45 AM
this function (model) is only used.
You must find where is calling - modul VM categories view? - override, 3d party...
Title: Re: no homepage after VM update
Post by: AH on November 25, 2020, 11:47:46 AM
$selectedOrdering = $this->_selectedOrdering;
Title: Re: no homepage after VM update
Post by: rage76 on November 25, 2020, 15:49:39 PM
Thank you for responding guys. After some tinkering, I found my template is using an override to VM categories module. If I unpublish it, apart from the categories menu, everything starts working normally.

I think the module is not 3rd party, but could be an older version. php file from the module is attached. Can someone guide me to rectify this issue or suggest me a suitable 3rd party module that will display the menu properly?

Any help will be highly appreciated. regards.
Title: Re: no homepage after VM update
Post by: pinochico on November 25, 2020, 16:43:14 PM
Or you can use Google search or Freelancers :)
Title: Re: no homepage after VM update
Post by: rage76 on November 30, 2020, 07:19:00 AM
ok, I replaced the VM categories menu and things are looking up.

I have a query, before the update, on clicking on main category, all products of all sub categories were shown. Now only last sub-category products are shown.

What has changed and what do I need to do to show all products?

Best regards
Title: Re: no homepage after VM update
Post by: rage76 on December 05, 2020, 07:53:44 AM
Please help...