Issue Bug Closed

#58931Incorrect entries in table sys_refindex pointing always to table sys_file

Dirk Rauscher 05/19/14, 16:20 updated 09/02/16, 22:09

Description

We are using a templavoila FCE which has a field for a link.
If selecting a link to a page(eg.123) a record is written into table sys_refindex.
But instead of referencing the selected page the record links to the table sys_file.
This happens if there are an entries in the tables “pages” and “sys_file” of the same uid (e.g. 123).
That leads to the unability of deleting this “accidently” referenced file because Typo3 assumes them to be still in use.

We digged into that behaviour and found the method TYPO3\CMS\Core\Database\ReferenceIndex:getRelations_procDB is most likely responsible for that.

This is our templavoila TO.

<field_link type="array">
   <tx_templavoila type="array">
      <title>Link</title>
      <sample_data type="array">
         <numIndex index="0"></numIndex>
      </sample_data>
      <eType>link</eType>
      <TypoScript><![CDATA[
         10 = TEXT
         10.field = field_label
         10.htmlSpecialChars = 1
         10.typolink.parameter.current = 1
      ]]></TypoScript>
      <proc type="array">
         <int>0</int>
     <HSC>0</HSC>
     <stdWrap></stdWrap>
      </proc>
      <preview></preview>
   </tx_templavoila>
   <TCEforms type="array">
      <label>Link</label>
      <config type="array">
         <type>input</type>
     <size>30</size>
     <max>256</max>
     <checkbox></checkbox>
     <eval>trim</eval>
     <wizards type="array">
        <_PADDING type="integer">2</_PADDING>
            <link type="array">
          <type>popup</type>
          <title>Link-Seite</title>
              <icon>link_popup.gif</icon>
              <script>browse_links.php?mode=wizard</script>
              <JSopenParams>height=300,width=500,status=0,menubar=0,scrollbars=1</JSopenParams>
            </link>
         </wizards>
      </config>
   </TCEforms>
</field_link>

Reviews 0

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