Project

General

Profile

Actions

Bug #58615

closed

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

Added by Kurt Gusbeth about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2014-05-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:

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":
/typo3/systext/frontend/Classes/ContentObject/ContentObjectRenderer.php
public 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!

Actions

Also available in: Atom PDF