sbuerk/t3e-legacy-param-guard

TYPO3 Guard the handling of legacy params in FE PSR-7 request

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 2

Language:Shell

Type:typo3-cms-extension

dev-main / 1.x-dev 2023-12-05 12:51 UTC

This package is auto-updated.

Last update: 2024-12-05 15:04:40 UTC


README

Latest Stable Version TYPO3 11 TYPO3 11 Total Downloads Monthly Downloads tests-main-v11-composer-installers-3 tests-main-v11-composer-installers-4 tests-main-v12

TYPO3 extension legacy_param_guard

Mission

TYPO3 used a couple of query parameters in the frontend to determine which pages should be shown. Since TYPO3 v9 speaking url has been integrated directly into the TYPO3 CMS keeping the old legacy parameters.

Technically, the legacy parameters

  • id=<int>: page id
  • L=<int>: language id
  • type=<int>: typeNum (pageType)

are not really required anymore for page resolving and rendering. Using these parameters intentionally is a behaviour from old days not adopting newer techniques, which requires the core to still maintain and respect these parameters.

TYPO3 provides ways making the usage of them superfluous in projects and extensions. However, 3rd party services and pages are able to created links which bots (like googlebot) are crawling not having the speaking url in it.

This extension provides several ways to guard these legacy parameters:

  • redirect to same url with removed legacy params
  • block the request (simple body-less 404 page response)
  • remove legacy params from request and let TYPO3 deal with it even if the browser has the url with the parameters

Caution!

Using this extension removes the ability to actively use any legacy parameter. Don't use it if required by your instance or extension.

Compatibility

TYPO3 Build/Scripts/runTests.sh

This extension contains the well known Build/Scripts/runTests.sh docker/docker-compose based script wrapping script.

Provided commands/test-suits:

  • -s acceptance: Execute acceptance tests (not implemented yet)
  • -s clean: Clean unnecessary files and folders
  • -s cgl: Ensure code-style guideline rules.
  • -s composerUpdate: Run composer update
  • -s composerValidate: Validate composer.json
  • -s functional: Execute functional tests
  • -s lint: Lint *.php files for syntax errors
  • -s phpstan: Execute static code analyzer PHPStan
  • -s phpstanGenerateBaseline: Generate baseline for PHPStan. Can be used to manage temporarily unsolvable reports.