CRM-14254 Cannot create membership for user when choosing price set

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.4.4
    • Fix Version/s: None
    • Component/s: CiviMember
    • Labels:

      Description

      To reproduce, make sure you have a Price Set created.
      To create a price set, go to Memberships > New Price Set.
      After that, add at least one Price Set Field.

      Make sure you have at least one Membership Organization / Type already setup.

      Next, go to Memberships > New Membership.
      For the "Membership Organization and Type" choose "Choose price set" and select your price set.

      Upon trying to save, I get this error "Please select at least one option from price set."

      The issue is similar to CRM-11040, which was closed.

        Attachments

        1. PriceField-withMembershipTypes.PNG
          138 kB
          David Greenberg
        2. Screen Shot 2014-02-20 at 3.21.04 PM.png
          73 kB
          Daniel Pepin
        3. Screen Shot 2014-02-24 at 4.57.06 PM.PNG
          34 kB
          David Greenberg
        4. Screen Shot 2014-02-24 at 8.15.57 PM.png
          459 kB
          Daniel Pepin

          Activity

          [CRM-14254] Cannot create membership for user when choosing price set
          Daniel Pepin added a comment -

          Sorry, the error message you actually receive is "Select at least one membership option."

          Daniel Pepin added a comment -

          This issue appears to be caused by the fact that `$self->_memTypeSelected` is empty on line 903 of Form/Membership.php in the Member component.

          `$self->_memTypeSelected` does not get set if you use a price set. I believe that when using a price set, the membership organization / type shouldn't be hidden?

          Daniel Pepin added a comment -

          Annnd the affected version is actually 4.4.4... Wish I could edit the original description.

          David Greenberg added a comment -

          Daniel - I tried to replicate this locally and on the public 4.4 demo using this price set:

          http://drupal.demo.civicrm.org/civicrm/admin/price?action=preview&sid=9&reset=1&context=field

          As long as you select a membership option, the membership is saved / created as expected.

          If you can replicate this on the public demo we can reopen. Please give exact steps and include URL's and screenshots. Thx.

          Daniel Pepin added a comment -

          David, please try again when there is more than 1 membership organization in the system. (I've added another to the demo site)
          http://drupal.demo.civicrm.org/civicrm/member/add

          I get error message "Select at least one membership option."

          Thanks!

          Daniel Pepin added a comment -

          Screenshot of error

          David Greenberg added a comment -

          The problem is you're using a form to Add a Membership but you're not selecting the price set field that actually refers to a membership. The testQty field is NOT linked to a membership type, only the TestSeniorMembers is. That price set should require the radio button since the user has to select a membership in that form. Fields like testQty can be used to collect additional money for other things.

          Daniel Pepin added a comment -

          David, I guess I'm missing a piece of how things work...

          Can you choose the "student" price set? Does that work? Should it work?

          I'm confused by what you mean by some price set fields can be "linked to a membership type"... I don't see any settings regarding that.

          David Greenberg added a comment -

          Check this price field preview and the screenshot attached to see how you should set up a required price field if you are using a price set for membership signup:

          http://drupal.demo.civicrm.org/civicrm/admin/price/field?action=preview&reset=1&sid=10&fid=17

          Please continue this discussion on IRC or community forums if still not clear.

            People

            • Assignee:
              David Greenberg
              Reporter:
              Daniel Pepin

              Dates

              • Created:
                Updated:
                Resolved: