Answers.Body: <p>It looks like you have CiviMember disabled on your site, so the <a href="https://lab.civicrm.org/extensions/membershiprenewallink" rel="nofollow noreferrer">Membership Renewal Link</a> extension crashes. Enable CiviMember. If you can't log in, you can do it from the command line:</p>
  <pre><code>cv en civi_member
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-08T13:35:42.963Z
Answers.Text: Thank you, Coleman. I even tried to disable the extension Membership Renewal Link, but every time I issue a command (even the one that you suggested) I receive the error:
  In membershiprenewallink.setting.php line 11: Class 'Civi\Api4\MembershipType' not found
Answers.UserDisplayName: Alessandro Bronzo
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-08T16:26:48.830Z
Answers.Text: You could try: cv dis membershiprenewallink to disable Membership Renewal Link, then enable civi_member, then after that re-enable Membership Renewal Link.
Answers.UserDisplayName: Lars SG
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-08T12:24:34.430Z
Answers.LastActivityDate: 2023-08-08T12:24:34.430Z
Answers.UserDisplayName: Coleman
Body: <p>everybody
  Sorry if it's a newbie question, I hope you could help anyway.</p>
  <p>My site (drupal 9 + civi + php 8.1) is actually working for anonymous users; as soon as a user login the WSoD appears (The website encountered an unexpected error).
  Every time I visit the page with an authenticated user the WSoP appears and this is what comes up in the PHP error log (followed by the details):</p>
  <pre><code>Error: Class &quot;Civi\Api4\MembershipType&quot; not found in [path-to-files]/civicrm/ext/membershiprenewallink/settings/membershiprenewallink.setting.php on line 11
  </code></pre>
  <p>Even if I try to disable the extension via drush or cv I get this error:</p>
  <pre><code>In membershiprenewallink.setting.php line 11: Class 'Civi\Api4\MembershipType' not found
  </code></pre>
  <p>I think that I have some global configuration problems, but the site was up and running nd in production. From where I could start?
  Many thanks for your help</p>
  
Tags: <drupal><civimember><php>
Title: membershiprenewallink can't find membershiptype
ThreadText: # membershiprenewallink can't find membershiptype
  
  (Asked by: username_0 on 2023-08-08)
  
  everybody
  Sorry if it's a newbie question, I hope you could help anyway.
  My site (drupal 9 + civi + php 8.1) is actually working for anonymous users; as soon as a user login the WSoD appears (The website encountered an unexpected error).
  Every time I visit the page with an authenticated user the WSoP appears and this is what comes up in the PHP error log (followed by the details):
  Error: Class "Civi\Api4\MembershipType" not found in [path-to-files]/civicrm/ext/membershiprenewallink/settings/membershiprenewallink.setting.php on line 11
  
  Even if I try to disable the extension via drush or cv I get this error:
  In membershiprenewallink.setting.php line 11: Class 'Civi\Api4\MembershipType' not found
  
  I think that I have some global configuration problems, but the site was up and running nd in production. From where I could start?
  Many thanks for your help
  
  **Tags:** drupal, civimember, php
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-08-08. Score: 2
  
  It looks like you have CiviMember disabled on your site, so the Membership Renewal Link extension crashes. Enable CiviMember. If you can't log in, you can do it from the command line:
  cv en civi_member
  
  > **Comments:**
  > **username_0**: Thank you, username_1. I even tried to disable the extension Membership Renewal Link, but every time I issue a command (even the one that you suggested) I receive the error: In membershiprenewallink.setting.php line 11: Class 'Civi\Api4\MembershipType' not found  
  > **username_2**: You could try: cv dis membershiprenewallink to disable Membership Renewal Link, then enable civi_member, then after that re-enable Membership Renewal Link.  
  
  ---
  
  