Answers.Body: <p>There are a few files across the system that cannot be over-ridden via the custom php directory. This is primarily because these files are included during the bootstrap process.</p>
  
  <p>I dont think anyone has documented which files or tried to minimize the number of files that can be overridden. I suspect all component Info.php files fall in  this bucket and hence you get the above error</p>
  
  <p>Curious as to what custom code you are adding to the Info.php file</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-29T02:53:38.567Z
Answers.Text: The New Mailing form's recipients field is s-l-o-w and I'm trying to minimise the # of previous mailings that get fetched from 500 to 50. See line 108.
Answers.UserDisplayName: Ken West
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-29T04:43:23.270Z
Answers.Text: I think your short term option is to hack that file directly
Answers.UserDisplayName: Donald Lobo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-30T07:33:26.540Z
Answers.Text: Yep. I expect that form will get some extra love from Tim and Coleman in the near future. So I'm happy for a short-term hack.
Answers.UserDisplayName: Ken West
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-29T01:09:17.907Z
Answers.LastActivityDate: 2015-05-29T01:09:17.907Z
Answers.UserDisplayName: Donald Lobo
Body: <p>I'm using the custom PHP feature of CiviCRM to apply patches etc I can't do with a hook.</p>
  
  <p>I have a custom version of CRM/Mailing/Info.php which causes problems when installing an extension. I get the (redacted) error ...</p>
  
  <pre><code>PHP Fatal error:  Cannot redeclare class CRM_Mailing_Info in /custom-code-area/CRM/Mailing/Info.php on line 0, referer: https://example.org/civicrm/admin/extensions?action=add&amp;id=nz.co.fuzion.accountsync&amp;key=nz.co.fuzion.accountsync
  </code></pre>
  
  <p>When I remove that PHP file, all is well.</p>
  
  <p><strong>Potential culprit</strong></p>
  
  <p>I see that civicrm_rules_civicrm_postProcess() in drupal/modules/civicrm_rules/civicrm_rules.module on line 132 has ...</p>
  
  <pre><code>  require_once 'CRM/Mailing/Info.php';
  </code></pre>
  
  <p>Could that be the cause? Assuming this is called before the custom code is included.</p>
  
Tags: <extension><drupal-rules>
Title: Custom CRM/Mailing/Info.php causes WSOD when installing extensions
ThreadText: # Custom CRM/Mailing/Info.php causes WSOD when installing extensions
  
  (Asked by: username_0 on 2015-05-29)
  
  I'm using the custom PHP feature of CiviCRM to apply patches etc I can't do with a hook.
  I have a custom version of CRM/Mailing/Info.php which causes problems when installing an extension. I get the (redacted) error ...
  PHP Fatal error:  Cannot redeclare class CRM_Mailing_Info in /custom-code-area/CRM/Mailing/Info.php on line 0, referer: https://example.org/civicrm/admin/extensions?action=add&id=nz.co.fuzion.accountsync&key=nz.co.fuzion.accountsync
  
  When I remove that PHP file, all is well.
  Potential culprit
  I see that civicrm_rules_civicrm_postProcess() in drupal/modules/civicrm_rules/civicrm_rules.module on line 132 has ...
    require_once 'CRM/Mailing/Info.php';
  
  Could that be the cause? Assuming this is called before the custom code is included.
  
  **Tags:** extension, drupal-rules
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-05-29. Score: 1
  
  There are a few files across the system that cannot be over-ridden via the custom php directory. This is primarily because these files are included during the bootstrap process.
  
  I dont think anyone has documented which files or tried to minimize the number of files that can be overridden. I suspect all component Info.php files fall in this bucket and hence you get the above error
  
  Curious as to what custom code you are adding to the Info.php file
  
  > **Comments:**
  > **username_0**: The New Mailing form's recipients field is s-l-o-w and I'm trying to minimise the # of previous mailings that get fetched from 500 to 50. See line 108.  
  > **username_1**: I think your short term option is to hack that file directly  
  > **username_0**: Yep. I expect that form will get some extra love from Tim and Coleman in the near future. So I'm happy for a short-term hack.  
  
  ---
  
  