• Home
  • Get help
  • Ask a question
Last post 7 hours 8 min ago
Posts last week 141
Average response time last week 4 hours 42 min
All time posts 67772
All time tickets 10472
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.

#5763 – Identifiant article dans url mais pas dans le Title

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.
Thursday, 18 April 2019 11:39 UTC
persilou
 Bonjour,

Sur un sites que j'ai récupéré (Joomla 3.9.4, SH404 4.16) j'ai l'option "insérer identifiant article" sur "avant le titre" afin d'avoir l'ID d'un article dans son url. Mais je me retrouve avec ces identifiants dans le title de mes articles, sous la forme "[109] Title de l'article" par exemple.

y a t-il un moyen de dissocier les deux ?
À savoir conserver l'identifiant unique dans l'url (mon site a toutes ses urls indexées avec cet identifiant depuis plusieurs mois voir années) mais enlever cet identifiant du Title, qui ne sert à rien et se trouve même contre-productif dans l'optimisation de ces Titles ?

J'ai déjà longuement cherché dans le code afin de trouver l'endroit ou le Title est généré, mais je ne trouve pas la ligne qui génère l'ID unique...


merci
Thursday, 18 April 2019 11:56 UTC
persilou
So I found the solution in components/com_sh404sef/meta_ex/com_content.php by commenting line 154. Juste have to think about doing it again for each update of the extension :-(

Suggestion : if it's possible to dissociate in 2 options this Article ID stuff (one for url, one for title), it would be really great and useful !

thanks !
Thursday, 18 April 2019 11:56 UTC
wb_weeblr
HI

We only provide support in English, please use it for additional conversations here.

There is no setting for that. The title and the URL are really linked which is why we pretty much keep them the same.

Those bits are coded in /components/com_sh404sef/meta_ext/com_content.php (for meta data of articles and categories) while the SEF URLs are built in /components/com_sh404sef/sef_ext/com_content.php

Best regards
 
Thursday, 18 April 2019 12:43 UTC
persilou
Thanks for your quick reply

I replied at the same time :

So I found the solution in components/com_sh404sef/meta_ex/com_content.php by commenting line 154. Juste have to think about doing it again for each update of the extension :-(

Suggestion : if it's possible to dissociate in 2 options this Article ID stuff (one for url, one for title), it would be really great and useful !

thanks again for the support !
Thursday, 18 April 2019 13:18 UTC
wb_weeblr
Hi

I'm afraid we do not have any plan to add such a setting considering the very small use case. Having ids in URLs is actually very rare for sh404SEF, this possibility was added only a few years ago as the standard has always been to NOT use ids.
Normally if users want to have ids for some specific reason, ie dissociate several articles with same alias for instance (??) they also need to have ids in the title to avoid duplicate titles. If there's no chance to have articles with same alias then it's better to leave ids out of the URLs entirely.

What we're working on is the ability to have a more simple way to override code. Currently you can override the code in /meta_ext/... and /sef_ext/... but you need to create a sh404sefextplugins plugin and that's a bit complicated and not well documented. Here is a quick run down:

- copy the /plugins/sh404sefextplugins/sh404sefextplugindefault folder to /plugins/sh404sefextplugins/myplugin
- inside the folder, adjust all the file names to match "myplugin"
- inside the file /plugins/sh404sefextplugins/myplugin/myplugin.php only keep the _findMetaPluginPath method
- change that method to:

protected function _findMetaPluginPath($nonSefVars = array())
{
$this->_metaPluginPath = __DIR__ . "/com_content.php"
}

- make a copy of /components/com_sh404sef/meta_ext/com_content.php and put it in /plugins/sh404sefextplugins/myplugin
- make your changes to this copy of com_content.php

This version should be taken into account over the ones that come with sh404SEF.

And don't forget to publish that new plugin, "myplugin"

Best regards
 
Thursday, 18 April 2019 13:40 UTC
persilou
Thank you very much for all the informations. I will try to use this "plugin method"

Best regards,

Gaël
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.