Issue Bug Closed

#98668elementBrowserType -> Bug in Group

Harald Holzmann 10/20/22, 14:39 updated 03/12/25, 15:50

Description

I have this Flexform-Config

<icon>
                    <TCEforms>
                      <label>Icon</label>
                      <config>
                        <type>group</type>
                        <internal_type>db</internal_type>
                        <appearance>
                          <elementBrowserType>file</elementBrowserType>
                          <elementBrowserAllowed>png,svg</elementBrowserAllowed>
                        </appearance>
                        <allowed>sys_file</allowed>
                        <fieldControl>
                          <elementBrowser>
                            <disabled>false</disabled>
                          </elementBrowser>
                        </fieldControl>
                        <size>1</size>
                        <maxitems>1</maxitems>
                        <show_thumbs>1</show_thumbs>
                      </config>
                    </TCEforms>
                  </icon>

The Browse-Dialog on the right (next to remove) works correct.

clipboard-202210201636-61c8j.png

But when clicking on the Button called “File” a strange popup is opened, that has no usefull function.
clipboard-202210201637-03w0g.png

The button should work as the right one.
Also make it possible to hide this button via FielControl->ElementBrowser->Disabled=False. When adding this, both buttons disappear and cannot select files anymore.

Thanks and best regards

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Files 2

History 4

  1. Christian Kuhn commented and changed status New Closed <span data-processor="relativetime" data-value="2023-10-26T13:52:03+00:00" > 10/26/23, 13:52 </span>

    Hey.

    I’m afraid this is a ‘won’t fix’:

    Relations to sys_file should be done using tca type=file, which is an inline configuration over sys_file_references.

    The fact you’re using type=group here is probably a workaround since type=inline and type=file are not allowed in section containers, and FormEngine throws an exception in this case. It’s a bug in the core that it does not throw for type=group and type=select with MM, foreign_table or allowed as well, when nested in section containers.

    The background is that section containers are an anonymous structure. Allowing relations to database entities is a misconception the core can’t handle. The existing usages are so full of bugs that we’re going to restrict this further. Instead, we’re trying to at least allow and fix long standing open bugs with inline,group,file,select on sheet element level, which is tricky enough.

    As such, I’ll close here as won’t fix and will try to fix some of the flex form sheet element bugs instead.

    I need to ask you to not use db relation types within flex form sections. I hope that is ok.

  2. Loon Buster commented <span data-processor="relativetime" data-value="2025-03-12T15:50:12+00:00" > 03/12/25, 15:50 </span>

    > I need to ask you to not use db relation types within flex form sections. I hope that is ok.

    no, it is not.

    but thanks for simply killing code that worked over 3 versions. great work!

    .loon