http://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692018-11-08T19:56:58ZTYPO3 ForgeTYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3904472018-11-08T19:56:58ZJonas Eberlejonas.eberle@aero.de
<ul></ul><p>can reproduce (master).</p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3906902018-11-12T18:33:11ZWouter Wolterstypo3@wouterwolters.nl
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" href="/issues/86910">Bug #86910</a>: All text input fields get required="required" attribute</i> added</li></ul> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3906952018-11-12T19:26:38ZJonas Eberlejonas.eberle@aero.de
<ul></ul><p>Minimal test case that renders the erroneous <pre>required=required</pre><br />on the second element.</p>
<pre><code class="yaml syntaxhl" data-language="yaml"><span class="na">type</span><span class="pi">:</span> <span class="s">Form</span>
<span class="na">identifier</span><span class="pi">:</span> <span class="s">testForm</span>
<span class="na">prototypeName</span><span class="pi">:</span> <span class="s">standard</span>
<span class="na">renderables</span><span class="pi">:</span>
<span class="pi">-</span>
<span class="na">type</span><span class="pi">:</span> <span class="s">Page</span>
<span class="na">identifier</span><span class="pi">:</span> <span class="s">page-1</span>
<span class="na">renderables</span><span class="pi">:</span>
<span class="pi">-</span>
<span class="na">type</span><span class="pi">:</span> <span class="s">Text</span>
<span class="na">identifier</span><span class="pi">:</span> <span class="s">text-1</span>
<span class="na">properties</span><span class="pi">:</span>
<span class="na">fluidAdditionalAttributes</span><span class="pi">:</span>
<span class="na">required</span><span class="pi">:</span> <span class="s">required</span>
<span class="pi">-</span>
<span class="na">type</span><span class="pi">:</span> <span class="s">Text</span>
<span class="na">identifier</span><span class="pi">:</span> <span class="s">text-2</span>
</code></pre>
<p>Mind that it can change behaviour on the 2nd reload after a cache clear and that it is not consistent!</p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3906972018-11-12T19:36:11ZJonas Eberlejonas.eberle@aero.de
<ul></ul><p>... we just found out that wrapping the fields inside GridRow->Fieldset->... greatly reduces the probability of seeing the error... It is getting weird...</p>
<p>As such you can also reproduce it with the introduction distribution aka bootstrap_package with <code>typo3conf/ext/bootstrap_package/Resources/Private/Forms/Contact.form.yaml</code> on current master, although I had to cache clear+reload ~10 times. Btw: Testing is easier if you remove the template <code>typo3conf/ext/bootstrap_package/Resources/Private/Templates/Form/Form.html</code> (or at least the line novalidate=) as then you do not have to use browser dev tools to see the error but you get erroneous HTML5-validation straight away.</p>
<p>Fun fact: <code>typo3conf/ext/bootstrap_package/Resources/Private/Templates/Form/Form.html</code> does only add the line novalidate= to the default Form.html template.</p>
<p>This actually is a workaround for this bug. You get wrong HTML then, but it does not interfere with your HTML5-validation.</p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3907652018-11-14T15:54:06ZRalf Zimmermannralf.zimmermann@tritum.de
<ul></ul><p>I can reproduce this with the testcase from <a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: AbstractTagBasedViewHelper recycles the TagBuilder (Closed)" href="http://forge.typo3.org/issues/86890#note-3">#86890#note-3</a> with TYPO3 9.5.2-dev. TYPO3 8.7-x is not affected.<br />The issue occurs after clearing the system cache and after a reload of the form page.<br />After the fluid templates have been cached, the error disappears.<br />I'll try to find a solution.</p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3907662018-11-14T16:08:55ZSteffen Keuper
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/390766/diff?detail_id=327750">diff</a>)</li></ul><p>Sometimes the error disappears after refreshing the page after the first access, sometimes it doesn't, couldn't find any pattern what causes the irregularity of that.<br />The result on the 2nd access doesn't change on further reloads.</p>
<p>I can't reproduce the error in plain fluid(also tried using the original form partials/ViewHelpers for that but without results), so it looks like something form specific to me.<br />(The initial workaround I posted broke some unit tests so I removed it)</p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3907672018-11-14T16:51:41ZRalf Zimmermannralf.zimmermann@tritum.de
<ul></ul><p>It is reproducible with plain fluid:</p>
<p>This works as expected:</p>
<pre>
<f:form>
<f:form.textfield additionalAttributes="{required: 'required'}" />
<f:form.textfield additionalAttributes="{}" />
</f:form>
</pre>
<p>Result:</p>
<pre>
<form action="/" method="post">
<input required="required" type="text" name="">
<input type="text" name="">
</form>
</pre>
<p>but with a foreach:</p>
<pre>
<f:form>
<f:for each="{0: {required: 'required'}, 1: '{}'}" as="attribs">
<f:form.textfield additionalAttributes="{attribs}" />
</f:for>
</f:form>
</pre>
<p>Result:</p>
<pre>
<form action="/" method="post">
<input required="required" type="text" name="">
<input required="required" type="text" name="">
</form>
</pre>
<p>You can disable the fluid template cache to reproduce the issue all the time:</p>
<pre>
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['fluid_template']['backend'] = \TYPO3\CMS\Core\Cache\Backend\NullBackend::class;
</pre>
<p>I continue to debug this.</p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3907912018-11-14T20:49:15ZRalf Zimmermannralf.zimmermann@tritum.de
<ul></ul><p>The TYPO3 CMS AbstractTagBasedViewHelper implementation (<a class="external" href="https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php">https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php</a>) is removed since (<a class="external" href="https://github.com/TYPO3/TYPO3.CMS/commit/533a1a349e99570a9e59357f43277add5a74b636#diff-37c6a16d3e2de976d66e17b797cda2ba">https://github.com/TYPO3/TYPO3.CMS/commit/533a1a349e99570a9e59357f43277add5a74b636#diff-37c6a16d3e2de976d66e17b797cda2ba</a>).<br />The initialize() method differs a little bit.</p>
<p><a class="external" href="https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php#L83">https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php#L83</a> vs <a class="external" href="https://github.com/TYPO3/Fluid/blob/2.5.4/src/Core/ViewHelper/AbstractTagBasedViewHelper.php#L88">https://github.com/TYPO3/Fluid/blob/2.5.4/src/Core/ViewHelper/AbstractTagBasedViewHelper.php#L88</a></p>
<p>Within typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php (TYPO3 8.7) there was this code</p>
<pre>
$this->tag->reset();
$this->tag->setTagName($this->tagName);
</pre>
<p>which reset the tagbuilder.<br />Now this reset will never happened at least with the usage of the Textfield ViewHelper.</p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3907942018-11-14T21:09:44ZRalf Zimmermannralf.zimmermann@tritum.de
<ul><li><strong>Category</strong> changed from <i>Form Framework</i> to <i>Fluid</i></li></ul> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3908662018-11-16T10:23:05ZJonas Eberlejonas.eberle@aero.de
<ul></ul><p>Amazing find, Ralf!</p>
<p>For the current fluid in master (2.5.2) this fixes it for me:</p>
<pre><code class="diff syntaxhl" data-language="diff"><span class="gd">--- fluid_orig/src/Core/ViewHelper/AbstractTagBasedViewHelper.php 2018-11-16 10:13:58.885022862 +0100
</span><span class="gi">+++ fluid/src/Core/ViewHelper/AbstractTagBasedViewHelper.php 2018-11-16 10:14:14.961016742 +0100
</span><span class="p">@@ -88,6 +88,8 @@</span>
public function initialize()
{
parent::initialize();
<span class="gi">+ $this->tag->reset();
+ $this->tag->setTagName($this->tagName);
</span><span class="err">
</span> if ($this->hasArgument('additionalAttributes') && is_array($this->arguments['additionalAttributes'])) {
$this->tag->addAttributes($this->arguments['additionalAttributes']);
<span class="err">
</span></code></pre> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3908702018-11-16T11:01:47ZJonas Eberlejonas.eberle@aero.de
<ul></ul><p>Pull request is upstream: <a class="external" href="https://github.com/TYPO3/Fluid/pull/419">https://github.com/TYPO3/Fluid/pull/419</a></p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3908882018-11-16T18:04:20ZJonas Eberlejonas.eberle@aero.de
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>90</i></li></ul><p>Patch is merged <a class="external" href="https://github.com/TYPO3/Fluid/commit/60545b6cbb6d66de7413ec515c8ae64ef84414b7">https://github.com/TYPO3/Fluid/commit/60545b6cbb6d66de7413ec515c8ae64ef84414b7</a></p>
<p>I can't say how the roadmap is from here (bug fixed upstream, but upstream has added features, maybe breaking, too). I hope somebody can jump in and provide some pointers.</p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3935682019-01-15T06:06:00ZJosef Glatzjosef.glatz@typo3.org
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" href="/issues/87430">Bug #87430</a>: Fields which are not required render with required attribute</i> added</li></ul> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3942572019-01-31T23:59:45ZRalf Zimmermannralf.zimmermann@tritum.de
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/87586">Bug #87586</a>: ext:form field properties get inherited to subsequent fields</i> added</li></ul> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3942802019-02-01T11:13:02ZJonas Eberlejonas.eberle@aero.de
<ul></ul><p>Fluid 2.6 is released which fixes the bug.</p>
<p>But it is not included in TYPO3 master yet.</p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3943032019-02-01T13:09:08ZGerrit Code Review
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Under Review</i></li></ul><p>Patch set 4 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="https://review.typo3.org/59554">https://review.typo3.org/59554</a></p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3943202019-02-01T14:04:21ZGerrit Code Review
<ul></ul><p>Patch set 5 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="https://review.typo3.org/59554">https://review.typo3.org/59554</a></p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3943332019-02-01T15:01:58ZGerrit Code Review
<ul></ul><p>Patch set 6 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="https://review.typo3.org/59554">https://review.typo3.org/59554</a></p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3943482019-02-01T16:51:58ZGerrit Code Review
<ul></ul><p>Patch set 1 for branch <strong>9.5</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="https://review.typo3.org/59609">https://review.typo3.org/59609</a></p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3943602019-02-01T17:00:06ZGerrit Mohrmann
<ul><li><strong>Status</strong> changed from <i>Under Review</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="[TASK] Update typo3fluid/fluid to 2.6.0 Fixes missing output in ifAuthenticatedViewHelper after ..." href="http://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/3469afec25bf599e7c5782a5ac6f4d71ffcf946d">3469afec25bf599e7c5782a5ac6f4d71ffcf946d</a>.</p> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3957932019-03-02T10:25:05ZRalf Zimmermannralf.zimmermann@tritum.de
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/87811">Bug #87811</a>: EXT:form makes all fields required</i> added</li></ul> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=3973362019-03-28T14:03:06ZRémy DANIEL
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/86164">Bug #86164</a>: CheckboxViewHelper sets automatically each checkbox on checked, if just one of them is checked</i> added</li></ul> TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderhttp://forge.typo3.org/issues/86890?journal_id=4001562019-05-07T12:15:15ZBenni Mackbenni@typo3.org
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul>