J!search PlugIn: SEO-cat-link problem

Started by hymeno, 01 February 2021, 15:02:44

Previous topic - Next topic
A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

hymeno

Hi,
first, thanks for your component! Its fun to use.
J! 3.9.22, Abook 3.1.5

I have changed the J!-search plug-in-query a little and included authors and the year next to the titles.

There is one problem I cannot solve:
in the detail-book-view with SEO there is a category-link, but abook does not jump to the subcategory when clicking on it, but always to the ROOT category, i.e.: the link is generated incorrectly.

Can you say where exactly the links are made within your software and where within J!? Where should one search & try in a meaningful way?

I have searched in helpers/route.php and the plugIn book.php, but could not really intervene to correct the wrong link of the J! search (<<<<<<). It could be a problem in connection with the SEO. Where is that assembled?



---------- link versions ----------
SEO
J!search first result
://www.domain.de/de/component/search/?searchword=flunder&searchphrase=all&Itemid=101
> result detail
://www.domain.de/de/component/abook/book/31-thema00/thema11/1526-title.html?Itemid=101
> Cat. thema11  *wrong*: jumps back to  R O O T  !  not to thema11  <<<<<<<<<
://www.domain.de/de/component/abook/category/31-thema00/thema11.html?Itemid=101
----------
abook-search works, but links are different
://www.domain.de/de/publication/biblio.html
> result detail
://www.domain.de/de/publication/biblio.html?option=com_abook&view=book&id=1526:title&catid=31:thema11&Itemid=109
> Cat. thema11  *ok*
://www.domain.de/de/publication/biblio/31-thema00/thema11.html
----------
----------
non SEO  works
J!search first result
://www.domain.de/index.php?searchword=flunder&searchphrase=all&Itemid=101&option=com_search&lang=de
> result detail
://www.domain.de/index.php?option=com_abook&view=book&id=1526:title&catid=31:thema11&Itemid=101&lang=de
> Cat. thema11  ok 
://www.domain.de/index.php?option=com_abook&view=category&id=31&Itemid=101&lang=de
----------
abook-search works, but links are different
://www.domain.de/index.php?option=com_abook&view=search&Itemid=109&lang=de
> result detail
://www.domain.de/index.php?option=com_abook&view=book&id=1526:title&catid=31:thema11&Itemid=109&lang=de
> Cat. thema11  *ok*
://www.domain.de/index.php?option=com_abook&view=category&id=31&Itemid=109&lang=de
--------------------------------------------------


Does that give you an idea? Do you need more info?



best, hymeno

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

hymeno

buongiorno,

I have caught the problem in this file
/components/com_abook/router.php
on about
z152
//       $array[0] = (int)$catid.':'.$array[0];  //   line commented out

and
z159
+       $segments[2] = $path[0];          //   added: 2nd path source corrected statically: only for 2nd hierarchy

a rough "correction". I was & am still not clear how the error comes about.
Some keys & values seem to be overwritten "inappropriately".
In some array, IDs do not match with the assigned name.

In another fresh J!3.9.22-abook installation, the problem also occurs - too only with active SEO.

thank you,
best regards, hym

federica

Hi hymeno,
/components/com_abook/router.php is a little bit mess up, I would like to rewrite it better using new system (like /components/com_content/router.php).
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]