Hi and thanks for your work on this module.

I use it heavily for a project, and it works wonders for the most part.

Though, I need to add some subfields (Country, Postal code, etc.) to some views and I cannot.

The fields appear normally in the Views' popup after clicking 'Add field', but when I select it and click the 'Add and configure' button, nothing happens :

- the field is not added.
- the options window for the field doesn't appear either.

I saw some old issues remotely related to that, but none describe the same problem. Checked the Views queue too, but nothing seems relevant.

I tried the standard things : test on new view, clear caches, etc. but no joy.

Any hint would be much appreciated.

Thanks for reading.

CommentFileSizeAuthor
#4 query-log.jpg120.41 KBCountzero
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Countzero’s picture

For the record, I tried the following actions :

- Disabling / clearing Views cache
- Disabling JQuery in Views
- Adding other fields than Addressfield's subfields : works.
- Trying to add the main Addressfield field : doesn't work.
- Saved and export the view, to see if the field is added anyway : no mention of the field in the view's code.
- Upgrading to latest Views dev : doesn't work.
- Enabling Devel debug : no debug info generated.

Countzero’s picture

Title: Unable to add Addressfield subfiled in Views » Unable to add Addressfield subfield in Views

Fixed typo in title.

bojanz’s picture

Issue tags: -postal code, -views, -subfield

When you click Add, does the dialog close or does it stay open?

All signs say that the UI is actually crashing there, that's why nothing happens. Look into your browser console for any JS errors, and look into your web browser error logs and Drupal's watchdog for any PHP errors.

Countzero’s picture

FileSize
120.41 KB

Yes, the dialog does close.

I agree with your diagnostic, and that's what I thought at first, but unfortunately there is no debug message in Firefox's JS console. I Just double checked.

Also checked Drupal's message log after clearing everything to be sure not to miss anything : no error at all.

Views' 'wait icon' does appear, so I guess something is sent to the server.

The network tab in Firebug shows some info ; I attach it to this comment. I cleared the previous irrelevant messages.

Thanks for your help.

Countzero’s picture

For the record, I tried deactivating JS in Views parameters and the behaviour is the same : I don't think JS or the UI is involved in the problem.

Also checked the server logs for PHP errors and there is nothing there either.

I'm pretty much at my wits end on this one.

I also confirm that other fields (not Addressfield related) are added without problem. No to say it's a module's bug, but it's definitely specific to this case.

Is there any alternative way I could do further tests on this ?

EDIT : Just in case, tried with Chrome and Safari instead of Firefox, to rule out some possible strange browser issue. There's none.

Countzero’s picture

Status: Active » Closed (works as designed)

Solved it !

Nothing to do with Adressfield actually : I just happened to have given a somewhat long name to the field I was trying to add, and hit the 24 characters limit mentioned here.

So I used this gem of a little module to shorten the name drastically and it worked like a charm.

The adressfield now behaves perfectly normally and can be added as a regular field, and at least the country as a filter.

Thanks a lot for your help, and congrats for this module which happens to be flawless as far as I can tell.

Closing this.

Have a nice day.