VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: marklandry on June 19, 2013, 18:25:58 PM

Title: Some products throwing "Fatal error: Class 'shopFunctions' not found" error.
Post by: marklandry on June 19, 2013, 18:25:58 PM
Hi, this is intermittent, but I get the following error on some of my products listed at the following link:

http://seejesus.net/store/shop-jesus-resources (http://seejesus.net/store/shop-jesus-resources)

Click on the product "Person of Jesus Leaders Manual" to get the error.  Again, not all products on this page are throwing the error:

QuoteFatal error: Class 'shopFunctions' not found in /xxxx/administrator/components/com_virtuemart/helpers/mediahandler.php on line 230

I saw an older post (mid 2012) on this but nothing helped so I thought I'd start a new thread.

Safe path seems to be set correctly, and no overrides on this page

Also, if I create a new product, all works fine... 

thanx for your help.
Title: Re: Some products throwing "Fatal error: Class 'shopFunctions' not found" error.
Post by: Milbo on June 19, 2013, 18:57:53 PM
hmm seufz,.... without version it is hard to help you.
Title: Re: Some products throwing "Fatal error: Class 'shopFunctions' not found" error.
Post by: marklandry on June 19, 2013, 19:01:39 PM
Sorry,
VM 2.0.20b
Joomla 2.5.9
PhP 5.3.23
Title: Re: Some products throwing "Fatal error: Class 'shopFunctions' not found" error.
Post by: marklandry on June 19, 2013, 20:15:58 PM
I applied the hack


class VmMediaHandler {

var $media_attributes = 0;
var $setRole = false;

function __construct($id=0){

require_once "shopfunctions.php"; // <-------------------------------------- insert this line

$this->virtuemart_media_id = $id;

$this->theme_url = VmConfig::get('vm_themeurl',0);
if(empty($this->theme_url)){
$this->theme_url = JURI::root().'components/com_virtuemart/';
}
}


at /public_html/administrator/components/com_virtuemart/helpers/mediahandler.php
from here: http://forum.virtuemart.net/index.php?topic=109808.0 (http://forum.virtuemart.net/index.php?topic=109808.0)

and it works, but I need a more permanent solution.  Or I need to figure out why this started happening all of a sudden, and why it's on some products and not on others.

Thanx again for your help

Mark
Title: Re: Some products throwing "Fatal error: Class 'shopFunctions' not found" error.
Post by: Milbo on June 19, 2013, 20:45:44 PM
http://forum.virtuemart.net/index.php?topic=115877.msg390380#msg390380