Needs review
Project:
Webform Score
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2024 at 09:05 UTC
Updated:
26 Apr 2024 at 04:30 UTC
Jump to comment: Most recent
Comments
Comment #2
tomasbarej commentedI was able to fix the behaviour, but I'm not so confident about the resolution because I don't really get how it might actually work before.
There is an initialisation of a plugin in QuizTrait.php with a method createWebformScorePlugin:
First argument of the method should be an element where settings of the plugin should be loaded from element property #webform_score_plugin_configuration
It doesn't make sense to me to pass a $this->configuration array when there are not (or should not be) an element property.
It starts working when I pass an actual element props the method expects in form or an $element array like this:
What I'm not sure are the two more occurrences of plugin initialisation
$plugin = $this->createWebformScorePlugin($this->configuration, $score_methodology_option);in methods validateConfigurationForm and submitConfigurationForm and wondering if it actually might validate or submit the values. In order to save config we need patch posted in issue https://www.drupal.org/project/webform_score/issues/2913371Comment #3
tomasbarej commentedComment #5
nigelcunningham commentedThanks for opening this issue. I've just pushed some work that I've done over the last few days - as you rightly pointed out, more was needed than just fixing the arguments. I'll credit your work on this when I get up to closing the issue. In the meantime, if you'd like to try the current dev branch, it will hopefully fix issues for you.