2

I have a site that is spinning whenever I try to create a membership in the CiviCRM interface. The server logs don't have any particular errors, but the CiviCRM backtrace shows the following:

$Fatal Error Details = array:3 [
  "message" => "invalid criteria for IN"
  "code" => null
  "exception" => CiviCRM_API3_Exception {#1048
    -extraParams: array:3 [
      "is_error" => 1
      "error_message" => "invalid criteria for IN"
      "error_code" => "undefined"
    ]
    #message: "invalid criteria for IN"
    #code: 0
    #file: "/app/modules/civicrm/api/api.php"
    #line: 135
    trace: {
      /app/modules/civicrm/api/api.php:135 {
        › if (is_array($result) && !empty($result['is_error'])) {
        ›   throw new CiviCRM_API3_Exception($result['error_message'], CRM_Utils_Array::value('error_code', $result, 'undefined'), $result);
        › }
      }
      /app/modules/civicrm/CRM/Member/Form/Membership.php:1836 { …}
      /app/modules/civicrm/CRM/Member/Form/Membership.php:1525 { …}
      /app/modules/civicrm/CRM/Member/Form/Membership.php:1319 { …}
      /app/modules/civicrm/CRM/Member/Form/Membership.php:882 { …}
      /app/modules/civicrm/CRM/Core/Form.php:573 { …}
      /app/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php:152 { …}
      /app/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php:119 { …}
      /app/modules/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
      /app/modules/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
      /app/modules/civicrm/CRM/Core/Controller.php:355 { …}
      /app/modules/civicrm/CRM/Member/Page/Tab.php:324 { …}
      /app/modules/civicrm/CRM/Member/Page/Tab.php:394 { …}
      /app/modules/civicrm/CRM/Core/Invoke.php:319 { …}
      /app/modules/civicrm/CRM/Core/Invoke.php:69 { …}
      /app/modules/civicrm/CRM/Core/Invoke.php:36 { …}
      /app/modules/civicrm/backdrop/civicrm.module:547 { …}
      /app/core/includes/menu.inc:584 { …}
      /app/core/modules/layout/layout.module:621 { …}
      /app/core/includes/menu.inc:531 { …}
      /app/index.php:21 { …}
    }
  }
]

I'm having trouble figuring out the best way to troubleshoot this one. It's CiviCRM 5.47.3 on Backdrop (but I've tested a separate Backdrop site and it works fine, so it's something particular to this site/setup/server... I just need to figure out what that something is).

Update: it is only happening on membership types that are complimentary, admin-only "1 lifetime" memberships. The standard annual membership seems to work as expected.

Any advice would be appreciated!

2 Answers 2

2

Looking at the code lines in the stacktrace, it's possible your price set or membership setup does not end up generating any line items related to memberships. Check the price sets and membership types setup.

3
  • 1
    Ah, interesting -- this helped me discover that it is only happening on membership types that are complimentary, admin-only "1 lifetime" memberships. The standard annual membership seems to work as expected. (Question updated) But those memberships that it is not working for are $0 memberships (no prices or price sets associated with them)...
    – Laryn
    Apr 7, 2022 at 3:09
  • If you can replicate that on dmaster.demo.civicrm.org (or bmaster.demo.civicrm.org) then I'd say it's a bug related to $0 memberships.
    – Demerit
    Apr 7, 2022 at 3:13
  • Thanks. I'll see if I can replicate the issue (no luck yet).
    – Laryn
    Apr 7, 2022 at 14:38
2

In the end (since @Demerit helped isolate that these errors only occurred on some admin-only lifetime memberships) I ended up deleting those membership types completely and recreating (and re-importing the relatively few who had those memberships). That seems to have solved the strangeness. Those types were set up before I started helping on this site but in the UI they looked identical to the ones I set up new... so I'm not sure what the actual issue was.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.