Website blank after upgrading Virtue in version 3.4.1 or 3.4.2

Started by DadoO, October 09, 2018, 14:34:06 PM

Previous topic - Next topic

vep87895

I included the class JToolbarHelper in Joomla frontend which solved that part of the problem (this is not needed in VM 3.4.0)
Quoteif(!class_exists('JToolbarHelper')) {
   require_once JPATH_ADMINISTRATOR . '/includes/toolbar.php';
}

I also tried disabling VM 404 error handling in VM config but the CPU usage on my VPS is still maxed out on the mysql process. I rolled back to Virtuemart 3.4.0 for now until we can figure this out and the CPU usage on mysql went down to normal (below 2%).

DadoO

QuoteI rolled back to Virtuemart 3.4.0 for now until we can figure this out and the CPU usage on mysql went down to normal (below 2%).

I have do the same
Now working fine in old version 3.4.0 with Joomla 3.8.13

No news about this problem ?
A new version ? A file correction ?


GJC Web Design

How can the dev team fix something that has never occurred to them during testing or live and seems specific to certain installs?

All releases are extensively tested on the installs and setups available to them

I have all my installs (50+) running on J3.8.13, VM3.4.2 and php 7.2 with so far no reported problems

So you could setup a clone of your current install, install 3.4.2 and then find and fully report the error logging etc to give some clue as to whats happening. - an hours work at most..

as I read the post about JToolBarHelper -- it is some extensions using JToolBarHelper  instead of JToolbarHelper ?
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

vep87895

Quote from: GJC Web Design on October 11, 2018, 15:02:01 PM
How can the dev team fix something that has never occurred to them during testing or live and seems specific to certain installs?

All releases are extensively tested on the installs and setups available to them

I have all my installs (50+) running on J3.8.13, VM3.4.2 and php 7.2 with so far no reported problems

So you could setup a clone of your current install, install 3.4.2 and then find and fully report the error logging etc to give some clue as to whats happening. - an hours work at most..

as I read the post about JToolBarHelper -- it is some extensions using JToolBarHelper  instead of JToolbarHelper ?
I don't think the JToolbarHelper class is the key to this problem, it's probably just a side effect of something else. As I said I included it in Joomla frontend and the error message disappeared but there was still blank pages and a massive CPU load on the mysql process. As far as I could see there was many queries opened by virtuemart_product in the database which didn't seem to close.

Anyway, hopefully next week I will have time to set up a clone and do some more testing. I am running a pretty standard setup with a commonly used template which is up to date. I do have customfields for all plugin v. 3.1.3 installed if that could be the culprit, but I'm pretty sure I tried to unpublish it without results.

Edit: I forgot to mention that when I included the JToolBarHelper class it did fix one thing, editing a product from the frontend started working instead of generating a 404 which it did without the JToolBarHelper class included. Again this worked fine in 3.4.0 without including JToolBarHelper. Maybe this can shed some more light on the issue.

GJC Web Design

#19
This may only serve to confuse but out of all my upgrades one this morning threw a fatal that is to do with the new 404 handling by VM introduced in 3.4.2

It is the loop reported somewhere else here

this repeats 256 times

components/com_virtuemart/views/category/view.html.php(683): VirtuemartViewCategory->display()
components/com_virtuemart/views/category/view.html.php(322): VirtuemartViewCategory->handle404()
components/com_virtuemart/views/category/view.html.php(683): VirtuemartViewCategory->display()
components/com_virtuemart/views/category/view.html.php(322): VirtuemartViewCategory->handle404()

VM3.2.4, J3.8.13, php7.2.9  - VM Error handling 404 on - full SEF

But think unlikely to be connected with any reports of high sql usage

Short term fix from Stan (Rupostel) here:

http://forum.virtuemart.net/index.php?topic=141213.0
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

danDaniel

Hello,

I have this problem with migrating 3.4.2 and joomla 3.8.13 with frontend admin of Virtuemart ! with  PHP 7.0

Oops! That page can't be found.

(no problem to edit Joomla Article)


-So I installed the full package "VirtueMart3.4.2_Joomla_3.8.12-Stable-Full_Package.zip" on a local server with PHP/5.5.15

and same result !

- I activate "Error Reporting" to "maximum and the result with blanck page is :

Fatal error: Class 'JToolBarHelper' not found in ......../administrator/components/com_virtuemart/helpers/vmviewadmin.php on line 344

If my experience can make help ?

Thanks



AnSit

Hello everyone!
Thanks for the development and updates!

After upgrading to version 3.4.2, a problem was found.

1) When you click on the edit button for any product through the frontend, a blank page and an error appears: HTTP ERROR 500

PHP 7.2 version, Jooma 3.8.13

When working with version 3.4.0, this error did not occur.

Please help me solve the problem.

GJC Web Design

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

AnSit

Sorry, but I very rarely visit the forum to know all these nuances at once. Thanks now I will know about it!

When I turned on the debug mode in VirtualMart, then when I clicked on the edit button, the following error was displayed:

# 0 Class 'JToolBarHelper' not found

Tell me, please, what next to do?

P.S. The advice of renaming JToolBarHelper  in JToolbarHelper did not help.

GJC Web Design

#24
Class 'JToolBarHelper' not found

JToolBarHelper is WRONG...   you have to find the instance of that and change to 'JToolbarHelper'

if u have done this and the class is still not incl. you need to add this to what ever file is throwing that error


if(!class_exists('JToolbarHelper')) {
   require_once JPATH_ADMINISTRATOR . '/includes/toolbar.php';
}

you need to find the file by Joomla debug on and/or xdebug on your server to get the path or search logging
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

vep87895

Quote from: AnSit on October 16, 2018, 15:05:11 PM
Sorry, but I very rarely visit the forum to know all these nuances at once. Thanks now I will know about it!

When I turned on the debug mode in VirtualMart, then when I clicked on the edit button, the following error was displayed:

# 0 Class 'JToolBarHelper' not found

Tell me, please, what next to do?

P.S. The advice of renaming JToolBarHelper  in JToolbarHelper did not help.

As a quick-fix workaround you could add the code to your template (/templates/your_template/index.php)
if(!class_exists('JToolbarHelper')) {
   require_once JPATH_ADMINISTRATOR . '/includes/toolbar.php';
}


But the more proper way of doing it would be as GJC suggested, putting it in the exact file that needs it.

For example in joomla admin this class is already included in the /administrator/index.php file but not in the joomla front-end index.php. Perhaps this has something to do with security, I'm not sure, and I'm still uncertain what changed between VM 3.4.0 and 3.4.1/3.4.2 to cause this class to be missing.

AnSit

Thank you for participating, vep87895!

But after all, most likely the problem is not in some external files, but in the changed VirtueMart. With version 3.4.0 under the same conditions it works correctly.

GJC Web Design

can u try this on VM3.4.2

file  administrator\components\com_virtuemart\helpers\vmdefines.php ~ line 162

uncomment
//JLoader::register('JToolBarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');

remove the slashes


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

teucg

I believe JJK is correct, the issue is a VM issue related to:

https://github.com/joomla/joomla-cms/issues/14330

The class' correct cased name is JToolbarHelper, not JToolBarHelper, and has been such since 3.0.0 (same applies to all JToolbar* classes). The casing is important with our autoloader because it will split the class name based on CamelCasing if it needs to try and load a file that hasn't yet been loaded.

JToolBarHelper will try to find a file at libraries/(cms|joomla|legacy)/tool/bar/helper.php whereas JToolbarHelper will use libraries/(cms|joomla|legacy)/toolbar/helper.php.

a non Joomla issue but an issue with using incorrect CamelCasing for Joomla 3+ when calling the JToolbarHelper

teucg

Quote from: GJC Web Design on October 16, 2018, 17:41:18 PM
can u try this on VM3.4.2

file  administrator\components\com_virtuemart\helpers\vmdefines.php ~ line 162

uncomment
//JLoader::register('JToolBarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');

remove the slashes

That is the answer and solved the error. I only experienced the error when editing a product from the frontend.