Author Topic: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2  (Read 1551 times)

vep87895

  • Beginner
  • *
  • Posts: 5
  • A beginner
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #15 on: October 10, 2018, 14:16:50 pm »
I included the class JToolbarHelper in Joomla frontend which solved that part of the problem (this is not needed in VM 3.4.0)
Quote
if(!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

  • Beginner
  • *
  • Posts: 22
  • A beginner
    • Best Xperience Pinball Parts Website
  • VirtueMart Version: 3.4.2
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #16 on: October 11, 2018, 14:40:52 pm »
Quote
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%).

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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8561
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #17 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 ?
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

vep87895

  • Beginner
  • *
  • Posts: 5
  • A beginner
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #18 on: October 12, 2018, 10:23:53 am »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8561
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #19 on: October 12, 2018, 10:38:58 am »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

danDaniel

  • Beginner
  • *
  • Posts: 10
  • Skype Name: dan25dan
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #20 on: October 12, 2018, 15:17:44 pm »
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

  • Jr. Member
  • **
  • Posts: 73
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #21 on: October 16, 2018, 10:25:02 am »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8561
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #22 on: October 16, 2018, 10:55:50 am »
Must we repeat ourselves every time?

Without the error NO ONE can help you!

http://forum.virtuemart.net/index.php?topic=121692.0

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

AnSit

  • Jr. Member
  • **
  • Posts: 73
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #23 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.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8561
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #24 on: October 16, 2018, 15:32:20 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

vep87895

  • Beginner
  • *
  • Posts: 5
  • A beginner
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #25 on: October 16, 2018, 16:17:39 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)
Code: [Select]
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

  • Jr. Member
  • **
  • Posts: 73
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #26 on: October 16, 2018, 17:11:08 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8561
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #27 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


GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

teucg

  • Beginner
  • *
  • Posts: 6
    • TEUCG
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #28 on: October 16, 2018, 19:46:33 pm »
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

  • Beginner
  • *
  • Posts: 6
    • TEUCG
Re: Website blank after upgrading Virtue in version 3.4.1 or 3.4.2
« Reply #29 on: October 16, 2018, 19:59:32 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.