Problem/Motivation

Error: Call to a member function lastUpdatedDate() on null in Drupal\module_builder\Form\ProcessForm->buildForm() (line 96 of /var/www/html/web/modules/contrib/module_builder/src/Form/ProcessForm.php).

Steps to reproduce

  1. Install module_builder
  2. Visit /admin/config/development/module_builder/analyse

Proposed resolution

A null check seems to do it:

$last_update = $task_handler_report?->lastUpdatedDate() ?? 0;

Remaining tasks

  • Add test to verify that the Analyse Code form loads correctly?

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#5 2026-05-07_11-59.png28.54 KBivnish
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

jedihe created an issue. See original summary.

jedihe’s picture

Status: Active » Needs review

Quick testing shows the fix working fine.

joachim’s picture

Status: Needs review » Postponed (maintainer needs more info)

> $task_report_summary = $this->drupalCodeBuilder->getTask('ReportSummary');

That should not be getting a NULL -- it should either get you the object, or throw an exception.

Could you debug to see why please?

ivnish’s picture

Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new28.54 KB

Same problem. Drupal 10 clean install.

I debugged it

$this->drupalCodeBuilder->getTask('ReportSummary') return NULL

It called Factory::getTask($task_name, $task_options); It return NULL.

It called self::$environment->verifyEnvironment($required_sanity); It return NULL

And then no any error message.

screenshot

joachim’s picture

Thanks for debugging!

> $this->drupalCodeBuilder->getTask('ReportSummary') return NULL

That shouldn't happen. What versions of MB and DCB do you have? And did you install them with Composer?

ivnish’s picture

Yes, installed with composer. MB 4.2.2, DCB 4.6.3

joachim’s picture

Could you use the debugger to step into why getTask('ReportSummary') is returning NULL?

ivnish’s picture

Already. See my comment #5. Because self::$environment->verifyEnvironment($required_sanity) return error without any message. See screenshot

joachim’s picture

Oh I think I see the problem.

I'll fix it soon.

As a workaround, try changing to $sanity_level in ReportSummary to be NULL.

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

I've just released DCB 4.6.4, which should fix the problem. Please give it a try.

ivnish’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

It works, thanks

joachim’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for reporting back! :)

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

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

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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