0
votes

I'm installing an existing TYPO3 project. After a lot of trying, we managed to get the typo3 backend ready. However, when I go to the website I always get this error message. This probably has something to do with the multilingualism of the website and with the realurl extension.

enter image description here

composer.json (at root /var/www/html/typo3)

{
    "repositories": [{
            "type": "composer",
            "url": "https://composer.typo3.org/"
        },
        {
            "type": "package",
            "package": {
                "name": "Bm/ah-contentapi",
                "version": "0.0.1",
                "type": "typo3-cms-extension",
                "source": {
                    "url": "https://[email protected]/comp/ah_config_typo3.git",
                    "type": "git",
                    "reference": "master"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "Bm/ah-contentelements",
                "version": "0.0.1",
                "type": "typo3-cms-extension",
                "source": {
                    "url": "https://[email protected]/comp/ah_contentelements_typo3.git",
                    "type": "git",
                    "reference": "master"
                }
            }
        }
    ],
    "name": "typo3/cms-base-distribution",
    "description": "TYPO3 CMS Base Distribution",
    "license": "GPL-2.0-or-later",
    "require": {
        "helhum/typo3-console": "^4.9.3 || ^5.2",
        "typo3/cms-about": "^8.7.10",
        "typo3/cms-belog": "^8.7.10",
        "typo3/cms-beuser": "^8.7.10",
        "typo3/cms-context-help": "^8.7.10",
        "typo3/cms-documentation": "^8.7.10",
        "typo3/cms-felogin": "^8.7.10",
        "typo3/cms-fluid-styled-content": "^8.7.10",
        "typo3/cms-form": "^8.7.10",
        "typo3/cms-func": "^8.7.10",
        "typo3/cms-impexp": "^8.7.10",
        "typo3/cms-info": "^8.7.10",
        "typo3/cms-info-pagetsconfig": "^8.7.10",
        "typo3/cms-rte-ckeditor": "^8.7.10",
        "typo3/cms-setup": "^8.7.10",
        "typo3/cms-sys-note": "^8.7.10",
        "typo3/cms-t3editor": "^8.7.10",
        "typo3/cms-tstemplate": "^8.7.10",
        "typo3/cms-viewpage": "^8.7.10",
        "typo3/cms-wizard-crpages": "^8.7.10",
        "typo3/cms-wizard-sortpages": "^8.7.10",
        "typo3/cms": "^8.7",
        "dmitryd/typo3-realurl": "2.*",
        "GridElementsTeam/Gridelements": "8.2.*",
        "clickstorm/cs_seo": "3.*",
        "Bm/ah-contentapi": "0.0.1",
        "Bm/ah-contentelements": "0.0.1"
    },
    "scripts": {
        "typo3-cms-scripts": [
            "typo3cms install:fixfolderstructure",
            "typo3cms install:generatepackagestates"
        ],
        "post-autoload-dump": [
            "@typo3-cms-scripts"
        ]
    },
    "extra": {
        "typo3/cms": {
            "web-dir": "public"
        },
        "helhum/typo3-console": {
            "comment": "This option is not needed ay more for helhum/typo3-console 5.x",
            "install-extension-dummy": false
        }
    },
    "autoload": {
        "psr-4": {
            "Bm\\AhContentelements\\": "public/typo3conf/ext/ah_contentelements/Classes",
            "Bm\\AhContentapi\\": "public/typo3conf/ext/ah_contentapi/Classes"
        }
    }
}

realurl_autoconf.php at location: /var/www/html/typo3/public/typo3conf/ext/ah_contentapi

<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array(
    '_DEFAULT' => array(
        'init' =>
            array(
                'appendMissingSlash' => 'ifNotFile,redirect',
                'emptyUrlReturnValue' => '/',
            ),
        'pagePath' =>
            array(
                'rootpage_id' => '1',
            ),
        'fileName' =>
            array(
                'defaultToHTMLsuffixOnPrev' => 0,
                'acceptHTMLsuffix' => 0,
                'index' =>
                    array(
                        'print' =>
                            array(
                                'keyValues' =>
                                    array(
                                        'type' => 98,
                                    ),
                            ),
                    ),
            ),
        'postVarSets' => array(
            '_DEFAULT' => array(
                'api' => array(
                    array(
                        'GETvar' => 'tx_ahcontentapi_api[type]',
                        'valueMap' => array(
                            'json' => 'json',
                        ),
                    ),
                    array(
                        'GETvar' => 'tx_ahcontentapi_api[controller]',
                        'valueMap' => array(
                            'pages' => 'Pages',
                        ),
                    ),
                    array(
                        'GETvar' => 'tx_ahcontentapi_api[action]',
                    ),
                    array(
                        'GETvar' => 'tx_ahcontentapi_api[uid]'
                    ),
                ),
            ),
        ),
    ),
);

realurl extension conf:

enter image description here

1
as @Johannes-Nielsen wrote: what is your realurl configuration file? the active configuration file is decided in the extension configuration (in the extension manager). the default value is typo3conf/realurl_autoconf.php. you might change it to PHP-format and use such a file from your site extension e.g. typo3conf/ext/site_extension/Configuration/realurl_conf.phpBernd Wilke πφ
I found the realurl_autoconf.php file. It was placed at /var/www/html/typo3/public/typo3conf/ext/ah_contentapisg_sg94
@BerndWilkeπφ is this a fault in my composer.json?sg_sg94
that probably has nothing to do with composer. the error message is a typical error of realurl when the language coding in the url path is faulty. so we should concentrate on the realurl config. Are you sure this file is configured to use with realurl? (it should not be named with anything auto)Bernd Wilke πφ
I don't have any realurl_conf.php in the project.. I uploaded a picture with all the files in the ext/realurl directory..sg_sg94

1 Answers

0
votes

as you have multiple realurl files it is important to know which one is used.

enter image description here in the TYPO3 BackEnd go to the extension manager module, (1) filter for 'realurl' (2) and enter the configuration for the extension (3).

then have a view to the configuration: enter image description here in the first field (Path to configuration file / basic.configFile (string)) you find the active file.

for a better readability you should select "PHP source (slow)" in the field Automatic configuration file format/ basic.autoConfFormat (options) (it is not noticable slower).

Please show that active realurl config file.