Bug #22655

typolink creates incomplete links in combination with the forceAbsoluteUrl property

Added by Oliver Hader over 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2010-05-15
Due date:
% Done:

0%

TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The typolink method creates invalid/incomplete links by using the forceAbsoluteUrl property.
The absolute part and scheme are missing if
  • the page is not visible/accessible and config.typolinkLinkAccessRestrictedPages is used
  • a file resource is linked (e.g. "fileadmin/whatever.gif")
  • an absolute local URL is linked (e.g. "/")

The forceAbsoluteUrl should consider also these parts. The attached TypoScript demonstrates the different behaviours for forced absolute URLs and the regular disposal.

page = PAGE
page {
  dokType = 0
  10 = COA
  10 {
    5 = TEXT
    5.value = FORCED ABSOLUTE URL:
    10 = TEXT
    10 {
      typolink {
        parameter.data = page:uid
        forceAbsoluteUrl = 1
        forceAbsoluteUrl.scheme = https
        returnLast = url
      }
      wrap = [|],
    }
    20 < .10
    20.typolink.parameter >
    20.typolink.parameter = /
    30 < .20
    30.typolink.parameter = fileadmin/files/ortsplan.pdf
  }
  20 < .10
  20.5.value = REGULAR:
  20.10.typolink.forceAbsoluteUrl >
}

(issue imported from #M14392)

0014392.patch View (2.39 KB) Administrator Admin, 2010-05-26 17:08

0014392.txt View (1.12 KB) Administrator Admin, 2010-05-26 17:08


Related issues

Related to TYPO3 Core - Bug #21053: Support for SSL and absolute Links Closed 2009-09-14
Related to TYPO3 Core - Bug #48529: typolink cannot create absolute links to local files even if forceAbsoluteUrl property is set Closed 2013-05-25
Related to TYPO3 Core - Bug #60545: typolink to file with forceAbsoluteUrl does not consider subfolder of instance Closed 2014-07-24

History

#1 Updated by Oliver Hader over 9 years ago

Committed to SVN Trunk (rev. 7758)

#2 Updated by Susanne Moog almost 9 years ago

  • Target version deleted (4.4.0)

Also available in: Atom PDF