Issue Bug Closed

#108389Typoscript Object FILES returns hidden files

Bernhard Eckl 12/03/25, 13:16 updated 01/23/26, 21:18

Description

I have an image loaded via FILES:

      image_stringS = FILES
      image_stringS {
        references {
          table = fe_users
          uid.field = uid
          fieldName = image
          maxItems = 1
        }
        renderObj = TEXT
        renderObj {
          data = file:current:uid
        }
        maxItems = 1
        begin = 0
      }

The problem is that it returns the uid of the file reference even if the file reference is hidden. This leads to an error when using it in an image viewhelper:
<f:image src="{document.fields.image_stringS}" treatidasreference="1" alt="{document.title}" width="100" maxwidth="100" class="avatar"></f:image>

Reviews 0

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

History 1

  1. Benni Mack commented and changed status New Closed <span data-processor="relativetime" data-value="2026-01-23T21:18:43+00:00" > 01/23/26, 21:18 </span>

    Tested this in a regular setup on a plain regular frontend with the following code:

    page.1 = COA
    page.1 {
      10 = TEXT
      10.value = <h2>Heyyho</h2>
      20 = FILES
      20 {
              references {
              table = tt_content
              uid = 132
              fieldName = image
              maxItems = 1
            }
            renderObj = TEXT
            renderObj {
              data = file:current:title
              wrap = <br>
            }
            begin = 
      }
    }

    However, the hidden element was shown when I had admin panel (= show hidden records) enabled.

    Looking at the code, it seems you use solr, and solr is run from CLI / Backend. This is when Solr does not simulate frontend properly. I assume you should either contact EXT:solr maintainers or update your extension and core.

    Closing this issue now. If you feel, this is a core issue, feel free to contact me directly, and I will open up the ticket again.