VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: webzight on May 13, 2012, 09:20:40 AM

Title: VM Product Module Conflict with Chronoforms
Post by: webzight on May 13, 2012, 09:20:40 AM
This is a real doozey ???

I am using Chronoforms 4, the latest version, on the same site I am running the latest version of VM ;)

When I went to access either of the forms on the front end I had built recently, I got the following error message:

Warning: require(JPATH_VM_LIBRARIES/joomla/application/component/model.php): failed to open stream: No such file or directory in /homepages/30/d108588548/htdocs/cambria/administrator/components/com_virtuemart/helpers/vmmodel.php on line 24

Fatal error: require(): Failed opening required 'JPATH_VM_LIBRARIES/joomla/application/component/model.php' (include_path='.:/usr/lib/php6') in /homepages/30/d108588548/htdocs/cambria/administrator/components/com_virtuemart/helpers/vmmodel.php on line 24

Through trial and error of turning off all VirtueMart Extensions and then activating one by one till the above error appeared again I determined it was the VM Product Module with the conflict :o

It appears that when I try to access the pages with a Chronoforms form embedded, I get the above error if said extension is activated and no error if disabled ::)

Anyone got any clues on this one ???
Title: Re: VM Product Module Conflict with Chronoforms
Post by: Rune Rasmussen on May 25, 2012, 12:25:22 PM
This also applies to other components, like t.ex. Kunena.
Or more correctly applies to the display of VirtueMart modules in combination with other components witch doesn't load the needed JModel file.

See http://www.chronoengine.com/forums/viewtopic.php?f=26&t=81367#p289036

This seems to be a VirtueMart bug, and the topic should be moved into bug forum.
Title: Re: VM Product Module Conflict with Chronoforms
Post by: jjk on May 25, 2012, 13:24:27 PM
QuoteThis seems to be a VirtueMart bug, and the topic should be moved into bug forum.

Did you try the fix offered at ChronoEngine already? (suggests that it is a Joomla problem)
http://www.chronoengine.com/forums/viewtopic.php?p=263919#p263919 (http://www.chronoengine.com/forums/viewtopic.php?p=263919#p263919)
Title: Re: VM Product Module Conflict with Chronoforms
Post by: Rune Rasmussen on May 25, 2012, 16:35:26 PM
How did you read it to become a Joomla-problem I wonder.
The fix has to go into the VirtueMart file, witch outputs this error.

The VM module relies on a VM library:
if(!class_exists('JModel')) require JPATH_VM_LIBRARIES.DS.'joomla'.DS.'application'.DS.'component'.DS.'model.php';
Title: Re: VM Product Module Conflict with Chronoforms
Post by: jjk on May 25, 2012, 18:09:49 PM
Quote from: rued on May 25, 2012, 16:35:26 PM
How did you read it to become a Joomla-problem I wonder.

By clicking on your first link and thereafter clicking on
Please see this post (http://www.chronoengine.com/forums/viewtopic.php?p=263919#p263919 (http://www.chronoengine.com/forums/viewtopic.php?p=263919#p263919)) for a possible fix.
Title: Re: VM Product Module Conflict with Chronoforms
Post by: Milbo on May 25, 2012, 19:35:18 PM
Please replace in file mod_virtuemart_product.php line 20 with
if (!class_exists( 'VmConfig' )) require(JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'config.php');
Title: Re: VM Product Module Conflict with Chronoforms
Post by: Rune Rasmussen on May 25, 2012, 21:00:45 PM
Thanks Max,

But my line 20 is empty, but line 19 contains (same in svn it seems):
if (!class_exists( 'VmModel' )) require(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'vmmodel.php');

If I replace that it's no luck. Same if inserted at the empty line 20, keeping line 19.
Title: Re: VM Product Module Conflict with Chronoforms
Post by: Rune Rasmussen on May 25, 2012, 21:26:31 PM
Fixed it, it seems, by using this line instead:
if (!class_exists( 'VmConfig' )) require(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php');
Title: Re: VM Product Module Conflict with Chronoforms
Post by: matthewod01 on July 14, 2012, 19:54:46 PM
Rued,

Your post worked for me

"if (!class_exists( 'VmConfig' )) require(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php');"

Thanks
Matt
Title: Re: VM Product Module Conflict with Chronoforms
Post by: Axiom on July 27, 2012, 18:02:59 PM
This hasn't been fixed as of vm 2.0.8e

Matt's post above mine is the fix - My issue occured with BreezingForms and the fix corrects the issue.

Please update the core so we don't have to make the change each update or so.

thanks,