Hi
Yes, that file will be overwritten at next update, although I have already added that variable to the list.
I did not understand the solution you described
I did not describe it enough to be really understood but if you can look into sh404SEF files, then I'm sure you'll be interested in that.
sh404SEF has the concept of "hooks" taken from WordPress. It means you can modify some of the data and code sh404SEF uses, without your changes being deleted by next updates. It's a bit like like template overrides but for the code.
In your case, you need to do the following:
- in /libraries/weeblr you'll see a file called sh404sef_functions.php
- if the file does not exists, just create it
- in that file, paste the following:
<?php
/**
* sh404SEF hooks file: this file is automatically loaded by sh404SEF and you can use it
* to create deep customization of sh404SEF behavior. We have added a few examples of
* hooks but there are more.
*
* Note that we do not provide any support for using hooks. Please always mention that you created
* custom hooks when asking for support on any other topic.
*
*/
defined('_JEXEC') or die;
/**
* Filter the list of query variables that should be stripped from requests before doing
* comparison operations, to lookup custom meta data or similar.
*
* @api
* @package sh404SEF\filter\routing
* @var sh404sef_tracking_vars_to_strip
*
* @param array $varList The list of query variables to remove from query.
*
* @return array
* @since 4.13.0
*
*/
ShlHook::add(
'sh404sef_tracking_vars_to_strip',
function ($varsList) {
$varsList = array_merge(
$varsList,
array(
'fbclid',
'anotherone',
'one_more'
)
);
return $varsList;
}
);
Save the file and fbclid, anotherone and one_more are now added to the list of variables stripped from the URL before checking if meta data are associated with that URL.
To deactivate the file, rename it to something else. Like I said, you can update sh404SEF and that file will not be touched.
Best regards
Yannick Gaultier
weeblr.com / @weeblr