• Home
  • Get help
  • Ask a question
Last post 4 hours 21 min ago
Posts last week 89
Average response time last week 30 min
All time posts 67739
All time tickets 10468
All time avg. posts per day 21

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#7450 – Problem with homepage and params

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Friday, 16 October 2020 09:21 UTC
gabrieleb

Hello,

I have a problem on this site https://www.xxxx.it/. I set the meta title and meta description for the homepage, in fact they appear correctly, but if I call the homepage with some parameters (eg fbclid or gclid for the ads) it does not recognize me that it is the homepage and it does not show me the meta data I have set.

Is it a bug or is there some setting I should make?

Friday, 16 October 2020 10:25 UTC
wb_weeblr

Hi

Is it a bug or is there some setting I should make?

This is as expected. If you add parameters to a URL, then it's not the same URL anymore, it can show a totally different page and the meta data or any other data attached to the home page does not apply anymore.

fbclid or gclid for the ads

We have a list of known tracking vars that are automaticall removed when checking for a URL meta:

'utm_source', 'utm_medium', 'utm_term', 'utm_content', 'utm_id', 'utm_campaign', 'gclid', 'fb_xd_bust',
		'fb_xd_fragment', 'hitcount'

fbclid is not one of them but you're right we should add it to the list. You can add any variable to the list by using a "filter", a line of code you can add in a specific file and that will survive future sh404SEF updates.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Friday, 16 October 2020 13:02 UTC
gabrieleb

Ok, I understand the problem. I did not understand the solution you described, however I found the file where the tracking variables are inserted (administrator/components/com_sh404sef/configuration/configuration.php) and I added the value 'fbclid' to the array. Although it could be overwritten, but I think you will include this value in the next update.

Thanks for the support

Friday, 16 October 2020 13:11 UTC
wb_weeblr

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

 

 
Monday, 16 November 2020 05:34 UTC
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.