Answers.Body: <p>The issue has been resolved by renaming the class in &quot;<em>MailingEventResubscribe.php</em>&quot; to <strong>CRM_Mailing_Event_BAO_MailingEventResubscribe</strong>, and invoking this new renamed class in the &quot;<em>Common.php</em>&quot; file.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-08T14:35:18.697Z
Answers.LastActivityDate: 2023-02-08T14:35:18.697Z
Answers.UserDisplayName: Cristina P.
Body: <p>When a Civi Contact wants to <strong>resubscribe to a Mailing List</strong> the contact was previously subscribed to, I get the following error:</p>
  <p><strong>Fatal error</strong>: Uncaught Error: Class '<em>CRM_Mailing_Event_BAO_Resubscribe</em>' not found in ./civicrm/CRM/Mailing/Page/Common.php:80</p>
  <p>The Class &quot;<em><strong>CRM_Mailing_Event_BAO_Resubscribe</strong></em>&quot; is contained in a php file, <em>MailingEventResubscribe.php</em>, which is in the filesystem within the directory ./<strong>civicrm/CRM/Mailing/Event/BAO</strong> with the right permissions <em>644</em>.</p>
  <p>This class is invoked from ./<strong>civicrm/CRM/Mailing/Page</strong>/Common.php file.</p>
  <p>I would appreciate any help to fix that error so that this class can be found.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-16T14:22:25.817Z
Comments.Text: What version do you have?
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-18T10:58:33.203Z
Comments.Text: WordPress 5.9.5 CiviCRM 5.57.0 PHP 7.4 MySQL 5.7.36
Comments.UserDisplayName: Cristina P.
Tags: <groups><mailing><subscribe>
Title: How to fix "Class not found" Error when it is in the filesystem
ThreadText: # How to fix "Class not found" Error when it is in the filesystem
  
  (Asked by: username_0 on 2023-01-16)
  
  When a Civi Contact wants to **resubscribe to a Mailing List** the contact was previously subscribed to, I get the following error:
  
  **Fatal error**: Uncaught Error: Class '*CRM\_Mailing\_Event\_BAO\_Resubscribe*' not found in ./civicrm/CRM/Mailing/Page/Common.php:80
  
  The Class "***CRM\_Mailing\_Event\_BAO\_Resubscribe***" is contained in a php file, *MailingEventResubscribe.php*, which is in the filesystem within the directory ./**civicrm/CRM/Mailing/Event/BAO** with the right permissions *644*.
  
  This class is invoked from ./**civicrm/CRM/Mailing/Page**/Common.php file.
  
  I would appreciate any help to fix that error so that this class can be found.
  
  **Tags:** groups, mailing, subscribe
  
  > **Comments:**
  > **username_1**: What version do you have?  
  > **username_0**: WordPress 5.9.5 CiviCRM 5.57.0 PHP 7.4 MySQL 5.7.36  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-02-08. Score: 0
  
  The issue has been resolved by renaming the class in "*MailingEventResubscribe.php*" to **CRM\_Mailing\_Event\_BAO\_MailingEventResubscribe**, and invoking this new renamed class in the "*Common.php*" file.
  
  
  ---
  
  