Feature #53827

Deprecate base tag

Added by Bastian Waidelich over 1 year ago. Updated over 1 year ago.

Status:Resolved Start date:2013-11-21
Priority:Should have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:MVC - Routing
Target version:-
PHP Version: Complexity:
Has patch:No

Description

Currently the UriBuilder creates relative URLs in the form landing-page/sub-page.html by default.
This requires the presence of a <base /> tag in the HTML head in order to be resolved correctly when the browser is currently on a page other than the homepage.

By prefixing relative URLs with the script request path the base tag would no longer be required.

In general we should think about creating absolute URLs by default (see http://yoast.com/relative-urls-issues/)

Associated revisions

Revision 5d1a49f7
Added by Bastian Waidelich over 1 year ago

[!!!][FEATURE] Deprecated base tag

Currently the ``UriBuilder`` creates relative URLs with relative paths
in the form "some/path.html" by default.
This change adjusts the ``UriBuilder`` to prefix URLs with the scripts
request path (usually "/" or "/document-root/").

This makes the ``<base />`` tag redundant for most scenarios, even
when working with relative URLs.

This is not a breaking change per se, because using the base tag
doesn't break the behavior. But it has an impact on all relative URLs
created by the ``UriBuilder``.

If you expect the rendered HTML to contain URLs in the form
"some/path.html" (that is: without leading slash) you might need to
adjust your code or set the compatibilty flag that is introduced with
this change::

TYPO3:
Flow:
compatibility:
uriBuilder:
createRelativePaths: TRUE

NOTE: This flag will be deprecated with version 2.2 and removed with
version 3.0 of Flow. It's recommended to adjust your code so that it
does not rely on the generated URLs

Change-Id: I2d68e4b22a23afebe0c9dfcf55342b2304e9be9a
Resolves: #53827
Releases: master

History

#1 Updated by Gerrit Code Review over 1 year ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/25642

#2 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/25642

#3 Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/25642

#4 Updated by Bastian Waidelich over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF