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}

1 Answer 1


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:


$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.

  • 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.
    – Demerit
    Feb 25, 2022 at 3:18
  • 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?
    – Demerit
    Mar 1, 2022 at 18:24
  • 1
    It would be around line 1035, inside the deprecatedFunctionWarning() function.
    – Demerit
    Mar 1, 2022 at 19:08
  • 1
    You can edit the original post - where it has links for "Share Edit Follow Close Flag"
    – Demerit
    Mar 1, 2022 at 19:28
  • 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.
    – Demerit
    Mar 1, 2022 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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