Problem/Motivation

Error: Call to a member function get() on null in Drupal\lazy\Plugin\Filter\LazyFilter->tips() (line 205 of modules/contrib/lazy/src/Plugin/Filter/LazyFilter.php).

Steps to reproduce

Install lazy and core custom block module, try to add custom block via /block/add triggers this issue.

Proposed resolution

Don't know if this is the correct way to resolve it but add a check to see if $this->lazyConfig is set on line 205 and return suppresses the issue. Most likely this issue is also affecting other modules/parts of core where the filter tips are invoked.

CommentFileSizeAuthor
#3 lazy-3212059-1.patch675 bytesnicola85

Comments

miikamakarainen created an issue. See original summary.

osman’s picture

Hey Miika, thanks for the bug report.

Though, I wasn't able to reproduce it the way you described it.

However I found another bug, which is likely related with what you experienced: #3212179: Invalid argument supplied for foreach() in lazy__update_migrate_config()

Could you try using the dev branch, and see if it resolves the issue for you?

But before you try that, please make sure to run the database updates first. And see if that helps.

nicola85’s picture

StatusFileSize
new675 bytes
miikamakarainen’s picture

Patch in comment #3 does fix the issue.

I was able to replicate the issue following these steps:

  1. composer create-project drupal/recommended-project my-project
  2. composer require lazy drush
  3. drush en block_content lazy
  4. Added custom text format at /admin/config/content/formats/add with lazy-load checked
  5. Added custom block type at /admin/structure/block/block-content/types/add
  6. Error shown at /block/add when trying to add a block
nicola85’s picture

Status: Active » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: lazy-3212059-1.patch, failed testing. View results

  • osman committed 9a34cce on 8.x-3.x
    Issue #3212059 by nicola85, miikamakarainen, osman: Error: Call to a...
osman’s picture

Status: Needs work » Fixed

Thanks for the patch and the steps.

Status: Fixed » Closed (fixed)

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