Replace non-existent functions: civicrm_initialize(), drupal_set_title(), and so on

Created on 8 April 2023, about 1 year ago
Updated 16 April 2023, about 1 year ago

1.0 Problem/Motivation

There seem to be a smattering of no-longer existing functions that need to be replaced.

  • civicrm_initialize() (in .module), use \Drupal::service('civicrm')->initialize();
  • drupal_set_title() (in .module)
  • webform_results_access() (in .module)
  • class wf_crm_admin_component (in .module - is this replaced by WebformCivicrmPostProcess?)
🐛 Bug report
Status

Closed: outdated

Version

6.0

Component

Code

Created by

🇨🇦Canada nubeli

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @nubeli
  • 🇺🇸United States colemanw

    If no one has complained of fatal errors by this point... is that code even reachable?
    Completely unused code should probably be removed rather than updated IMO.

  • First commit to issue fork.
  • Status changed to Needs review about 1 year ago
  • 🇮🇳India Ranjit1032002

    Created a patch for the issue mentioned, please review.
    Thank You.

  • 🇨🇦Canada nubeli

    @Ranjit1032002 there are a few problems with the patch:

    - WebformCivicrmPostProcess::adjustPageBreak() doesn't exist.
    - WebformCivicrmPostProcess::checkBillingPagination() doesn't exist.
    - Replacing drupal_set_title() with just $this->t('...) doesn't do anything. You need to assign it to something and figure out a way to alter the title.
    - webform_submission_access() doesn't exist.
    - WebformCivicrmPostProcess::preprocessComponentsForm() doesn't exist.

    Please put in a bit more thought into the PR before submitting it.

    The only thing that potentially works in this PR is putting in \Drupal::service('civicrm')->initialize();.

    After fixing things, I suggest testing out the PR first before posting it for others to review or test.

  • 🇮🇳India jitendrapurohit

    I dont see civicrm_initialize() anywhere in webform_civicrm.module.

    @Ranjit1032002 Are you using the latest version?

    I've raised a PR to fix this - https://github.com/colemanw/webform_civicrm/pull/870

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The call to civicrm_initialize() have been removed in commit d8518917, done one month ago, but it has been pushed on the development snapshot and probably no new releases have been created.

  • Status changed to Closed: outdated about 1 year ago
  • 🇨🇦Canada KarinG 🇨🇦

    Actually -> I have issued a new release.

Production build 0.69.0 2024