Fatal error: Error: Call to a member function get() on null

Created on 3 March 2022, over 2 years ago
Updated 12 July 2024, 3 months ago

Problem/Motivation

When submitting the Clone form with only the value for the Type field, the form is crashing into a fatal error.

Steps to reproduce

- Access the clone form of a paragraph
- Pick a Type
- Reload your page
- The browser should have kept the Type choice and the other choices are disabled
- Submit the form
- It creates a fatal error
Error: Call to a member function get() on null in Drupal\paragraphs_edit\Form\ParagraphCloneForm->save() (line 243 of /app/web/modules/contrib/paragraphs_edit/src/Form/ParagraphCloneForm.php)

Proposed resolution

- Add some validation on the form to check that the required fields are not empty on the server side

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

🇨🇦Canada phjou Vancouver 🇨🇦 🇪🇺

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

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024