Issue Bug Closed

#58615$data['media'] contains not allways the path to files in ContentObjectRenderer

Kurt Gusbeth 05/07/14, 23:20 updated 07/19/14, 23:08

Description

I have noticed that some people have problems with menues, that shows media-images:
http://blog.ingeniumdesign.de/2014/03/30/typo3-6-2-probleme-mit-ressourcen-media-auslesen/
http://www.typo3.net/forum/thematik/zeige/thema/117979/
This menu doesn´t work for Typo3 projects that were updated from Typo3 4.x to 6.2
(it works with fresh/new Typo3 projects and with older Typo3 versions):

lib.abstract = HMENU
lib.abstract {
  special = directory
  excludeDoktypes = 4
  1 = TMENU
  1 {
  wrap = |
    NO {
      allWrap = <div class="abstract_div">|</div>
      stdWrap.htmlSpecialChars = 0
      ATagTitle.field = subtitle // title
      ATagParams = class="abstract"
      ATagTitle.field = subtitle // abstract 

      stdWrap.cObject = COA
      stdWrap.cObject {
        5 = IMAGE
        5.file {
          import.field = media
          import = uploads/media/ 
          import.listNum = 0
        }

        10 = TEXT
        10.field = title
        10.stdWrap.htmlSpecialChars = 1
        10.wrap = <div class="bold">|</div>

        20 = TEXT
        20.field = subtitle
        20.wrap = <div class="italic">|</div>
      }
    }
  }
}

The reason: $data[‘media’] contains here the integer value from the table “pages” and the field media function start($data, $table = ‘’)

Normally $data[‘media’] contains the path to all images of the media-field,
but in updated Typo3 projects $data[‘media’] contains the pure integer value.
That breaks the menue!

Reviews 0

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