I have a small annoyance which causes an unnecessary step in content-type admin:

'Locative Information' has defaults of 0 minimum and 0 maximum Locations which is good, yet the 'Number of locations that can be added at once' defaults to 3. If I simply submit a node type form without changing those defaults, it won't validate, saying that the 'Number of locations that can be added at once' cannot exceed the maximum number of locations. So I have to set that value to 0, and then the form will process.

Somewhat more serious, this validation routine also seems to interfere with the Content Copy operation in CCK, causing my import of a node type without locative information to fail with that same error.

Comments

black silence’s picture

Status: Active » Needs review
StatusFileSize
new673 bytes

true, annoying and useless

karens’s picture

Status: Needs review » Reviewed & tested by the community

+1, badly needed and very simple. I get a different line number for that bit of code, but the code is the same and the patch seems to work.

blackdog’s picture

+1 for this.

blackdog’s picture

StatusFileSize
new894 bytes

Updated patch against CVS.

bdragon’s picture

Actually, the validation check was broken. I fixed this on Jan. 7, I thought. (Revision 1.222.2.7) -- I don't think this patch is actually needed after that change...

yesct’s picture

Status: Reviewed & tested by the community » Fixed

marking this fixed. If someone finds the patch is still needed for the newest dev version, just post back. Thanks.

Status: Fixed » Closed (fixed)

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

kreynen’s picture

Status: Closed (fixed) » Active

This is either back or is still an issue. default_value for form['multiple']['add'] should be 0, not 3.

  // @@@ Dynamic location adding via ahah?
  $form['multiple']['add'] = array(
    '#type' => 'select',
    '#title' => t('Number of locations that can be added at once'),
    '#options' => drupal_map_assoc(range(0, 100)),
    '#default_value' => isset($old['multiple']['add']) ? $old['multiple']['add'] : 3,
    '#description' => t('The number of empty location forms to show when editing.'),
  );
Steve Halleman’s picture

Priority: Minor » Critical

Having the default number of locations that can be entered set to 3 as the default has become a big issue for me. I am trying to install Views Gallery on a new installation of 6.x. When Views Gallery is enabled it attempts to create a new content type and an error is thrown because of the default number of locations that can be entered is set higher than the minimum number of locations. There are multiple dependencies that are affected by this issue such as ubercart which uses Views Gallery.

Is there a way to set this globally for all locations and not just when a new content type is created?

yesct’s picture

so I understand, this is mostly fixed, it's just when making a new content type that the default number of locations is 3, and you want it to be 0?

since new content types are not created that often. I think this is 1) not the same bug as originally listed (which was fixed) and 2) not critical.

Please reply with more information if I'm not understanding what you are trying to say.

yesct’s picture

Priority: Critical » Normal
Status: Active » Closed (fixed)

Maybe this needs to be a new issue: "Feature request: Add a location wide setting for the default number of locations used when creating new content types for compatibility with Views Gallery (and ubercart)." (When you make that new issue, come back here and make a link to it. use the [#nnnnnn] to make that easier to do.)

stevestaso’s picture

New issue created for "Feature request: Add a location wide setting for the default number of locations used when creating new content"
#772958: Add a location wide setting for the default number of locations used when creating new content types