Reviewed & tested by the community
Project:
Address Field NL Postcode
Version:
7.x-1.0-beta4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Feb 2015 at 11:41 UTC
Updated:
6 May 2016 at 15:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
frans commentedCan you please try an older version of addressfield?
https://www.drupal.org/node/2151159
When that doesnot fixit, can you please confirm that you have no JavaScript errors?
Comment #2
betarobot commentedOlder addressfield version did not help unfortunately. And no JS errors at all. All seem to be just fine, just not working properly :)
Comment #3
frans commentedI tested it with a clean database, all depending modules the latest versions, one node type, one addressfield. I cannot reproduce it.
Are you using multiple values per field or multiple fields with one address(basicly multiple addresses)?
Does it happen when bartik is used as theme on node edit?
If I cannot reproduce it, you are basicly on your own. I have no clue where to look for bugs without more information.
Comment #4
betarobot commentedFrans, thanks for looking into it!
But yes, it is just one addressfield per this node type (single value). User entity has addressfield too with the same failure.
Just tried to switch a few themes (including Bartic). Result is still the same. House number is missing.
With addressfield_nl_postcode switched off saved address shows fine in plain addressfield.
No errors too (JS or watchdog). Weird. Trying to understand what could go wrong at my side maybe.
Comment #5
frans commentedPlease use a clean drupal install with only this module (and the depending modules ofcourse) on your hosting platform. Then you can test if it is working; it must either be something on the hosting server, or some other module kicking in.
With a clean install we can exclude the hosting platform from the list.
Comment #6
betarobot commentedYou are right and all good at clean install. Though thous number is still not pulled up to respective field, but only a part of street address.
But I see where is the catch now. In my setup post code and house number are mandatory to fill in again. (screenshots attached).
Clearly another module involved, but any idea which one might cause that behaviour? What I have re addressfield is exactly as clean install, except commerce is enabled too.
Comment #7
frans commentedYou are saying here that it does not work as expected? I mean it 'should' show the house number on edit. I don't see it on the screenshots you made.
Can you confirm? At least we have a direction then. PHP version orso?
Comment #8
betarobot commentedExactly so, being more of UX guy I would expect to have house number to be filled on edit event (the same way as post code is). So roughly at UX perspective everything user entered shall be back at the same field where it was first saved. A few test users I run it trough would exactly expect that behaviour. Where the issue name came from :)
That is regardless my setup issues with those fields becoming mandatory as I understand now (additional house number is not mandatory btw in my case).
I understand that we do not have house number field in addressfield db model (only full *_thoroughfare) unlike *_postal_code. Relying on just JS to extract it back would be probably not the best idea. So shall house number be somehow saved in db then? Just thinking aloud.
PHP versions are: local 5.6.4, server 5.3.29. Results are the same.
Comment #9
frans commentedThe values are in the database. there is an extra serialized field with every address called 'data'. You can check if that gets filled.
Can you provide me with login details from site, hosting and mysql? (and SSH?) When I have some time this or next week, I'll dive into it then. Please contact me via vdmi.nl to provide does details (do not post them here I mean :))
Comment #10
betarobot commentedAlright, looks like got to the bottom of the problem. Not exactly my setup issue in terms other modules affecting behaviour.
It's just if you make field mandatory then we have this kind of misbehave: because the house number is not pulled back to the field on node edit, we can not save it unless we enter house number by hand again. That's it.
I guess you don't need access to mine for that :) It is very easy to replicate now.
Comment #11
frans commentedhmmm that is odd.
'll look it into it. tnx for the effort!
Comment #12
arjean commentedI can confirm this incident.
- Clean install of DP 7.37 (default settings)
- Modules Ctool (7.x-1.7), Address (7.x-1.1), Address NL (7.x-1.0-beta4)
- Setting op Address NL
- Adding address field to the user, checking the address NL option.
Testing (No JS errors during this)
- The dynamic lookup works, showing address and housenumber.
- Saving.
- On edit the housenumber field is empty.
Small research shows that during save the posting "data" variable is empty so there is nothing for the module to work with. The database "data" field is empty, therefore the form cannot show any housenumber on edit.
Comment #13
frans commentedI do not have time to look into it in the comming weeks. Patches Welcome!
Some directions.
Does it do this on other entities (e.g. nodes. you are refering to user?) (should work).
When $data is empty, something must be changed to how addressfield handles extra fields (don't think so).
OR
something goes wrong in the validate, where we set values.
http://cgit.drupalcode.org/addressfield_nl_postcode/tree/plugins/format/...
(Yeah I know, we misuse validation for setting values....)
Comment #14
TuesdayMultimedia commentedThe module required "huisnummer_addition" to be mandatory
But it is not always available.
This patch fixes this issue.
Comment #15
BarisW commentedNew line is missing
Otherwise, great fix. This fixes the problem (had the same issue. Please commit!
Comment #16
edvanleeuwenTested as well. Please commit.