Twig\Error\RuntimeError

An exception has been thrown during the rendering of a template ("Question and its behaviors do not have a method or closure named "relevance".").

/mnt/data/shnoulle/nginx/www/master/application/views/questionAdministration/subquestionRow.twig(125)

113     </td>
114 
115     <!-- Relevance equation -->
116     {% if first and scale_id == 0 %}
117         <td class="relevance-equation">
118             <input
119                 data-toggle="tooltip"
120                 data-title="{{ gT("Click to expand") }}"
121                 type='text'
122                 class='relevance form-control input'
123                 id='subquestions[{{ subquestion.qid }}][{{ scale_id }}][relevance]'
124                 name='subquestions[{{ subquestion.qid }}][{{ scale_id }}][relevance]'
125                 value="{{ subquestion.relevance }}"
126                 onkeypress=" if(event.keyCode==13) { if (event && event.preventDefault) event.preventDefault(); document.getElementById('save-button').click(); return false;}"
127             />
128         </td>
129     {%  else %}
130         <!-- TOOD: Why render and then hide? -->
131         <span style="display: none" class="relevance relevance-equation">
132             {# subquestion.relevance #}
133         </span>
134     {%  endif %}
135 
136     <!-- Icons add/edit/delete -->
137     <td style="vertical-align: middle; white-space: nowrap;" class="subquestion-actions">

Stack Trace

#0
+
 /mnt/data/shnoulle/nginx/www/master/application/third_party/Twig/Template.php(422): Twig\Template->displayWithErrorHandling(array("activated" => false, "scalecount" => 1, "subquestions" => array(array(Question)), "question" => Question, ...), array())
417         return $this->blocks;
418     }
419 
420     public function display(array $context, array $blocks = [])
421     {
422         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
423     }
424 
425     public function render(array $context)
426     {
427         $level = ob_get_level();
#1
+
 /mnt/data/shnoulle/nginx/www/master/tmp/runtime/twig_cache/5c/5c35a6bca658a0e64eab6326ccfd076bc0c2928ebdfa3b41b3d03ab9a5f3ea40.php(247): Twig\Template->display(array("activated" => false, "scalecount" => 1, "subquestions" => array(array(Question)), "question" => Question, ...))
242                     // line 67
243                     echo "                        <!-- Line tag -->
244                         ";
245                     // line 68
246                     $this->loadTemplate("subquestionRow.twig", "__string_template__4ec27c84895301e1f7d9c7a23a631f0b19e5f795ac91ed020f60f0f85ff24a3e", 68)->display(twig_array_merge($context, ["position" =>                     // line 69
247 ($context["position"] ?? null), "scale_id" =>                     // line 70
248 $context["scale_id"], "activated" =>                     // line 71
249 ($context["activated"] ?? null), "first" =>                     // line 72
250 ($context["first"] ?? null), "subquestion" =>                     // line 73
251 $context["subquestion"], "subquestionl10n" => $this->getAttribute($this->getAttribute(                    // line 74
252 $context["subquestion"], "questionl10ns", []), $context["lang"], [], "array"), "language" =>                     // line 75
#2
+
 /mnt/data/shnoulle/nginx/www/master/application/third_party/Twig/Template.php(455): __TwigTemplate_48665f104153a6e9fde951389338ae5c43c3a6ef3e75405c2c642b4e19eb70f6->doDisplay(array("activated" => false, "scalecount" => 1, "subquestions" => array(array(Question)), "question" => Question, ...), array())
450     }
451 
452     protected function displayWithErrorHandling(array $context, array $blocks = [])
453     {
454         try {
455             $this->doDisplay($context, $blocks);
456         } catch (Error $e) {
457             if (!$e->getSourceContext()) {
458                 $e->setSourceContext($this->getSourceContext());
459             }
460 
2021-03-01 07:51:02 nginx/1.18.0 Yii Framework/1.1.22-dev