When I select everything as "Allowed" (attachment 1) the Country field doesn't appear (attachment 2). When I select some of the fields to "Do not collect", and others to "Require", and others to "allow" (attachment 3) most of them don't appear at all (attachment 4).

Comments

lyricnz’s picture

Note: the issue was created about Locations as relating to Users (as found at /admin/user/settings) though the same problem appears to happen when content-types are used. At least there, the Location fields are above the Submit button :)

lyricnz’s picture

If I set "Minimum number of locations" > 0, then it appears to work (mostly) fine. Looking at the code (and a few print_r) leads me to the following piece of code:

  if (!$element['#required']) {
    // Relax non-required settings.
    foreach ($location_settings as $k => $v) {
      // @@@ Todo: Change force default to 4 so we can use smarter logic?
      if ($v == 3) {
        continue;
      }

      // Allow Allow (Use), Force Default settings through.
      // Block 2 (Required).
      $location_settings[$k] = $v & 1;
    }
  }

What is this supposed to do? It appears to be changing "Required" fields into "0" (don't collect).

capellic’s picture

I believe I am having a similar issue. I am using the dev version as of today, 11/21.

I have the following collection settings

Collect during registration: Yes
Location form weight: 0
Collapsible: No
Collapsed: No
Location Name: Do not collect
Street Location: Allow
Additional: Allow
City: Require
State/Province: Allow
Postal code: Require
Country: Require, default = United States

When editing my user account, I see the following:

Street
Additional
State/Province

I should be seeing:

Street
Additional
State/Province
Postal code
Country

When trying to register as a new user, I see the same fields as I do when I am trying to update my profile.

Here are my permission settings:
administer user locations: admin
set own user location: anon, auth
submit latitude/longitude: admin
view all user locations: auth
view own user location: anon, auth

lyricnz’s picture

Did you try setting the minimum number of locations to 1, rather than 0?

capellic’s picture

@lyricnz: I have 1 set for Minimum, Maximum and number of locations that be added at once.

yesct’s picture

Status: Active » Fixed
Issue tags: +location collection settings require allow etc

There were a bunch of problems with the collection settings. And I think they have been fixed with the recent commits. Please try the newest dev versions and post back if you had any trouble. Marking this fixed.

Also tagging.

Status: Fixed » Closed (fixed)
Issue tags: -location collection settings require allow etc

Automatically closed -- issue fixed for 2 weeks with no activity.