Author Topic: J2.5 + VM3.2.1 => shipment module throws PHP error  (Read 195 times)

v1pr

  • Beginner
  • *
  • Posts: 3
  • A beginner
J2.5 + VM3.2.1 => shipment module throws PHP error
« 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

GJC Web Design

  • 3rd party VirtueMart Developer
  • Hero Member
  • *
  • Posts: 7485
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: J2.5 + VM3.2.1 => shipment module throws PHP error
« Reply #1 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
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

v1pr

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: J2.5 + VM3.2.1 => shipment module throws PHP error
« Reply #2 on: May 02, 2017, 23:43:35 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)