typo3 flexform options show invalid values in backend

拥有回忆 提交于 2020-01-25 07:33:06

问题


I have created a FlexForm for my typo3 backend to choose some options:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
<sheets>
    <sDEF>
        <ROOT>
            <TCEforms>
                <sheetTitle>
    </sheetTitle>
            </TCEforms>
            <el>
            <settings.maxNumber>
            <TCEforms>
            ...
<settings.orderBy>
<TCEforms>
    <label>My selections</label>
    <config>
        <type>select</type>
        <renderType>selectSingle</renderType>
        <items>
    <numIndex index="0">
          <numIndex index="0">Title first</numIndex>
          <numIndex index="1">title,year,author</numIndex>
    </numIndex>         
    <numIndex index="1">
          <numIndex index="0">Year first</numIndex>
          <numIndex index="1">year,title,author</numIndex>
    </numIndex>
    <numIndex index="2">
        <numIndex index="0">Author first</numIndex>
        <numIndex index="1">author,year,title</numIndex>
    </numIndex>
    </items>
    </config>
</TCEforms>
</settings.orderBy>
                <!-- end of settings -->
            </el>
        </ROOT>
    </sDEF>
</sheets>
</T3DataStructure>

My problem is that the first entries in the dropdown menu in the backend are

1. [INVALID VALUE ("author")][author]
2. [INVALID VALUE ("title")][title]
3. [INVALID VALUE ("year")][year]

then the other options follow as expected.


回答1:


Documentation about "items" array in "select" type about the second value says:

Values must not contain “,” (comma) and “|” (vertical bar). If you want to use “authMode” you should also refrain from using “:” (colon).

https://docs.typo3.org/m/typo3/reference-tca/9.5/en-us/ColumnsConfig/Type/Select.html#items

It means you should probably use a different separator for those values to avoid the issue you're facing.



来源:https://stackoverflow.com/questions/59756774/typo3-flexform-options-show-invalid-values-in-backend

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!