Problem/Motivation

Error: Call to a member function create() on null in Drupal\webform_score\Plugin\WebformElement\TextfieldQuiz->getAnswer() (line 223 of modules/contrib/webform_score/src/Plugin/WebformElement/QuizTrait.php).

I found that if not using score_textfield I don't get this error.

Steps to reproduce

Make a form with score and use a score_textfield

Proposed resolution

Add line inwebform_score\src\Plugin\WebformElement\QuizTrait.php on line 30
$instance->typedDataManager = $container->get('typed_data_manager');

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#4 3314877-4.patch602 bytesimmaculatexavier
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

seyfcom created an issue. See original summary.

immaculatexavier made their first commit to this issue’s fork.

immaculatexavier’s picture

Assigned: Unassigned » immaculatexavier
immaculatexavier’s picture

Status: Active » Needs review
StatusFileSize
new602 bytes

Attached patch for the proposed resolution

immaculatexavier’s picture

Assigned: immaculatexavier » Unassigned

  • Nigel Cunningham committed 02f868a on 8.x-2.x
    Issue #3314877 by immaculatexavier: Errror with score_textfield,...
nigelcunningham’s picture

Status: Needs review » Fixed

Reviewed and applied. Thanks!

Status: Fixed » Closed (fixed)

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