Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad address caching causes wrong original address records (and potentially more) #44

Open
bjendres opened this issue Dec 3, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@bjendres
Copy link
Member

bjendres commented Dec 3, 2021

In ticket #19 the address handler was refactored. The new implementation contains a grave/stupid error (see here), that stores the addresses across different calls and different contacts. In particular the recorded original address might be wrong when submitting multiple changes in the same PHP session.

@bjendres bjendres added the bug label Dec 3, 2021
@bjendres bjendres added this to the 0.5 milestone Dec 3, 2021
@bjendres bjendres self-assigned this Dec 3, 2021
@pbatroff
Copy link
Contributor

pbatroff commented Dec 3, 2021

Verified
Extension Version: 0.5-alpha12

Can be reproduced by Creating 2 Contact (e.g. id 10 & 11). Both have an address, and then put in two request updates for addresses in, one for each contact:

$result_1 = civicrm_api3('Contact', 'request_update', [
    'id' => "10",
    'street_address' => 'Yorckstr. 38',
    'postal_code' => '12345',
    'city' => 'Yorck',
    'country_id' => '1082',
  ]);

  $result_2 = civicrm_api3('Contact', 'request_update', [
    'id' => "11",
    'street_address' => 'testStreet 1',
    'postal_code' => '77777',
    'city' => 'Entenhausen',
    'country_id' => '1082',
  ]);

Resulting Origin Address (Ursprüngliche Addresse) remains the origin address of the first contact, as seen in the screenshots:

hbs_i3val_debug_1

hbs_i3val_debug_2

@bjendres bjendres changed the title Bad address caching causes Bad address caching causes wrong original address records (and potentially more) Dec 3, 2021
@pbatroff
Copy link
Contributor

pbatroff commented Dec 8, 2021

I did the test again with e84a8a9 active, and now origin address is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants