Problem/Motivation

Getting below error when there is not added any paragraph in the site on visiting content type's Manage Form Display page

Error: Call to a member function id() on null in Drupal\paragraph_view_mode\Plugin\Field\FieldWidget\ParagraphViewModeWidget->getViewModesFieldDescription() (line 294 of /var/www/html/web/modules/contrib/paragraph_view_mode/src/Plugin/Field/FieldWidget/ParagraphViewModeWidget.php)

Steps to reproduce

  1. Install Paragraph View Mode and Paragraphs module.
  2. Go to Paragraphs Type Page at /admin/structure/paragraphs_type and verify that there are not added any paragrphs.
  3. Visit any content type's Manage Form Display page. (i.e. /admin/structure/types/manage/article/form-display)
  4. It will throw website encountered error.
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

Binoli Lalani created an issue. See original summary.

binoli lalani’s picture

Assigned: binoli lalani » Unassigned
Status: Active » Needs review

Hello,

I have fixed the error and created MR. Please review.

Thank you!

sayco’s picture

Status: Needs review » Needs work

Thank you for reporting! I've added a small change request to NULL instead of FALSE.

binoli lalani’s picture

Status: Needs work » Needs review

Hello @sayco,

Thank you for reviewing the code. I have committed code to add NULL instead of FALSE. Please review.

Thank you!

  • sayco committed 8331b77e on 3.x authored by Binoli Lalani
    Issue #3353363: Getting error on visiting content type's Manage Form...
sayco’s picture

Status: Needs review » Fixed

Merged, thanks for sorting it out so fast :-)!

Status: Fixed » Closed (fixed)

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