News:

Support the VirtueMart project and become a member

Main Menu

Module type "VirtueMart Products" returns error 500 - Resolved

Started by marcosis, November 19, 2016, 15:14:09 PM

Previous topic - Next topic

marcosis

Hi Guys,

I have just updated to the latest Joomla and VirtueMart releases and it appears all of my "VirtueMart Products" modules are now broken and unable to load. When I call the modules using "Modules Anywhere" they just fail to appear, and when I assign them directly to a module position, the page simply comes back as Error 500 and doesn't load at all.

Has anyone else experienced this issue since upgrading or is this only my installation that is doing this?

My template also has custom product modules developed by my template designer which still work, so it's just the VirtueMart built in product modules that appear to be affected.

Versions
Virtuemart: 3.0.18
Joomla: 3.6.4

Thanks in advance.

jenkinhill

What versions did you update from? Did you install the current aio component as well as the main VM component? What is the actual 500 error recorded in the server log?
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

marcosis

Hi Jenkinhill,

Upgraded from version 3.4.0, I indeed installed both the Core and AIO components.

Error record from my server log:

[19-Nov-2016 18:54:06 UTC] PHP Warning:  require(JPATH_VM_ADMIN/helpers/currencydisplay.php): failed to open stream: No such file or directory in /home/<DIR>/public_html/plugins/system/vpframework/helpers/filter.php on line 128

Line 128 refers to the file "helpers/currencydisplay.php" which is indeed missing on my server. Should this have been installed by the update, or should this have already been there?

Thanks for your help :)

GJC Web Design

helpers/currencydisplay.php has been there since VM3.0.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

marcosis

Well that doesn't make any sense why it isn't there now, since I wouldn't obviously delete it myself. Maybe VirtueMart might want to check into why it happened?

For the mean time i'll try extract a copy from a fresh install and go from there.

Thanks for the info GJC and Jenkinhill

jenkinhill

#5
You were looking in administrator/components/com_virtuemart/helprs/ for the currencydisplay.php file? That's where it should be.

Files do not simply vanish, they have to be deleted!  Are you sure you have not been hacked?
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

marcosis

#6
Yeah, originally I was looking in the plugins directory and thought potentially the file was removed somehow during the upgrade process. That being said I can confirm that the file is safe and sound within "/administrator/components/com_virtuemart/helpers" with permissions set to 644 so I am at a loss as to why it cannot find it.

Is the following correct:

File:
/plugins/system/vpframework/helpers/filter.php

Code:
if(!class_exists('CurrencyDisplay'))
{
require(JPATH_VM_ADMIN. '/helpers/currencydisplay.php');
}


Anyone else with any ideas?

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

marcosis

Turns out the auto updater package for the template messed something up and simply downloading the full package and manually installing it over the top fixed the issue.

Thanks for your help and for pointing me in the right direction jenkinhill  :)

Studio 42

I think that vm config file is not load, so the path for JPATH_VM_ADMIN cannot be converted.

Add this line before (or before the class
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
if (!class_exists( 'VmConfig' )) require(JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php');

VmConfig::loadConfig();


perhpas you can remove : VmConfig::loadConfig();