Closed (fixed)
Project:
Ubercart
Version:
7.x-3.8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Oct 2015 at 07:29 UTC
Updated:
21 Nov 2015 at 23:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ericwongcm commentedComment #3
tr commentedWhich countries do you have enabled?
Comment #4
ericwongcm commentedWhat country is enabled does not matter..
The error remains if I remove all the countries..
Comment #5
tr commentedTry this ...
Comment #6
ericwongcm commentedWith the patch applied the error is gone using php 5.3, 5.4 and 5.5.
Comment #8
tr commentedThanks for testing it. Committed.
Comment #9
ericwongcm commentedPlease revert the patch and maybe revise it.
I just noticed the patch actually broke this module's functionality
https://www.drupal.org/project/uc_multiprice
What happens is the Countries and addresses format page will appear different.
http:/yourdmain.com/admin/store/settings/countries/formats
With uc_multiprice enabled without the patch, on the Countries and addresses format page, every country has its own "CURRENCY FORMAT".
After patch is applied, on the Countries and addresses format page, the "CURRENCY FORMAT" for individual country is gone and replaced by a global "CURRENCY FORMAT".
Comment #10
tr commentedNot going to revert this, because it's the proper fix for the problem. Country format data and other form data (from the vertical tab e.g.) were being mixed at the same level of the render array, so it was impossible to tell which elements were country format and which were other random form data. When other random form data was encountered, a PHP notice was generated because there was no 'address_format' key for that other random data. The fix separated out the country format data into its own sub-array. Because the structure of the Ubercart country format form was changed by the patch, any contributed modules which alter that form will need to be changed too. I can't think of any other module than uc_multiprice which does this, so there is little impact on contrib from this change.
uc_multiprice will need a similar small patch, which I've posted in the uc_multiprice issue queue (but not tested, because I don't use uc_multiprice). See #2610998: Changes to work with latest -dev version of Ubercart. Please test that patch and comment in that issue to help get it into uc_multiprice.