TYPO3 Blog Extension - RealURL Konfiguration

RealURL ist an sich eine super Erweiterung, in manchen Fällen sorgt sie aber für graue Haare, so auch bei der TYPO3 Blog Extension (blog), was jedoch weniger an RealURL als an der - zumindest zum jetzigen Stand - etwas dürftigen Dokumentation der Blog-Extension liegt.

Lange Rede, kurzer Sinn, nachfolgend die benötigten Parts in der RealURL-Konfiguration:

postVarSets:

  'postVarSets' => array(
            '_DEFAULT' => array(
                'tx_blog_feed' => array(
                    array(
                        'GETvar' => 'tx_blog_posts[controller]',
                        'valueMap' => array(
                            'posts' => 'Post',
                        )
                    ),
                    array(
                        'GETvar' => 'tx_blog_posts[action]',
                        'valueMap' => array(
                            'recent' => 'listRecentPosts',
                        )
                    ),
                    array(
                        'GETvar' => 'tx_blog_posts[format]',
                    ),
                ),
                'tx_blog_category' => array(
                    array(
                        'GETvar' => 'tx_blog_category[action]',
                        'noMatch' => 'bypass'
                    ),
                    array(
                        'GETvar' => 'tx_blog_category[controller]',
                        'noMatch' => 'bypass'
                    )
                ),
                'tx_blog_authorposts' => array(
                    array(
                        'GETvar' => 'tx_blog_authorposts[action]',
                        'noMatch' => 'bypass'
                    ),
                    array(
                        'GETvar' => 'tx_blog_authorposts[controller]',
                        'noMatch' => 'bypass'
                    )
                ),
                'tx_blog_tag' => array(
                    array(
                        'GETvar' => 'tx_blog_tag[action]',
                        'noMatch' => 'bypass'
                    ),
                    array(
                        'GETvar' => 'tx_blog_tag[controller]',
                        'noMatch' => 'bypass'
                    )
                ),
                'tx_blog_archive' => array(
                    array(
                        'GETvar' => 'tx_blog_archive[action]',
                        'noMatch' => 'bypass'
                    ),
                    array(
                        'GETvar' => 'tx_blog_archive[controller]',
                        'noMatch' => 'bypass'
                    )
                ),
            )
        ),

fixedPostVars:

'fixedPostVars' => array(
            'tx_blog_tag' => array(
                array(
                    'GETvar' => 'tx_blog_tag[tag]',
                    'lookUpTable' => array(
                        'table' => 'tx_blog_domain_model_tag',
                        'id_field' => 'uid',
                        'alias_field' => 'title',
                        'useUniqueCache' => 1,
                        'useUniqueCache_conf' => array(
                            'strtolower' => 1,
                            'spaceCharacter' => '-',
                        ),
                        'noMatch' => 'bypass',
                    ),
                ),
            ),
            'tx_blog_category' => array(
                array(
                    'GETvar' => 'tx_blog_category[category]',
                    'lookUpTable' => array(
                        'table' => 'sys_category',
                        'id_field' => 'uid',
                        'alias_field' => 'title',
                        'useUniqueCache' => 1,
                        'useUniqueCache_conf' => array(
                            'strtolower' => 1,
                            'spaceCharacter' => '-',
                        ),
                        'noMatch' => 'bypass',
                    ),
                )
            ),
            'tx_blog_author' => array(
                array(
                    'GETvar' => 'tx_blog_authorposts[author]',
                    'lookUpTable' => array(
                        'table' => 'tx_blog_domain_model_author',
                        'id_field' => 'uid',
                        'alias_field' => 'name',
                        'useUniqueCache' => 1,
                        'useUniqueCache_conf' => array(
                            'strtolower' => 1,
                            'spaceCharacter' => '-',
                        ),
                        'noMatch' => 'bypass',
                    ),
                ),
            ),
            'tx_blog_archive' => array(
                array(
                    'GETvar' => 'tx_blog_archive[year]',
                ),
                array(
                    'GETvar' => 'tx_blog_archive[month]',
                    'valueMap' => array(
                        'january' => '1',
                        'february' => '2',
                        'march' => '3',
                        'april' => '4',
                        'may' => '5',
                        'june' => '6',
                        'july' => '7',
                        'august' => '8',
                        'september' => '9',
                        'october' => '10',
                        'november' => '11',
                        'december' => '12',
                    ),
                ),
            ),
            'xyz' => 'tx_blog_category',
            'xyz' => 'tx_blog_tag',
            'xyz' => 'tx_blog_author',
            'xyz' => 'tx_blog_archive',
        ),
    )

Bei "xyz" muss die jeweilige Seitenid eingetragen werden.

Falls die Blogerweiterung immer noch keine schönen URLs angezeigt, Cache löschen!

Ergänzend noch ein Teil für die Feeds:

        'fileName' => array(
                'posts.xml' => [
                    'keyValues' => [
                        'type' => 200,
                    ],
                ],
                'category.xml' => [
                    'keyValues' => [
                        'type' => 210,
                    ],
                ],
                'author.xml' => [
                    'keyValues' => [
                        'type' => 250,
                    ],
                ],
            ],
        ),

Kommentare (4)

  • Jürgen
    Jürgen
    am 06.04.2019
    Hast Du eine Idee wo ich noch nachschauen kann wenn es nicht funktioniert?
    Benutze Typo3 8.7.24, RealURL 2.5.0 und Blog 8.7.4
    Er macht mir einfach keine schönen Links. Sehen egal was ich mache so aus:
    hopfengut-blog/category/?tx_blog_category[category]=16&tx_blog_category[action]=listPostsByCategory&tx_blog_category[controller]=Post&cHash=18a36c03084fe5521953363a3d990ab4

    Vielleicht eine Idee?
    Gruß
    Jürgen
    • Christoph
      Christoph
      am 27.04.2019
      Hallo David,

      Jürgen hatte mir noch folgendes geschrieben:

      - remove the auto configuration class of EXT:blog
      - clear all RealURL tables (truncated in DB)
      - force flushed TYPO3 caches, als typo3temp/var Verzeichnisinhalt löschen

      Ggf. hilft das.
      VG
      Christoph
    • David
      David
      am 25.04.2019
      Hallo zusammen,

      habe genau das selbe Setup wie Jürgen - und bekomme auch keine umgeschriebenen URLs hin.
      Eigentlich sollte man ja gar keine Hand anlegen müssen, da es doch diese realUrlAutoConf gibt.
      :(

      Habt ihr das lösen können?

      VG
      David
    • Christoph
      Christoph
      am 07.04.2019
      Hallo Jürgen,
      was mir auf die Schnelle einfällt:
      - prüfen, ob die RealURl-Config generell greift
      - Caches löschen
      - Syntax prüfen
      - Mal in Slack nachfragen, da bekommst Du häufig direkt von den Jungs Hilfe
      VG
      Christoph

Write new comment reply