When I click the check mark for this in the site configurations it does not remain checked off upon submission.

After clicking it, I realized that I actually don't want it turned on, but now I don't really know if it is in fact on or off... and I figure you want to fix this anyway.

CommentFileSizeAuthor
#3 promotion_required_0.patch411 byteszostay
#2 promotion_required.patch411 byteszostay

Comments

steingard’s picture

I ended up clicking the "reset to defaults" button in hopes that it does 'uncheck' this feature in the db.

Hopefully you can get it fixed up nicely in the near future for yourself.

Cheers

zostay’s picture

Assigned: Unassigned » zostay
Status: Active » Needs review
StatusFileSize
new411 bytes

This patch should fix it. I don't have time to test it and apply it just now, but I provide the patch until I have that time. If someone can give me feedback on whether it works, that would be great. Hopefully, I'll have time later this week to get back to it.

The form itself is working correctly, it's just not showing the current value when the form is reloaded. So whatever value you set when you click on the Save button will be set, it just want give you any feedback.

zostay’s picture

StatusFileSize
new411 bytes

Fixed a typo in the patch.

steingard’s picture

When I added this line, I got a pile of warnings similar to below (on the promotion settings page):

warning: Cannot use a scalar value as an array in /var/www/drupal/includes/form.inc on line 779.
.........
# warning: uasort() [function.uasort]: The argument should be an array in /var/www/drupal/includes/common.inc on line 2119.
# warning: Cannot use a scalar value as an array in /var/www/drupal/includes/common.inc on line 2150.
# warning: Cannot use a scalar value as an array in /var/www/drupal/includes/common.inc on line 2161.

zostay’s picture

That's odd. I'm not able to reproduce any such behavior on our production server and didn't notice them when I initially tested it on my dev box.

I still don't have a whole lot of time available to dedicate to this, though, so I might be missing something.

decafdennis’s picture

+1 for the patch.

@tsteingard, you probably forgot to add a # when adding the line. You could better use patch to apply the patch automatically.

zostay’s picture

I'll get to it as soon as I can. I've been swamped with work on our web site and I've got vacation coming up. It might be the second week of July before there's another release.

zostay’s picture

Status: Needs review » Reviewed & tested by the community

Should have updated this before. I've been using this patch on my local working copy and it works great. I will apply it to HEAD if I haven't already.

zostay’s picture

Status: Reviewed & tested by the community » Fixed

Applied to HEAD and will be part of the 1.8 release.

Anonymous’s picture

Status: Fixed » Closed (fixed)