digedag / cfc_league

Sportsmanagement for TYPO3 (Backend)
3 stars 8 forks source link

Spielplan manuell erstellen > Fehlerhaftes Formular #40

Closed floen-de closed 7 years ago

floen-de commented 7 years ago

Beim Versuch einen Spielplan manuell zu erstellen habe ich das Problem, dass jedes Formular Element den falsche ID bekommen. Jedes Element bekommt eine andere ID/Name (name="data[tx_cfcleague_games][NEW59dcfa72e6e8e139274534][round]) und wird dann als eigenes Array genutzt. Somit wird zwar das Spiel angelegt, aber ohne alle weiteren Felder wie Teams, Datum usw.

Ich vermute das Problem liegt an dem FormBuilder von rn_base. Ich nutze die aktuellen Versionen aus dem Github.

rn_base: v1.5.1 cfc_league: 1.1.1

Quelltext-Beispiel:

<tr class="">
    <td>
        <div class="t3js-formengine-field-item">
            <div class="t3-form-field-disable"></div>
            <div class="form-control-wrap" style="max-width: 156px">
                <div class="form-control-clearable">
                    <input type="text" data-formengine-validation-rules="..." data-formengine-input-params="{&quot;field&quot;:&quot;data[tx_cfcleague_games][NEW59dcfa72e6e8e139274534][round]&quot;,&quot;evalList&quot;:&quot;required,int&quot;,&quot;is_in&quot;:&quot;&quot;}" data-formengine-input-name="data[tx_cfcleague_games][NEW59dcfa72e6e8e139274534][round]" id="formengine-input-59dcfa730db71429481987" value="" maxlength="4" class="form-control t3js-clearable hasDefaultValue" style="">
                    <button type="button" class="close" tabindex="-1" aria-hidden="true"><span class="fa fa-times"></span></button>
                </div>
                <input type="hidden" name="data[tx_cfcleague_games][NEW59dcfa72e6e8e139274534][round]" value="9">
            </div>
        </div>
        <div class="t3js-formengine-field-item">
            <div class="t3-form-field-disable"></div>
            <div class="form-control-wrap" style="max-width: 156px">
                <div class="form-control-clearable">
                    <input type="text" data-formengine-validation-rules="" data-formengine-input-params="{&quot;field&quot;:&quot;data[tx_cfcleague_games][NEW59dcfa730f516759433571][round_name]&quot;,&quot;evalList&quot;:&quot;required,trim&quot;,&quot;is_in&quot;:&quot;&quot;}" data-formengine-input-name="data[tx_cfcleague_games][NEW59dcfa730f516759433571][round_name]" id="formengine-input-59dcfa7322633202097731" value="" maxlength="100" class="form-control t3js-clearable hasDefaultValue">
                    <button type="button" class="close" tabindex="-1" aria-hidden="true"><span class="fa fa-times"></span></button>
                </div>
                <input type="hidden" name="data[tx_cfcleague_games][NEW59dcfa730f516759433571][round_name]" value="9. Spieltag">
            </div>
        </div>
    </td>
    <td>
        <div class="t3js-formengine-field-item">
            <div class="t3-form-field-disable"></div>
            <div class="form-control-wrap" style="max-width: 192px">
                <div class="input-group">
                    <div class="form-control-clearable">
                        <input type="text" data-date-type="datetime" data-formengine-validation-rules="[{&quot;type&quot;:&quot;datetime&quot;,&quot;config&quot;:{&quot;type&quot;:&quot;input&quot;,&quot;size&quot;:&quot;12&quot;,&quot;max&quot;:&quot;20&quot;,&quot;checkbox&quot;:&quot;0&quot;,&quot;default&quot;:&quot;0&quot;}}]" data-formengine-input-params="{&quot;field&quot;:&quot;data[tx_cfcleague_games][NEW59dcfa732521e961252684][date]&quot;,&quot;evalList&quot;:&quot;datetime&quot;,&quot;is_in&quot;:&quot;&quot;}" data-formengine-input-name="data[tx_cfcleague_games][NEW59dcfa732521e961252684][date]" id="formengine-input-59dcfa733d54b306588715" value="" maxlength="20" class="t3js-datetimepicker form-control t3js-clearable hasDefaultValue">
                        <button type="button" class="close" tabindex="-1" aria-hidden="true"><span class="fa fa-times"></span></button>
                    </div>
                    <input type="hidden" name="data[tx_cfcleague_games][NEW59dcfa732521e961252684][date]" value="1507661458">
                    <span class="input-group-btn">
                        <label class="btn btn-default" for="formengine-input-59dcfa733d54b306588715">
                            <span class="t3js-icon icon icon-size-small icon-state-default icon-actions-edit-pick-date" data-identifier="actions-edit-pick-date">
    <span class="icon-markup">
<img src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/actions/actions-edit-pick-date.svg" width="16" height="16">
    </span>
                    </span>
                    </label>
                    </span>
                </div>
            </div>
        </div>
    </td>
    <td>
        <div class="t3js-formengine-field-item">
            <div class="t3-form-field-disable"></div>
            <div class="form-control-wrap">
                <select id="tceforms-select-59dcfa735eb7a573966902" name="data[tx_cfcleague_games][NEW59dcfa73443b2124164783][status]" data-formengine-validation-rules="[{&quot;type&quot;:&quot;select&quot;,&quot;minItems&quot;:0,&quot;maxItems&quot;:1}]" class="form-control form-control-adapt">
                    <option value="0" data-icon="" selected="selected">Angesetzt</option>
                    <option value="1" data-icon="">Läuft</option>
                    <option value="2" data-icon="">Beendet</option>
                    <option value="-1" data-icon="">Ungültig</option>
                    <option value="-10" data-icon="">Verlegt</option>
                </select>
            </div>
        </div>
        <input type="hidden" name="data[tx_cfcleague_games][NEW0][pid]" value="149">
        <input type="hidden" name="data[tx_cfcleague_games][NEW0][competition]" value="65">
    </td>
    <td>
        <div class="t3js-formengine-field-item">
            <div class="t3-form-field-disable"></div>
            <div class="form-control-wrap">
                <select id="tceforms-select-59dcfa736fc26157920655" name="data[tx_cfcleague_games][NEW59dcfa736167e121230016][home]" data-formengine-validation-rules="[{&quot;type&quot;:&quot;select&quot;,&quot;minItems&quot;:0,&quot;maxItems&quot;:1}]" class="form-control form-control-adapt" size="1">

                </select>
            </div>
        </div>
    </td>
    <td>
        <div class="t3js-formengine-field-item">
            <div class="t3-form-field-disable"></div>
            <div class="form-control-wrap">
                <select id="tceforms-select-59dcfa7382a53192643469" name="data[tx_cfcleague_games][NEW59dcfa7372a81575867109][guest]" data-formengine-validation-rules="[{&quot;type&quot;:&quot;select&quot;,&quot;minItems&quot;:0,&quot;maxItems&quot;:1}]" class="form-control form-control-adapt" size="1">

                </select>
            </div>
        </div>
    </td>
</tr>
digedag commented 7 years ago

Welche TYPO3 Version verwendest du? Und hast du wirklich das Tag v1.1.1 ausgechecked oder den aktuellen HEAD? Du solltest auf jeden Fall den HEAD nutzen!

floen-de commented 7 years ago

oh sorry vergessen. TYPO3 7.6.21

Update: Gerade noch auf 7.6.23 geupdatet. Aber immer noch das Problem.

<select id="tceforms-select-59dde1448d1f6614321109" name="data[tx_cfcleague_games][NEW59dde1447c0e8321984255][home]" data-formengine-validation-rules="[{&quot;type&quot;:&quot;select&quot;,&quot;minItems&quot;:0,&quot;maxItems&quot;:1}]" class="form-control form-control-adapt" size="1">
digedag commented 7 years ago

Bitte mal rn_base aktualisieren. Dann sollte es funktionieren. Danke für den Bugreport!

floen-de commented 7 years ago

Es scheint so als läge es an dieser Änderung in rn_base

@@ -134,7 +133,6 @@ class Tx_Rnbase_Backend_Form_FormBuilder
         // in den folgenden Key müssen die Daten aus der TCA rein. Wie geht das?
         $options['tableName'] = $table;
         $options['fieldName'] = $fieldName;
-        $options['databaseRow'] = $row;
         $options['renderType'] = 'singleFieldContainer';
floen-de commented 7 years ago

Wunderbar. Funktioniert wieder. Vielen Dank