(Apologies if this isn't the right place to post this. The forum seemed like a more likely place, but it said to create an issue.)

When viewing the "find content" dialogue as a non-administrator user, I see the following errors:

  • Notice: Undefined index: #options in weight_form_node_admin_content_alter() (line 100 of/home/content/93/9094193/html/sites/all/modules/weight/weight.module).
  • Warning: Invalid argument supplied for foreach() in weight_form_node_admin_content_alter() (line 100 of/home/content/93/9094193/html/sites/all/modules/weight/weight.module).
  • Notice: Undefined index: #options in weight_node_admin() (line 138 of/home/content/93/9094193/html/sites/all/modules/weight/weight.module).
  • Warning: Invalid argument supplied for foreach() in weight_node_admin() (line 138 of/home/content/93/9094193/html/sites/all/modules/weight/weight.module).

The weights do not display for non-administrators in the "find content" dialogue. The View still sorts the content according to the weight, and I can adjust the weight in the individual edit page for a node.

When logged in as an administrator, everything works as you would expect.

The permissions I currently have set for the Weight module are as follows:

Assign node weights: administrator, contributor (not anonymous or authenticated)
Administer weight: administrator, contributor (not anonymous or authenticated -- everything is exactly the same if contributor does not have this permission)
Contributor has all permissions to edit/create/delete the relevant content type

I've tried resaving the content type (as suggested here: http://drupal.org/node/961380#comment-5675218), but this didn't change anything. I've tried uninstalling the module (following this: http://drupal.org/node/1468186#comment-5694530) but was unable to do so; the DB tables referenced in step 2 didn't exist, and the checkbox was greyed out and checked in step 5 so I couldn't disable it.

All of this was done in Chrome 18. I'm running Drupal 7.12 on a GoDaddy Linux server, which is running PHP 5.2 and MySQL 5.0. "Available Updates" shows everything as up-to-date.

Comments

davisben’s picture

Status: Active » Fixed

I just committed a fix for this to 7.x-2.x. It will be available in the next dev release.

amerkelijn’s picture

Version: 7.x-2.0-rc1 » 7.x-2.x-dev
Status: Fixed » Needs work

I have the same problem and it is not fixed in the 7.x-2.x-dev release from 2012-Apr-12.

I have run update.php.

davisben’s picture

Status: Needs work » Fixed

Fixed for real this time. It turns out #options is only available if the user has the administer nodes permission, and instead it is #rows if they don't.

ryschwith’s picture

Excellent. That's fixed it. Thanks for the speedy response.

ryschwith’s picture

Status: Fixed » Closed (fixed)