GithubHelp home page GithubHelp logo

Comments (8)

dmitryd avatar dmitryd commented on June 3, 2024

The link to the root page contains the title of the root page, meaning I have:

It mean that it is not a root page but a page below the root page. Most likely you have a shortcut from root to this page.

"Exclude from speaking URL" does not work for the last segment. It works only for segments before the last. Otherwise it would not be possible to distinguish between the last segment and its parent page.

For the language problem, I suggest to check & clear URL cache entries and try again.

from typo3-realurl.

merzilla avatar merzilla commented on June 3, 2024

Thanks for the quick advises. Clearing cache did not help, also truncated the realurl tables manually.

This is my page tree:
bildschirmfoto 2016-03-07 um 15 35 31

There is no shortcut. The page "websites" was a menu separator, but according to (just closed) #54 I chose doctype sysfolder now. But still same behavior.

In frontend it generates "mydomain.tld/home-page" for L=0. The subpages "Produkte, etc.." do not include "home-page".
What we also do: In htaccess we force URLs without "/de/" to be redirected to with "/de/".

As default L ist not set, this leads to an error for the home page. So "/de/home-page/" leads to this error:
"Reason: Segment "home-page" was not a keyword for a postVarSet as expected on page with id=3."
Whereas the links like "/produkte" are redirected to "/de/produkte/" and this works.

I´ve updated from 1.x to 2.x with the given advices: First altered tables, then update code, then DB compare etc. The realurl_configuration was adapted from autoconf, but the right valueMap for GETvar L has been set.

Thanks for giving more hints what could be the problem. Should I provide more information?

from typo3-realurl.

dmitryd avatar dmitryd commented on June 3, 2024
  1. Check that Websites does not have the following flag set: Use as Root Page. This checkbox should be cleared there:
    rottpage
  2. Check that Home page has this flag set or has a domain record.

It looks like realurl is unable to find a proper root page id for your site. You can also check that in Systems > Configuration:

rootpage2

I believe in your case it is either incorrect or missing.

from typo3-realurl.

merzilla avatar merzilla commented on June 3, 2024

It´s really strange. I even checked in table "pages" that "home page" is the only page with "is_siteroot = 1" flag set.
In TYPO3_CONF_VARS the right rootpage_id = 3 is set.

This is the realurl_conf.php file:

<?php
// add domain and rootpage UID here
$configureDomains = array(
        '_DEFAULT' => 3,
        'mydomain.tld' => 3
);

foreach ($configureDomains as $configureDomain => $rootpageId) {
    $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$configureDomain] = array(
/*
            'cache' => array(
                    'disable' => true,
            ),
*/
            'init' =>
                    array(
                            'appendMissingSlash' => 'ifNotFile,redirect',
                            'emptyUrlReturnValue' => '',
                    ),
            'pagePath' =>
                    array(
                            'rootpage_id' => $rootpageId,
                    ),
            'fileName' =>
                    array(
                            'defaultToHTMLsuffixOnPrev' => 0,
                            'acceptHTMLsuffix' => 1,
                            'index' =>
                                    array(
                                            'print' =>
                                                    array(
                                                            'keyValues' =>
                                                                    array(
                                                                            'type' => 98,
                                                                    ),
                                                    ),
                                            'robots.txt' => array(
                                                    'keyValues' => array(
                                                            'type' => 201
                                                    )
                                            )
                                    ),
                    ),
            'preVars' =>
                    array(
                            0 =>
                                    array(
                                            'GETvar' => 'L',
                                            'valueMap' =>
                                                    array(
                                                            'de' => 0,
                                                            'en' => 1,
                                                            'fr' => 2
                                                    ),
                                            'valueDefault' => 'de'
                                    ),
                    ),
            'postVarSets' =>
                    array(
                            '_DEFAULT' =>
                                    array(
                                            'article' =>
                                                    array(
                                                            array(
                                                                    'GETvar' => 'tx_news_pi1[action]',
                                                            ),
                                                            array(
                                                                    'GETvar' => 'tx_news_pi1[controller]',
                                                            ),
                                                            array(
                                                                    'GETvar' => 'tx_news_pi1[news]',
                                                                    'lookUpTable' =>
                                                                            array(
                                                                                    'table' => 'tx_news_domain_model_news',
                                                                                    'id_field' => 'uid',
                                                                                    'alias_field' => 'title',
                                                                                    'useUniqueCache' => 1,
                                                                                    'useUniqueCache_conf' =>
                                                                                            array(
                                                                                                    'strtolower' => 1,
                                                                                                    'spaceCharacter' => '-',
                                                                                            ),
                                                                            ),
                                                            ),
                                                    ),
                                    ),
                    ),
    );
}

In TypoScript is:

config {
    sys_language_uid = 0
    language = de
    defaultGetVars {
        L = 0
    }
    locale_all = de_CH.UTF-8

  //.....

   [globalVar = GP:L = 1]
    config.linkVars = L
    config.sys_language_uid = 1
    config.language = en
    config.locale_all = en_EN.utf8
[global]

[globalVar = GP:L = 2]
    config.linkVars = L
    config.sys_language_uid = 2
    config.language = fr
    config.locale_all = fr_FR.utf8
[global]
}

Any hints how I can do more debugging etc?

from typo3-realurl.

dmitryd avatar dmitryd commented on June 3, 2024

config.linkVars = L must be global. Otherwise you will not get it in the url automatically. Now it is configred to be there only for L=1 and L=2, which does not make much sense because it will be there anyway. However if you make links like:

typolink {
  parameter = 5
  additionalParams = &x=y
}

than you will not have L=0 (and /en/ in realurl) in the link because config.linkVars is not set.

Let's fix that first. Please, remove it from conditions and move to global scope.

from typo3-realurl.

merzilla avatar merzilla commented on June 3, 2024

Oh my! Yes! config.linkVars was not in global scope for default language. Damn... so sorry for that. The project was "reconfigured" and i guess due to a copy-paste error this was missed.

Now "de" is in path by default. Great!
What is still not working is the "home page". E.g. the logo of the homepage is an image that is linked with typolink to typolink.parameter = 3
But it renders http://mydomain.tld/de/home-page/ now.

What I would need is http://mydomain.tld/de/

from typo3-realurl.

dmitryd avatar dmitryd commented on June 3, 2024

Fix should be in 2.0.5 😄

from typo3-realurl.

merzilla avatar merzilla commented on June 3, 2024

Hi Dmitry,

thank you very much for the fast bugfix. I can confirm that the link to the "home page" is now correct.

Greets
Ralf

from typo3-realurl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.