VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: welrachid on April 26, 2017, 10:39:41 AM

Title: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: welrachid on April 26, 2017, 10:39:41 AM
Hi
Fatal error: Call to undefined function jregistry() in ..../htdocs/components/com_virtuemart/views/category/view.html.php on line 86

85      if(empty($menu->params)){
86         $menu->params = JRegistry();
87      }

J! 3.7
VM. VirtueMart 3.0.18.6 Blue Corvus 9406
PHP 5.6.24

Any ideas?
For now i've just commented it out.(line86)
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: welrachid on April 26, 2017, 10:42:10 AM
Running the command: grep -rnw . -e "JRegistry()"
Gives me the following result.

./components/com_virtuemart/views/category/view.html.php:86:                    // $menu->params = JRegistry();
./administrator/components/com_akeeba/controllers/cpanel.php:126:               $params    = new JRegistry();
./administrator/components/com_akeeba/helpers/postinstall.php:193:      $params = new JRegistry();
./administrator/components/com_akeeba/script.akeeba.php:744:            $jsnPAManifest = new JRegistry();

(i've commented out that jregistry part.)
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: jenkinhill on April 26, 2017, 13:12:00 PM
Does this happen with Vm3.2/3.2.1?
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: GJC Web Design on April 26, 2017, 13:32:09 PM
and one assumes not on J3.6.. other would have been found yonks ago
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: welrachid on April 26, 2017, 14:33:27 PM
Quote from: jenkinhill on April 26, 2017, 13:12:00 PM
Does this happen with Vm3.2/3.2.1?
Hi. i havent updated the website to that version of VM. so i cant tell at this moment. But will update the thread once i do the update. I just thought maybe other people had same issue. Only change from yesterday to now is the J!3.7 update from 3.6.5
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: welrachid on April 26, 2017, 14:34:58 PM
Quote from: GJC Web Design on April 26, 2017, 13:32:09 PM
and one assumes not on J3.6.. other would have been found yonks ago
Im on J! 3.7. was on 3.6.5 before. Not sure what you mean by "would have been found yonks ago"
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: Ghost on April 26, 2017, 14:50:28 PM
Change $menu->params = JRegistry();
to $menu->params = new JRegistry();
But this is already fixed in VM 3.2.1, suggest to update.
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: welrachid on April 28, 2017, 11:15:26 AM
Hi guys.
im planning on updatering today/tonight

But im not sure why i have this many items to update?
Usually i just update the VM and AIO?
Should i do the same here or do i need to update each element first?
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: Jörgen on April 28, 2017, 11:20:33 AM
Hello

Test on a backup first !

Update Virtuemart first and then Viortuemart AIO. This should take care of most of the update notices.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: jenkinhill on April 28, 2017, 11:41:22 AM
https://docs.virtuemart.net/tutorials/installation-migration-upgrade/226-update-single-plugin-delivered-by-aio.html
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: welrachid on April 28, 2017, 11:55:12 AM
Thanks..great..
It solved the Jregistry problem. (updating to newest VM version 3.2.1
Now my category layout is no longer working..


And my error logs show this:
PHP Notice:  Undefined index: priceWithoutTaxTt in ..../administrator/components/com_virtuemart/helpers/currencydisplay.php on line 323
PHP Notice:  Undefined index: discountAmountTt in ..../administrator/components/com_virtuemart/helpers/currencydisplay.php on line 323
PHP Notice:  Undefined index: taxAmountTt in ..../administrator/components/com_virtuemart/helpers/currencydisplay.php on line 323
PHP Notice:  Undefined index: salesPriceTt in ..../administrator/components/com_virtuemart/helpers/currencydisplay.php on line 323
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: Studio 42 on May 02, 2017, 23:13:31 PM
You need to update your template or modify the overrides. Some Key for prices was changed by the team (i don't know why)
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: Milbo on May 03, 2017, 08:38:06 AM
Quote from: Studio 42 on May 02, 2017, 23:13:31 PM
You need to update your template or modify the overrides. Some Key for prices was changed by the team (i don't know why)

That is just wrong. There are just new prices, example priceWithoutTaxTt, with Tt for TOTAL. So we just added new total prices. When he uses shoppergroup depended price display, then he just needs to store the shoppergroup, I think.
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: Studio 42 on May 03, 2017, 13:23:16 PM
Max, i simply know new key exist, perhaps you have simply forgot to init this ?
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: Milbo on May 03, 2017, 13:41:30 PM
Quote from: Studio 42 on May 02, 2017, 23:13:31 PM
Some Key for prices was changed by the team (i don't know why)

Quote from: Studio 42 on May 03, 2017, 13:23:16 PM
Max, i simply know new key exist, perhaps you have simply forgot to init this ?

This are completly different things. One time you accuse "the team" that they changed a key.

The other time, you notice that we maybe forgot to initialise a new key.
Title: Re: Fatal error: Call to undefined function JRegistry() VM categories view.html.php
Post by: Studio 42 on May 03, 2017, 16:36:32 PM
Max, the logic was changed from one to other release, some value was set another way before.
I needed myself some adjustment for customers but i don't checked why, where and who this changed.
I see that a user have similar problem, so i said him to compare. What is bad here ?
You're just paranoid.
If you have an exact solution, fell free to explain it, because in my case, i have always to modify overides. Sometime because code changes for paiement /shipment render in product, sometime on render in cart  view price or customfield, sometime the addtocart ...
So What i say next time? Nothing changed you simply dream it?