Skip to content

Instantly share code, notes, and snippets.

@georgringer
Last active November 23, 2018 11:54
Show Gist options
  • Save georgringer/2570a774785682717229a6e8e65b254d to your computer and use it in GitHub Desktop.
Save georgringer/2570a774785682717229a6e8e65b254d to your computer and use it in GitHub Desktop.
XCLASS of EXT:realurl to avoid issues with FB parameter fbclid
<?php declare(strict_types=1);
// in your sitepackage Classes/Xclass/Realurl/ConfigurationReader.php
namespace Vendor\SitePackage\Xclass\Realurl;
class ConfigurationReader extends \DmitryDulepov\Realurl\Configuration\ConfigurationReader {
protected $defaultValues = array(
'cache/banUrlsRegExp' => '/tx_solr|tx_indexedsearch|tx_kesearch|(?:^|\?|&)q=/',
'cache/ignoredGetParametersRegExp' => '/^(?:gclid|utm_(?:source|medium|campaign|term|content)|pk_campaign|pk_kwd|TSFE_ADMIN_PANEL.*)$/',
// xclass start
'cache/ignoredGetParametersRegExp' => '/^(?:gclid|utm_(?:source|medium|campaign|term|content)|fbclid|pk_campaign|pk_kwd|TSFE_ADMIN_PANEL.*)$/',
// xclass end
'fileName/acceptHTMLsuffix' => TRUE,
'fileName/defaultToHTMLsuffixOnPrev' => FALSE,
'init/appendMissingSlash' => 'ifNotFile,redirect[301]',
'init/defaultLanguageUid' => 0,
'init/emptySegmentValue' => '',
'pagePath/spaceCharacter' => '-', // undocumented & deprecated!
);
}
<?php
// in ext_localconf.php of your site package
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\DmitryDulepov\Realurl\Configuration\ConfigurationReader::class] = [
'className' => \Vendor\SitePackage\Xclass\Realurl\ConfigurationReader::class,
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment