Fatal error: Call to undefined function JRegistry() VM categories view.html.php

Started by welrachid, April 26, 2017, 10:39:41 AM

Previous topic - Next topic

welrachid

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)
Best regards,
Wel

welrachid

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.)
Best regards,
Wel

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

GJC Web Design

and one assumes not on J3.6.. other would have been found yonks ago
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

welrachid

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
Best regards,
Wel

welrachid

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"
Best regards,
Wel

Ghost

Change $menu->params = JRegistry();
to $menu->params = new JRegistry();
But this is already fixed in VM 3.2.1, suggest to update.

welrachid

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?
Best regards,
Wel

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

welrachid

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
Best regards,
Wel

Studio 42

You need to update your template or modify the overrides. Some Key for prices was changed by the team (i don't know why)

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

Max, i simply know new key exist, perhaps you have simply forgot to init this ?

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/