svanschu / SchuWeb-Sitemap

SchuWeb Sitemap is a sitemap generator for Joomla CMS
GNU General Public License v3.0
13 stars 9 forks source link

Pligin weblinks (V5.0.0) with option: Count Click in web links: Yes gives a 404 error. #121

Closed peterhulst closed 7 months ago

peterhulst commented 8 months ago

Steps to reproduce Include Weblinks (version 5.0.0) in the Sidemap Select Count Clicks: Yes in Options of weblinks The side map is displayed Click a link

Expected behavior The link is opened (preferable in a new tab)

Actual result Error message: 404 Component not found JROOT\libraries\src\Component\ComponentHelper.php:357 JROOT\libraries\src\Application\SiteApplication.php:208 The link without SEO: ...index.php/component/web_sitemap_weblinks/?task=weblink.go&id=2&Itemid=750

Remark: When Count Click: No the link is opened correctly (although NOT in a new tab)

System information Joomla version: 4.4.3 SchuWeb-Sitemap version: 5.0.2, weblinks: 5.0.0 PHP version: 8.1.23 Database version: 8.0.30

peterhulst commented 7 months ago

Hello,

I found a solution: file: weblinks.php line 180: $node->link = 'index.php?option=schuweb_sitemap_weblinks&task=weblink.go&id=' . $link->id . '&Itemid=' . ($Itemid ?: $parent->id);

Replace schuweb_sitemap_weblinks --> com_weblinks, gives:

$node->link = 'index.php?option=com_weblinks&task=weblink.go&id=' . $link->id . '&Itemid=' . ($Itemid ?: $parent->id);

Regards, Peter

svanschu commented 7 months ago

Hi, thank for report.

Search and replace is not always a good idea 😆

svanschu commented 7 months ago

fixed in https://github.com/svanschu/SchuWeb-Sitemap-Weblinks/commit/1641b526900c914df894e59d1f7abd2c8dccf6ac