Issue Bug Under Review Stale

#58705data-type-gettext-file inside FILES renderObj GIFBUILDER

Christian Stern 05/12/14, 08:16 updated 08/08/26, 22:44

Description

Is it a normal behavior that data-type-gettext-file is not accessible inside the following structure?

uid:46 is a valid image file.

page >
page = PAGE

page.10 = FILES
page.10 {
  files = 46

  renderObj = IMAGE
  renderObj.file = GIFBUILDER
  renderObj.file.XY = 400,400
  renderObj.file.10 = IMAGE
  renderObj.file.10.file {
    import.data = file:current:publicUrl
    width = 400c
    height = 400c
  }
}

Save publicUrl to a register to access it later works:

page.20 = FILES
page.20 {
  files = 46

  renderObj = COA
  renderObj {
    1 = LOAD_REGISTER
    1.publicUrl.cObject = TEXT
    1.publicUrl.cObject.data = file:current:publicUrl

    10 = IMAGE
    10 {
      file = GIFBUILDER
      file {
        XY = 400,400

        10 = IMAGE
        10.file {
          import.data = REGISTER:publicUrl
          width = 400c
          height = 400c
        }
      }
    }
  }
}

Reviews 1

History 1011

  1. Alexander Opitz commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2014-12-22T15:50:14+00:00" > 12/22/14, 15:50 </span>

    Does following help?

    10 = FILES
    10 {
        files = 46
        renderObj = IMAGE
        renderObj {
            file.import.data = file:current:publicUrl
            file.height = 400c
            file.width  = 400c
        }
    }
  2. Michiel Roos commented <span data-processor="relativetime" data-value="2014-12-22T16:02:13+00:00" > 12/22/14, 16:02 </span>

    Some times a client wants to apply a mask. For which GIFBUILDER is perfect.

                stdWrap.cObject = FILES
                stdWrap.cObject {
                    references {
                        table = tt_news
                        uid.data = GP:tx_ttnews|tt_news
                        fieldName = tx_falttnews_fal_images
                    }
                    begin = 0
                    maxItems = 1
                    renderObj = COA
                    renderObj {
                        10 = LOAD_REGISTER
                        10.importUrl.data = file:current:publicUrl
                        20 = IMAGE
                        20 {
                            file = GIFBUILDER
                            file {
                                XY = 300,168
                                transparentColor = #000000
                                backColor = #000000
    
                                20 = IMAGE
                                20.file = GIFBUILDER
                                20.file {
                                    XY = 300,168
                                    backColor = #ffffff
                                    10 = IMAGE
                                    10.file {
                                        import.data = register:importUrl
                                        import.listNum = 0
                                        width = 300c
                                        height = 168c
                                        offset = 0,0
                                    }
                                }
                                20.mask = fileadmin/site/geloven/images/mask-artikel-listview.png
                            }
                        }
                        30 = RESTORE_REGISTER
                    }
                }
  3. Michiel Roos commented <span data-processor="relativetime" data-value="2014-12-22T16:30:29+00:00" > 12/22/14, 16:30 </span>

    This does NOT work:

                stdWrap.cObject = IMAGE
                stdWrap.cObject {
                    file = GIFBUILDER
                    file {
                        XY = 300,168
                        transparentColor = #000000
                        backColor = #000000
    
                        20 = IMAGE
                        20.file = GIFBUILDER
                        20.file {
                            XY = 300,168
                            backColor = #ffffff
                            10 = FILES
                            10 {
                                references {
                                    table = tt_news
                                    uid.data = GP:tx_ttnews|tt_news
                                    fieldName = tx_falttnews_fal_images
                                }
    
                                begin = 0
                                maxItems = 1
                                renderObj = IMAGE
                                renderObj {
                                    file {
                                        import.data = file:current:publicUrl
                                        import.listNum = 0
                                        width = 300c
                                        height = 168c
                                        offset = 0,0
                                    }
                                }
                            }
                        }
    
                        20.mask = fileadmin/site/geloven/images/mask-artikel-listview.png
                    }
                }
  4. Christian Hellmuth commented <span data-processor="relativetime" data-value="2015-04-04T13:19:34+00:00" > 04/04/15, 13:19 </span>

    I can confirm this. file:current:publicUrl is not accessible from within a GIFBUILDER object in TYPO3 CMS 6.2.11.

  5. Alexander Opitz commented and changed priority -- undefined -- Could have <span data-processor="relativetime" data-value="2015-07-06T11:24:00+00:00" > 07/06/15, 11:24 </span>

    IMHO there was a fix in 6.2.12 or .13.

    can you please retest with latest (6.2.14) and report back if there is still an issue?

  6. Alexander Opitz commented and changed status Needs Feedback Closed <span data-processor="relativetime" data-value="2015-10-27T14:34:36+00:00" > 10/27/15, 14:34 </span>

    No feedback within the last 90 days => closing this issue.

    If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

  7. Benjamin Robinson commented <span data-processor="relativetime" data-value="2017-11-21T13:49:56+00:00" > 11/21/17, 13:49 </span>

    I can confirm that this issue still exists in TYPO3 CMS 8.7.8.

  8. Alexander Opitz commented and changed status Closed Needs Feedback <span data-processor="relativetime" data-value="2017-11-21T16:08:34+00:00" > 11/21/17, 16:08 </span>

    Please provide the TypoScript which have that issues.

  9. Benjamin Robinson commented <span data-processor="relativetime" data-value="2017-11-21T17:18:25+00:00" > 11/21/17, 17:18 </span>

    This does not work:

    10 < styles.content.get
    10{
        renderObj = FILES
        renderObj{
            references.fieldName = assets
            renderObj = COA
            renderObj {
                10 = LOAD_REGISTER
                10.importUrl.data = file:current:publicUrl
                # "Register" wird wegen Bug https://forge.typo3.org/issues/58705 benötigt
                20 = IMAGE
                20{
                    file = GIFBUILDER
                    file{
                        XY = 100,100
                        10 = IMAGE
                        10.file.import.data = file:current:publicUrl
                        #WORKAROUND: 10.file.import.data = register:importUrl
                        20 = IMAGE
                        20.file = EXT:user_site/Resources/Public/Images/Mask.png
                    }
                }
            }
        }
    }

    With …

    10.file.import.data = register:importUrl

    … it works.

  10. Alexander Opitz commented and changed status Needs Feedback New <span data-processor="relativetime" data-value="2017-11-21T17:59:53+00:00" > 11/21/17, 17:59 </span>

    Only as a side node:

    file:current:publicUrl is IMHO false here, publicUrl is the Url of the FAL media which the browser should call to get the media, but you want that the image should be processed.

    So correct would be

    10.file.import.data = file:current:originalUid

    or

    10.file.import.data = file:current:uid

    Depending if current is a FAL object or a FAL reference.
    But this is independent of the issue here.