Answers.Body: <p>UPDATE: Based on new stack trace it's coming from <code>home/XXXX/www/www/sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_filter_pseudo_constant.inc</code> line 45, which is this:</p>
  <p><a href="https://github.com/civicrm/civicrm-drupal/blob/e22d89a50108a2b4da99e971d0fdcdd656edd56c/modules/views/civicrm/civicrm_handler_filter_pseudo_constant.inc#L45" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-drupal/blob/e22d89a50108a2b4da99e971d0fdcdd656edd56c/modules/views/civicrm/civicrm_handler_filter_pseudo_constant.inc#L45</a></p>
  <p><code>$this-&gt;_pseudo_constant = call_user_func_array($this-&gt;definition['pseudo class'] . &quot;::&quot; . $this-&gt;definition['pseudo method'], $pseudo_args);</code></p>
  <p>So that needs updating in the <a href="https://github.com/civicrm/civicrm-drupal" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-drupal</a> repo. It's not clear how easy that would be to do. I would log a ticket at <a href="https://lab.civicrm.org/dev/drupal/-/issues/new" rel="nofollow noreferrer">https://lab.civicrm.org/dev/drupal/-/issues/new</a>. (Update: Done: <a href="https://lab.civicrm.org/dev/drupal/-/issues/175" rel="nofollow noreferrer">https://lab.civicrm.org/dev/drupal/-/issues/175</a>)</p>
  <hr />
  <p>It's usually from an extension. You can grep your extensions folder for <code>CRM_Contribute_PseudoConstant::pcpStatus</code> and see what comes up. If you're on the latest version of it, then you can file an issue on their extension repo.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-25T00:30:45.680Z
Answers.Text: Thanks for the suggestion Demerit. I searched through the extensions folder (sites/default/files/civicrm/ext), but didn't find that string. Found some others with CRM_Contribute_PseudoConstant::, but not with pcpStatus.
Answers.UserDisplayName: The Amateur
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-25T03:18:47.947Z
Answers.Text: Then you can either grep the whole install (possibly it's in a drupal module?), or edit CRM_Core_Error::deprecatedFunctionWarning() so that it outputs a full backtrace in ConfigAndLog by adding `CRM_Core_Error::backtrace('backTrace', TRUE);` near the top of the function, which will tell you where it's coming from.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T17:32:56.630Z
Answers.Text: Thanks for the suggestion Demerit. I was finally able to figure out how to do this - I think. So this is what the log has for me: 
  
  Mar 01 12:29:58  [warning] Deprecated function CRM_Contribute_PseudoConstant::pcpStatus, use Function pcpStatus will be removed.
  Array
  (
      [civi.tag] => deprecated
  )
  
  What can I do about that?
Answers.UserDisplayName: The Amateur
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T18:24:14.997Z
Answers.Text: That looks like the same message you had in your original post. If you added the backtrace line there should be a lot more in the log. Did you try grep'ing the whole install?
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T19:02:22.850Z
Answers.Text: I did try searching the whole Civi install and did not come up with that full string. Same with the Drupal modules folder. What is new in this log entry is [civi.tag] => deprecated. Maybe I did not add the backtrace line correctly. I inserted it in modules/civicrm/CRM/Core/Error.php at line 309 and can confirm that is is there.
Answers.UserDisplayName: The Amateur
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T19:08:34.407Z
Answers.Text: It would be around line 1035, inside the deprecatedFunctionWarning() function.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T19:24:07.117Z
Answers.Text: OK. Thanks. Made that change and there is more detailed output, but I can't share it here due to character limits...
Answers.UserDisplayName: The Amateur
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T19:28:02.627Z
Answers.Text: You can edit the original post - where it has links for "Share Edit Follow Close Flag"
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T20:18:21.793Z
Answers.Text: I have added the output to the original post. Thanks.
Answers.UserDisplayName: The Amateur
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T20:27:39.487Z
Answers.Text: Great! That solves it. I've updated answer. It also explains why grep didn't work - since the code to make the function call uses generic variables for the function name.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T20:53:18.583Z
Answers.Text: Thanks Demerit. I do not have an account at https://lab.civicrm.org, nor do I feel qualified to log a ticket appropriately. I would be very grateful if you or someone who knows what they are doing would please do that.
Answers.UserDisplayName: The Amateur
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T21:00:47.157Z
Answers.Text: Ok have created https://lab.civicrm.org/dev/drupal/-/issues/175
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-01T21:07:49.183Z
Answers.Text: Many thanks for all your help!
Answers.UserDisplayName: The Amateur
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-24T20:59:18.833Z
Answers.LastActivityDate: 2022-03-01T21:01:12.553Z
Answers.LastEditDate: 2022-03-01T21:01:12.553Z
Answers.UserDisplayName: Demerit
Body: <p>When I run updates (such as with an updated module) in Drupal (7.87), I get the following CiviCRM (5.46.2) related warning:</p>
  <p><em>User deprecated function: Deprecated function CRM_Contribute_PseudoConstant::pcpStatus, use Function pcpStatus will be removed. in CRM_Core_Error::deprecatedFunctionWarning() (line 1044 of /home/example/www/www/sites/all/modules/civicrm/CRM/Core/Error.php).</em></p>
  <p>These warnings are not specific to this version of CiviCRM; they have been going on for a while. I just kept hoping the next version of CiviCRM would correct it.</p>
  <p>I believe the pcp refers to Personal Campaign Pages, but I may be wrong. My site does not have any of those.</p>
  <p>Any thoughts welcomed :-)</p>
  <hr />
  <p>BACKTRACE OUTPUT per comments:</p>
  <p>Mar 01 14:19:08  [debug] $backTrace = #0 /home/XXXX/www/www/sites/all/modules/civicrm/CRM/Core/Error.php(1038): CRM_Core_Error::backtrace(&quot;backTrace&quot;, TRUE)</p>
  <p>#1 /home/XXXX/www/www/sites/all/modules/civicrm/CRM/Contribute/PseudoConstant.php(352): CRM_Core_Error::deprecatedFunctionWarning(&quot;Function pcpStatus will be removed&quot;)</p>
  <p>#2 /home/XXXX/www/www/sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_filter_pseudo_constant.inc(45): CRM_Contribute_PseudoConstant::pcpStatus()</p>
  <p>#3 /home/XXXX/www/www/sites/all/modules/views/includes/handlers.inc(65): civicrm_handler_filter_pseudo_constant-&gt;construct()</p>
  <p>#4 /home/XXXX/www/www/sites/all/modules/views/includes/handlers.inc(87): _views_create_handler((Array:8), &quot;handler&quot;, &quot;filter&quot;)</p>
  <p>#5 /home/XXXX/www/www/sites/all/modules/views/views.module(1399): _views_prepare_handler((Array:8), (Array:18), &quot;status&quot;, &quot;filter&quot;)</p>
  <p>#6 /home/XXXX/www/www/sites/all/modules/date/date_views/includes/date_views_fields.inc(59): views_get_handler(&quot;civicrm_pcp&quot;, &quot;status&quot;, &quot;filter&quot;)</p>
  <p>#7 /home/XXXX/www/www/sites/all/modules/date/date_views/date_views.module(156): _date_views_fields(&quot;civicrm_contact&quot;)</p>
  <p>#8 /home/XXXX/www/www/sites/all/modules/calendar/includes/calendar.views_template.inc(37): date_views_fields(&quot;civicrm_contact&quot;)</p>
  <p>#9 /home/XXXX/www/www/sites/all/modules/views/views.module(1520): calendar_views_templates()</p>
  <p>#10 /home/XXXX/www/www/sites/all/modules/views/views_ui.module(56): views_get_all_templates()</p>
  <p>#11 /home/XXXX/www/www/includes/menu.inc(2831): views_ui_menu()</p>
  <p>#12 /home/XXXX/www/www/includes/menu.inc(2794): menu_router_build()</p>
  <p>#13 /home/XXXX/www/www/includes/menu.inc(468): menu_rebuild()</p>
  <p>#14 /home/XXXX/www/www/includes/menu.inc(1779): menu_get_item()</p>
  <p>#15 /home/XXXX/www/www/includes/menu.inc(1794): menu_get_custom_theme(TRUE)</p>
  <p>#16 /home/XXXX/www/www/includes/common.inc(5402): menu_set_custom_theme()</p>
  <p>#17 /home/XXXX/www/www/includes/bootstrap.inc(2602): _drupal_bootstrap_full()</p>
  <p>#18 /home/XXXX/www/www/index.php(20): drupal_bootstrap(7)</p>
  <p>#19 {main}</p>
  
Tags: <drupal><error><pcp>
Title: Why am I getting deprecated function warnings?
ThreadText: # Why am I getting deprecated function warnings?
  
  (Asked by: username_0 on 2022-02-24)
  
  When I run updates (such as with an updated module) in Drupal (7.87), I get the following CiviCRM (5.46.2) related warning:
  
  *User deprecated function: Deprecated function CRM\_Contribute\_PseudoConstant::pcpStatus, use Function pcpStatus will be removed. in CRM\_Core\_Error::deprecatedFunctionWarning() (line 1044 of /home/example/www/www/sites/all/modules/civicrm/CRM/Core/Error.php).*
  
  These warnings are not specific to this version of CiviCRM; they have been going on for a while. I just kept hoping the next version of CiviCRM would correct it.
  
  I believe the pcp refers to Personal Campaign Pages, but I may be wrong. My site does not have any of those.
  
  Any thoughts welcomed :-)
  
  ---
  
  BACKTRACE OUTPUT per comments:
  
  Mar 01 14:19:08 [debug] $backTrace = #0 /home/XXXX/www/www/sites/all/modules/civicrm/CRM/Core/Error.php(1038): CRM\_Core\_Error::backtrace("backTrace", TRUE)
  
  #1 /home/XXXX/www/www/sites/all/modules/civicrm/CRM/Contribute/PseudoConstant.php(352): CRM\_Core\_Error::deprecatedFunctionWarning("Function pcpStatus will be removed")
  
  #2 /home/XXXX/www/www/sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm\_handler\_filter\_pseudo\_constant.inc(45): CRM\_Contribute\_PseudoConstant::pcpStatus()
  
  #3 /home/XXXX/www/www/sites/all/modules/views/includes/handlers.inc(65): civicrm\_handler\_filter\_pseudo\_constant->construct()
  
  #4 /home/XXXX/www/www/sites/all/modules/views/includes/handlers.inc(87): \_views\_create\_handler((Array:8), "handler", "filter")
  
  #5 /home/XXXX/www/www/sites/all/modules/views/views.module(1399): \_views\_prepare\_handler((Array:8), (Array:18), "status", "filter")
  
  #6 /home/XXXX/www/www/sites/all/modules/date/date\_views/includes/date\_views\_fields.inc(59): views\_get\_handler("civicrm\_pcp", "status", "filter")
  
  #7 /home/XXXX/www/www/sites/all/modules/date/date\_views/date\_views.module(156): \_date\_views\_fields("civicrm\_contact")
  
  #8 /home/XXXX/www/www/sites/all/modules/calendar/includes/calendar.views\_template.inc(37): date\_views\_fields("civicrm\_contact")
  
  #9 /home/XXXX/www/www/sites/all/modules/views/views.module(1520): calendar\_views\_templates()
  
  #10 /home/XXXX/www/www/sites/all/modules/views/views\_ui.module(56): views\_get\_all\_templates()
  
  #11 /home/XXXX/www/www/includes/menu.inc(2831): views\_ui\_menu()
  
  #12 /home/XXXX/www/www/includes/menu.inc(2794): menu\_router\_build()
  
  #13 /home/XXXX/www/www/includes/menu.inc(468): menu\_rebuild()
  
  #14 /home/XXXX/www/www/includes/menu.inc(1779): menu\_get\_item()
  
  #15 /home/XXXX/www/www/includes/menu.inc(1794): menu\_get\_custom\_theme(TRUE)
  
  #16 /home/XXXX/www/www/includes/common.inc(5402): menu\_set\_custom\_theme()
  
  #17 /home/XXXX/www/www/includes/bootstrap.inc(2602): \_drupal\_bootstrap\_full()
  
  #18 /home/XXXX/www/www/index.php(20): drupal\_bootstrap(7)
  
  #19 {main}
  
  **Tags:** drupal, error, pcp
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-02-24. Score: 3 | Accepted answer
  
  UPDATE: Based on new stack trace it's coming from `home/XXXX/www/www/sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_filter_pseudo_constant.inc` line 45, which is this:
  
  <https://github.com/civicrm/civicrm-drupal/blob/e22d89a50108a2b4da99e971d0fdcdd656edd56c/modules/views/civicrm/civicrm_handler_filter_pseudo_constant.inc#L45>
  
  `$this->_pseudo_constant = call_user_func_array($this->definition['pseudo class'] . "::" . $this->definition['pseudo method'], $pseudo_args);`
  
  So that needs updating in the <https://github.com/civicrm/civicrm-drupal> repo. It's not clear how easy that would be to do. I would log a ticket at <https://lab.civicrm.org/dev/drupal/-/issues/new>. (Update: Done: <https://lab.civicrm.org/dev/drupal/-/issues/175>)
  
  ---
  
  It's usually from an extension. You can grep your extensions folder for `CRM_Contribute_PseudoConstant::pcpStatus` and see what comes up. If you're on the latest version of it, then you can file an issue on their extension repo.
  
  > **Comments:**
  > **username_0**: Thanks for the suggestion username_1. I searched through the extensions folder (sites/default/files/civicrm/ext), but didn't find that string. Found some others with CRM_Contribute_PseudoConstant::, but not with pcpStatus.  
  > **username_1**: Then you can either grep the whole install (possibly it's in a drupal module?), or edit CRM_Core_Error::deprecatedFunctionWarning() so that it outputs a full backtrace in ConfigAndLog by adding `CRM_Core_Error::backtrace('backTrace', TRUE);` near the top of the function, which will tell you where it's coming from.  
  > **username_0**: Thanks for the suggestion username_1. I was finally able to figure out how to do this - I think. So this is what the log has for me:   Mar 01 12:29:58  [warning] Deprecated function CRM_Contribute_PseudoConstant::pcpStatus, use Function pcpStatus will be removed. Array (     [civi.tag] => deprecated )  What can I do about that?  
  > **username_1**: That looks like the same message you had in your original post. If you added the backtrace line there should be a lot more in the log. Did you try grep'ing the whole install?  
  > **username_0**: I did try searching the whole Civi install and did not come up with that full string. Same with the Drupal modules folder. What is new in this log entry is [civi.tag] => deprecated. Maybe I did not add the backtrace line correctly. I inserted it in modules/civicrm/CRM/Core/Error.php at line 309 and can confirm that is is there.  
  > **username_1**: It would be around line 1035, inside the deprecatedFunctionWarning() function.  
  > **username_0**: OK. Thanks. Made that change and there is more detailed output, but I can't share it here due to character limits...  
  > **username_1**: You can edit the original post - where it has links for "Share Edit Follow Close Flag"  
  > **username_0**: I have added the output to the original post. Thanks.  
  > **username_1**: Great! That solves it. I've updated answer. It also explains why grep didn't work - since the code to make the function call uses generic variables for the function name.  
  > **username_0**: Thanks username_1. I do not have an account at https://lab.civicrm.org, nor do I feel qualified to log a ticket appropriately. I would be very grateful if you or someone who knows what they are doing would please do that.  
  > **username_1**: Ok have created https://lab.civicrm.org/dev/drupal/-/issues/175  
  > **username_0**: Many thanks for all your help!  
  
  ---
  
  