Bug #86067

TypoLink generation does not respect language settings

Added by Benjamin Kott about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
Start date:
2018-08-31
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Variant 1: Language Menu Processor

1. Create Site
2. Add Languages
3. Add Page
4. Translate Page
5. View Debug Information in Template for `languagenavigation`

10 = FLUIDTEMPLATE
10 {
    templateName = TEXT
    templateName {
        cObject = TEXT
        cObject {
            data = pagelayout
            required = 1
            case = uppercamelcase
            split {
                token = pagets__
                cObjNum = 1
                1.current = 1
            }
        }
        ifEmpty = Default
    }
    templateRootPaths {
        0 = EXT:extension/Resources/Private/Templates/Page/
    }
    partialRootPaths {
        0 = EXT:extension/Resources/Private/Partials/Page/
    }
    layoutRootPaths {
        0 = EXT:extension/Resources/Private/Layouts/Page/
    }
    dataProcessing {
        10 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
        10 {
            languages = auto
            as = languagenavigation
        }
    }
}

Variant 2: TypoScript Language Menu

1. Create Site
2. Add Languages
3. Add Page
4. Translate Page
5. Render TypoScript Language Menu

page.15 = HMENU
page.15 {
    special = language
    special.value = auto
    wrap = <ul>|</ul>
    1 = TMENU
    1 {
        NO = 1
          NO.linkWrap  = <li>|</li>
    }
}

Variant 3: TypoLink

1. Create Site
2. Add Languages
3. Add Page
4. Translate Page
5. Render Link to current page in different language

page.20 = TEXT
page.20 {
  typolink.parameter.data = page:uid
  typolink.additionalParams = &L=1
}

Related issues

Related to TYPO3 Core - Task #86058: Streamline page language linking Closed 2018-08-31
Related to TYPO3 Core - Bug #86242: "Hide page in default language" broken for pages without a site configuration Closed 2018-09-13

Associated revisions

Revision ba4495a7 (diff)
Added by Benni Mack about 1 year ago

[BUGFIX] Allow page links to different languages within a site

Due to the refactoring process within links to a site, it is still
necessary to link to a translated page with a given "&L=" parameter.
This parameter is resolved, and a link to a page translation
is generated.

Fixes menu generation and typolink with the generated page title.

Resolves: #86067
Releases: master
Change-Id: I3e1208a2cdb438c68d4ed3dac1d0274ce07395dc
Reviewed-on: https://review.typo3.org/58108
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Tested-by: TYPO3com <>
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>

History

#1 Updated by Benjamin Kott about 1 year ago

Expected Results:
Generated Links are pointing to the page in a different language.

#3 Updated by Frans Saris about 1 year ago

As far that I understood; with the new site configuration using typoscript like:

 typolink.additionalParams = &L=1

Isn't supported anymore. You now should use:

 typolink.language = 1

If you don't have a site configuration (pseudo site/fallback) then the old way should still work after some changes that were merged today.

#4 Updated by Frans Saris about 1 year ago

  • Related to Task #86058: Streamline page language linking added

#5 Updated by Frans Saris about 1 year ago

See #86058 for instance

#6 Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

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

#7 Updated by Gerrit Code Review about 1 year ago

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

#8 Updated by Gerrit Code Review about 1 year ago

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

#9 Updated by Gerrit Code Review about 1 year ago

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

#10 Updated by Gerrit Code Review about 1 year ago

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

#11 Updated by Gerrit Code Review about 1 year ago

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

#12 Updated by Gerrit Code Review about 1 year ago

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

#13 Updated by Gerrit Code Review about 1 year ago

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

#14 Updated by Christian Kuhn about 1 year ago

testing set 8, the language meno from variant 2 in a translated page does not work.

reproduce:
- create 'is_siteroot' page called "test"
- create a site config with / as base and 2 additional languages (danish/da and german/de in my case)
- create a root template on "test" page with the TS from above variant 2
- create a page below "test" root page called "congrats", unhide, have /congrats as slug
- create the two page translations, unhide them, have 2 slugs for them
- call FE with http://domain/congrats - works and properly links to the languages with an url like "http://domain/da/tranlate-to-da-congrats" and "http://domain/da/tranlate-to-de-congrats"
- call FE with http://domain/da/tranlate-to-da-congrats - the links to the 'default' and 'other' language are wrong, they just link to "http://domain/da/tranlate-to-da-congrats", too.

#15 Updated by Gerrit Code Review about 1 year ago

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

#16 Updated by Gerrit Code Review about 1 year ago

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

#17 Updated by Gerrit Code Review about 1 year ago

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

#18 Updated by Gerrit Code Review about 1 year ago

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

#19 Updated by Benni Mack about 1 year ago

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

#20 Updated by Daniel Goerz about 1 year ago

  • Related to Bug #86242: "Hide page in default language" broken for pages without a site configuration added

#21 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF