Project

General

Profile

Actions

Bug #45426

closed

tslib_content_Media does not clean up $conf['file.'] after extracting video from url

Added by Michiel Roos almost 12 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2013-02-13
Due date:
% Done:

0%

Estimated time:
0.10 h
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

When a url is passed to a MEDIA object, a proper url is extracted. This will make sure a youtube url is correctly rewritten. The result of the cleaning action is written to $conf['file'].

When an url is passend in through $conf['file.'] and the url is cleaned, the result is written to $conf['file'] but the original $conf['file.'] is left untouched.

When the conf object is passed onto SWFOBJECT for final rendering, the first property that is checked is the dirty $conf['file.'] and not the clean $conf['file'].

Currently this prevents proper rendering of a video when using a 'file.' object to render a video url.

The solution is to unset $conf['file.'] after $conf['file'] has been set.

Steps to reproduce:
Create a clean page (with css styled content) with the following TS setup:

page = PAGE
page.5 < tt_content.media.20
page.5 {
  file = http://www.youtube.com/watch?v=0IJoKuTlvuM
  forcePlayer = 0
  params.allowFullScreen = true
}

page.10 < tt_content.media.20
page.10 {
  file = http://www.youtube.com/watch?v=0IJoKuTlvuM
  file.noTrimWrap = | | |
  forcePlayer = 0
  params.allowFullScreen = true
}

You will be presented with one working video and one broken video.

I would like the following to work:

page.10 = COA
page.10 {
  10 = CONTENT
  10 {
    table = tx_wowfe_domain_model_movie
    select {
      selectFields = tx_wowfe_domain_model_movie.url as url
      pidInList.data = {TSFE:id}
      join = tx_wowfe_page_movie_mm ON (tx_wowfe_domain_model_movie.uid = tx_wowfe_page_movie_mm.uid_foreign) JOIN pages ON (pages.uid = tx_wowfe_page_movie_mm.uid_local)
      andWhere.dataWrap = pages.uid = {TSFE:id}
    }
    renderObj < tt_content.media.20
    renderObj {
      file.field = url
      forcePlayer = 0
      forcePlayer = 0
      params.allowFullScreen = true
    }
  }
}


Files

media_element_conf_file.patch (10.8 KB) media_element_conf_file.patch Michiel Roos, 2013-02-13 08:47
Actions

Also available in: Atom PDF