Error: Call to a member function access() on null

Created on 21 March 2022, almost 3 years ago
Updated 17 February 2023, almost 2 years ago

Problem/Motivation

Getting the following error:
Error: Call to a member function access() on null in /var/www/x/web/modules/contrib/views_field_view/src/Plugin/views/field/View.php on line 241

Steps to reproduce

Not sure

Proposed resolution

Add a null check on the $view

Remaining tasks

none

I have added a patch.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇳🇱Netherlands Rop Rotterdam

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇵🇭Philippines mjgruta

    Patch failed on the latest beta and dev. Attaching the updated patch please test.

  • 🇫🇮Finland anaconda777

    Not able to apply the patch to latest beta5
    Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2023-02-17/3270751_19.patch

  • First commit to issue fork.
  • 🇨🇦Canada RobLoach Earth

    All of the code style tweaks should be part of a different issue/patch. They've caused conflicts and the patch can no longer apply.

  • First commit to issue fork.
  • Merge request !14Resolve #3270751 "Error call to" → (Open) created by jsutta
  • 🇺🇸United States jsutta United States

    I took the part of the @mjgruta's patch from #19 that addresses the issue and created an MR out of it. It applies cleanly to the 8.x-1.x version of the module.

    Note: The pipeline says there's a merge conflict but I can't see what's causing it. I've merged the 8.x-1.x branch into the views_field_view-3270751-3270751-error-call-to branch and git says there's nothing to commit/push. It's most likely that when I first opened the merge request I targeted the 7.x-1.x branch (because it's the default branch and I didn't look before creating it), which means the pipeline most likely ran under that context. If anyone has any advice how to resolve please let me know.

Production build 0.71.5 2024