madeyourday / contao-rocksolid-custom-elements

RockSolid Custom Elements Contao Extension
http://rocksolidthemes.com/de/contao/plugins/custom-content-elements
MIT License
48 stars 12 forks source link

bug with pageTree field within list #85

Closed fritzmg closed 7 years ago

fritzmg commented 7 years ago

If you have a pageTree field within a list, selecting the page of the additional items will not work.

Reproduction

  1. Use an RSCE element with a config like [1].
  2. Create the new RSCE element.
  3. Add a new list item and select a page.
  4. Do not save and add another list item and select a page.

The page selection will not work for the second item. Instead, the page selection of the first item will be changed to whatever you chose for the second item.

[1]

<?php

return array(
    'label' => array('Test', ''),
    'types' => array('content'),
    'contentCategory' => 'includes',
    'standardFields' => array('cssID'),
    'wrapper' => array('type' => 'none'),
    'fields' => array(
        'pages' => array(
            'label' => array('Pages', ''),
            'elementLabel' => '%s. Box',
            'inputType' => 'list',
            'minItems' => 0,
            'maxItems' => 3,
            'fields' => array(
                'page' => array(
                    'label' => array('Page','Choose a page.'),
                    'inputType'  => 'pageTree',
                    'foreignKey' => 'tl_page.title',
                    'eval'       => array('fieldType'=>'radio')
                )
            )
        )
    )
);

As a workaround you currently have to save the element, before adding a new list item.

ausi commented 7 years ago

I was not able to reproduce this issue. Are you using the latest version of Contao (4.4.2) and of the extension (2.0.3)?

ausi commented 7 years ago

@fritzmg any updates on this issue?

fritzmg commented 7 years ago

Not yet, I was on vacation. I'll close in the mean time and reopen if I can reproduce it again :)

fritzmg commented 7 years ago

I was unable to reproduce this in the original site with the newest versions of Contao 4.4 and RSCE.