I just added the Location module to a site, and went with the Node Locations method. Upon editing a page, I expected to see fields for entering location info, but they were missing. I would expect them to appear, because on the content type admin page, the default settings under "Locative Information" are

Minimum number of locations: 0
Maximum number of locations: 1
Number of locations that can be added at once: 1

Which implies that location collection should be enabled (but not required) on all existing content types as soon as the module is installed. But these defaults do not take effect -- the location fieldset does not show up on the node edit form -- unless the content type is saved (without making any changes). This behavior is pretty confusing.

I propose that these three "Number of locations" settings be all set to zero by default, since this is the behavior we currently get out of the box, and because if I install Node Locations on a site with a bunch of existing content types, I don't necessarily want to collect location info for all of them. I only want the location fields to appear on node types where I've specifically enabled it. If I make some other changes to a content type, but don't open up the locative info settings fieldset, suddenly the content type will have unintentionally acquired location fields. The same idea applies when adding a new content type-- location fields should not be set to appear by default.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SeanA’s picture

Version: 6.x-3.1 » 6.x-3.x-dev
Status: Active » Needs review
FileSize
2.09 KB

Simple fix to make the default "Number of locations" settings all zero.

SeanA’s picture

Please ignore previous patch, it includes another change from an old issue. Try this one instead.

podarok’s picture

Status: Needs review » Active

bot recall

podarok’s picture

Status: Active » Needs review

bot

podarok’s picture

Status: Needs review » Fixed

#2 commited pushed to 6.x-3.x-dev
Thanks!

Status: Fixed » Closed (fixed)

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