Instead the select lists are empty

Comments

darrick’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this. I tried:

- Added "Group 1" term to MERCI Equipment Grouping taxonomy.
- Set resource item to "Group 1" at admin/content/node-type/resource
- At node/add/merci-reservation select list shows:

<select id="edit-merci-reservation-items-choice-1-merci-item-nid" class="form-select" name="merci_reservation_items[choice_1][merci_item_nid]">
<option selected="selected" value="">&lt;Select&gt;</option>
<optgroup label="Buckets">
<option value="bucket">bucket</option>
</optgroup>
<optgroup label="Group 1">
<option value="339">Resource 1</option>
</optgroup>
</select>
raytiley’s picture

Title: Using MERCI Grouping Removes Items from Select Lists in Reservation form » Editing MERCI Content Type Settings Removes That Content Type from MERCI lists.
Status: Postponed (maintainer needs more info) » Active

I renamed the this issue to better reflect whats going on. Here are the steps to recreate this issue:

  1. Create a MERCI Content Type (in my case a bucket)
  2. Add Some Nodes of this Content Type
  3. Edit the Content Type (when viewing the MERCI settings none of the values previously set will be visible)
  4. Now when you click "Manage Equipment" that Content Type will no longer be listed.

-ray

kreynen’s picture

This is actually the same issues we had in #1147076: Editing content type in D7 makes the type un-reservable and breaks views. Instead of ending up with a blank type in the db, we've set the default to 'disabled'. That fix prevented breaking everything when a content type was edited, but didn't resolve the underlying problem.

raytiley’s picture

Status: Active » Needs review

reworked the merci_content_type_info fucntion in this commit: http://drupalcode.org/project/merci.git/commit/dd0274e

-ray

darrick’s picture

That was my guess. I would revert this: http://drupalcode.org/project/merci.git/commitdiff/b180e82?hp=51a0f85b90...

Also you should leave in $type_name = !empty($type_name) ? str_replace('-', '_', $type_name) : NULL;

The function merci_type_setting is a ripoff of this one:

http://api.lullabot.com/content_types

darrick’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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