Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
addressfield 7.x-1.0 requires calling addressfield_default_values() with different parameters:
Warning : Missing argument 1 for addressfield_default_values(), called in XXX/commerce_paypal/modules/ec/commerce_paypal_ec.module on line 1386 and defined in addressfield_default_values() (line 375 in XXX/addressfield/addressfield.module). Warning : Missing argument 2 for addressfield_default_values(), called in XXX/commerce_paypal/modules/ec/commerce_paypal_ec.module on line 1386 and defined in addressfield_default_values() (line 375 in XXX/addressfield/addressfield.module). Notice : Undefined variable: field in addressfield_default_values() (line 376 in XXX/addressfield/addressfield.module). Notice : Undefined variable: instance in addressfield_default_values() (line 376 in XXX/addressfield/addressfield.module). Notice : Undefined variable: instance in addressfield_default_values() (line 377 in XXX/addressfield/addressfield.module). Notice : Undefined variable: field in addressfield_default_values() (line 403 in XXX/addressfield/addressfield.module). Notice : Undefined variable: instance in addressfield_default_values() (line 404 in XXX/addressfield/addressfield.module).
I'm marking this as related to PayPal EC but I see an equivalent bug in commerce_paypal_wps.module.
See related issues for similar problems with other modules that call this function.
Comment | File | Size | Author |
---|---|---|---|
#16 | 2458721-paypal-addressfield-defaults-16.patch | 1.97 KB | torgosPizza |
#1 | commerce_paypal-addressfield-default-values-2458721-1.patch | 1.85 KB | mvc |
Comments
Comment #1
mvcPatch that works for me with commerce_paypal 7.x-2.3 and addressfield 7.x-1.0, using PayPal EC. I didn't test with PayPal WPS but it will probably work for that too.
Comment #2
mvcComment #3
ytsurklooks good to me (all issues use same approach) and works :D
thx
Comment #4
howdytom CreditAttribution: howdytom commented#1 worked like a charm on
commerce_paypal_ec.module and commerce_paypal_wps.module
Thank you!
Comment #5
mvcytsurk, howdytom: if this patch seems correct & works for you please change the status to "reviewed & tested by the community" so that the maintainer knows it's ready to be commited. etiquette here on drupal.org requires that i not do this myself :)
Comment #6
howdytom CreditAttribution: howdytom commentedComment #7
JustDrup CreditAttribution: JustDrup commentedIt worked for me too. I used it for PayPal EC.
thank you very much
I dont´t know how do it.
Comment #8
mvcJustDrup: you just change the "status" field right below this comment :) but don't worry, you can see that the current status was already changed.
documentation for the issue submission/edit form is here: https://www.drupal.org/node/314328
a description of issue queue statuses is here: https://www.drupal.org/issue-queue/status
Comment #9
ProjetWeb CreditAttribution: ProjetWeb as a volunteer commentedI have the same probleme, but i am not familiar with git... How can i patch directly in commerce_paypal_ec.module?
Thank you in advance for your help
Comment #10
mvc@ProjetWeb : documentation for working with patches is available at https://www.drupal.org/patch and instructions for applying patches are at https://www.drupal.org/patch/apply
since this patch is small, you could also do it by hand. look at https://www.drupal.org/files/issues/commerce_paypal-addressfield-default... and remove the lines starting with - and add the lines starting with +
Comment #11
jantoine CreditAttribution: jantoine commented@mvc,
Thanks for the patch! Confirmed this fixes the address errors for both billing and shipping with Express Checkout.
Comment #12
onejam CreditAttribution: onejam commentedI confirm the patch fixed the issue as well, thanks.
Comment #13
a.milkovsky+1 for patch #1. works for me. Is it planned to be committed?
Comment #14
Sam MooreConfirmed patch in #1 works for me.
Comment #15
chrisolof CreditAttribution: chrisolof commentedPatch in #1 appears to work and errors are gone.
Comment #16
torgosPizzaPatch no longer applies to -dev, so here is a re-roll.
Comment #17
fizk CreditAttribution: fizk commentedThis needs to be committed. The patch is already being used by Commerce Kickstart.
@rszrama It seems odd that the patch was included in Commerce Kickstart instead of being committed... Is there anything to that?
Comment #18
mglamanfizk, I currently maintain CK2 and there was a patch to include this patch. Most often profiles do this. We'd have included that patch anways until a release was made.
Comment #19
fizk CreditAttribution: fizk commented@mglaman Thanks, but why not just commit this patch into commerce_paypal, since rszrama, maintainer of this project, is part of Commerce Guys and also commits to Commerce Kickstart?
Comment #20
torgosPizzaYeah I don't really see a reason not to apply this to -dev. It's pretty well tested, and a minor change to bring the module into line with current requirements of Addressfield. I don't use CK - Ryan and Josh had actually advised against that after we had already started our RiffTrax D6->7 Upgrade, resulting in a restart and lots of lost time - so I would highly highly recommend committing this to 7.x-2.x-dev.
Comment #22
rszrama CreditAttribution: rszrama at Centarro commentedThanks everyone! Sorry it took a while, but I've just committed this. It's available in -dev and will be in the next release.
Comment #24
Stone Liu CreditAttribution: Stone Liu commentedThanks for the patch and there is an imperfection to it:
If the order's shipping address is different to the billing address this patch simply collects the shipping address at the EC transaction page as "billing information", resulting in one has to change it back to the correct billing info manually.
Wondering someone run into this as well? This patch solve the error message well but caused additional correcting/filling work on the part of shoppers. It will be perfect if this could be fixed as well. :)
Comment #25
Neil C Smith CreditAttribution: Neil C Smith commentedAny chance of a release with this fix in it any time soon? I don't like running dev versions on client sites whenever possible.
Anyone else think drupal.org needs an issue status that is "pending release" ?! ;-)
Comment #26
rollingnet CreditAttribution: rollingnet commentedI totally agree with #25: since this patch solves the issue, it should be submitted ASAP