VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: v1pr on May 02, 2017, 18:47:07 PM

Title: J2.5 + VM3.2.1 => shipment module throws PHP error
Post by: v1pr on May 02, 2017, 18:47:07 PM
We've upgraded our (I know it's old) J2.5 to the latest VM, but bumped into an issue.

Upon opening the Shipment module and selecting an existing shipment modul we get a PHP error:

<code>
PHP Fatal error:  Call to undefined method JFormFieldVMFiles::getAttribute() in /<joomla_path>/administrator/components/com_virtuemart/fields/vmfiles.php on line 31
</code>

Checking the latest J3.x code I've found out, that the "getAttribute()" function was only added to the base joomla class at version J3.2. I've fixed it by modifing the files and copying over the function from the J3.x source. My suggestion would be to either drop the support for J2.5 or add the function to fields/vmfiles.php with Joomla version dependency and/or function existency check.

Cheers,

      Tom
Title: Re: J2.5 + VM3.2.1 => shipment module throws PHP error
Post by: GJC Web Design on May 02, 2017, 20:49:40 PM
Release of 3.0.18 - Connecting the loose ends
Written by Max Milbers on 16 September 2016.
This new VirtueMart 3 Version is completing the vm3.0 series. There won't be any new vm3.0.x updates other than if we have a security issue. Some of our developers are still developing on Joomla 2.5 to ensure the backward compatibility. But from now on, any new version will be developed on the most recent Joomla or WordPress releases. We won't break the compatibility by purpose, but we just cannot test any longer for older versions.

from the VM news of 3.0.18
Title: Re: J2.5 + VM3.2.1 => shipment module throws PHP error
Post by: v1pr on May 02, 2017, 23:43:35 PM
Quote from: GJC Web Design on May 02, 2017, 20:49:40 PM
Release of 3.0.18 - Connecting the loose ends
Written by Max Milbers on 16 September 2016.
This new VirtueMart 3 Version is completing the vm3.0 series. There won't be any new vm3.0.x updates other than if we have a security issue. Some of our developers are still developing on Joomla 2.5 to ensure the backward compatibility. But from now on, any new version will be developed on the most recent Joomla or WordPress releases. We won't break the compatibility by purpose, but we just cannot test any longer for older versions.

from the VM news of 3.0.18
I completely understand, just wanted to leave some trace/record for the others and to suggest to change the "Compatible with Joomla 2.5 and Joomla 3" headline in the virtuemart.net frontpage - this can be confusing, since the shipping module is a basic one and it's not working out-of-the-box (I was not expecting it to do so on J2.5)