Fix Error: Call to Member Function id() on Null in editoria11y Page Attachments() During Content Type Creation

Created on 8 December 2024, 10 days ago

Problem/Motivation

Updated to latest Editoria11y Accessibility Checker ~2.2.0
But faced an error when creating content types.

Steps to reproduce

When creating
Scenario: Create Test Content type
Given I am a logged in user with the "webmaster" user
When I go to "/admin/structure/types/add"
And wait
Then I should see "Add content type"
When I fill in "Test Content" for "Name"
And I wait for AJAX to finish
And I wait for 2 seconds
And I press "Save and manage fields"
And wait
Then I should see "The content type Test Content has been added."
The text "The content type Test Content has been added." was not found anywhere in the text of the current page.

But

The website encountered an unexpected error. Try again later.

Error: Call to a member function id() on null in editoria11y_page_attachments() (line 212 of modules/contrib/editoria11y/editoria11y.module).

When editing fields

Scenario: Access the fields page for the Basic page content type
Given I am a logged in user with the "webmaster" user
When I go to "/admin/structure/types/manage/page/fields"
And wait
Then

The website encountered an unexpected error. Try again later.

Error: Call to a member function id() on null in editoria11y_page_attachments() (line 212 of modules/contrib/editoria11y/editoria11y.module).

Proposed resolution

  • Check if the node parameter is not empty.

Remaining tasks

  • File an issue
  • MR/Patch
  • Test
  • Review

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.2

Component

Bugs

Created by

πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024