Problem/Motivation

Error: Call to undefined function Drupal\cacheflush\Controller\system_rebuild_module_data() in Drupal\cacheflush\Controller\CacheflushApi->clearModuleCache() (line 187 of /var/www/html/web/modules/contrib/cacheflush/src/Controller/CacheflushApi.php).

Steps to reproduce

  1. Enable Ultimate Cron, Cacheflush, CacheFfush UI, Cacheflush Entity, and Cacheflush Cron modules
  2. Go to Structure ->Cacheflush ->Add new
  3. Fill out the form, making sure Cron checkbox is checked, and save. (may result in a separate unrelated error)
  4. Go to Ultimate Cron jobs page (/admin/config/system/cron/jobs)
  5. Run the new cron entity. Will result in an error message that system_rebuild_module_data() is undefined.

Proposed resolution

Replace deprecated system_rebuild_module_data() call with dependency injection of ModuleExtensionList and call to getList().

Issue fork cacheflush-3356899

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kelly.m.jacobs created an issue. See original summary.

kelly.m.jacobs’s picture

StatusFileSize
new1.89 KB

Here is a patch against 8.x-1.0-beta4

kelly.m.jacobs’s picture

StatusFileSize
new2.53 KB

Fixed a couple issues with the Cacheflush entity edit form

vuil’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Active » Needs work
Issue tags: +Needs reroll
StatusFileSize
new53.65 KB

The patch needs reroll because can not be applied correctly on the new 2.0.x branch.
Thank you.

chetan 11 made their first commit to this issue’s fork.

chetan 11’s picture

Status: Needs work » Needs review

Hi,
I have fixed the above error on my local setup, please check the raised MR once.
Thanks.

keshavv’s picture

StatusFileSize
new2.56 KB

Given MR !3 Not worked.
I have rerolled the #3 patch and it works well with Drupal 10.1

vuil’s picture

Status: Needs review » Reviewed & tested by the community

  • vuil committed 21265b5b on 2.0.x
    Issue #3356899 by vuil, keshavv, kelly.m.jacobs, chetan 11: Replace...
vuil’s picture

Status: Reviewed & tested by the community » Fixed

Committed!
I close the issue as Fixed.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.