When importing content types or when installing modules that create content types, a failure occurs if the default is other than 0.
Also needed for compatibility with Views Gallery and Ubercart.

CommentFileSizeAuthor
#7 location defaults.patch725 bytesnickbits

Comments

stevestaso’s picture

yesct’s picture

Version: 6.x-3.0 » 6.x-3.x-dev
Issue tags: +location compatibility with other modules

Please clarify, is it the cck location field config, global setting, number of values (like that set at admin/content/node-type/meetings/fields/field_meetingplace)

Or, is this using the node locations module and under admin/content/node-type/testregnumber :
Locative information
Number of locations
Minimum number of locations: 0
The number of locations that are required to be filled in.
Maximum number of locations: 0
The maximum number of locations that can be associated.
Number of locations that can be added at once: 3
The number of empty location forms to show when editing.

and Number of locations that can be added at once: 3 is the change you want: a difference default value there that is used when creating new content types.

Or do you want settings for all three of these numbers?

nickbits’s picture

I too am having issues when installing the Views Gallery after the locations module has been installed. Specifically the error is:

You can't show more empty location forms than the maximum number of locations allowed for this content type.
An error has occurred adding the content type gallery.
Please check the errors displayed for more details.
A new Views Gallery Gallery has been created for you. Go there to add photos to that gallery, or create new galleries at Add Gallery
The configuration options have been saved.

I know this is what the original poster is saying and believe, I may be wrong, but when creating a new content type, the location information defaults to:

MINIMUM NUMBER OF LOCATIONS: 0
MAXIMUM NUMBER OF LOCATIONS: 0
NUMBER OF LOCATIONS THAT CAN BE ADDED AT ONCE: 3

This last one should also be 0 by default.

Cheers,
Nick

hutch’s picture

You can change the default permanently on line 1583 in location.module.

nickbits’s picture

Hi Hutch, yep got that. But you are going to have to do that every time the module is updated, would be just as easy to change it and have it committed to the CVS.

hutch’s picture

The way to get it into CVS is to provide a patch and tag it for consideration by the maintainer.
I'm not the maintainer of the location module ;-)

nickbits’s picture

StatusFileSize
new725 bytes

Patch attached, but has already been submitted in previous issues!

ankur’s picture

I think this might've been fixed in a separate ticket. If I'm wrong, feel free to re-open this ticket.

ankur’s picture

Status: Active » Closed (cannot reproduce)