Thursday, 26 October 2023
  1 Replies
  125 Visits

Since the migration to Joomla4, the links to the articles are no longer valid (I specify that my site is a private site, and the redirection of the addresses is not automatically done, there is just an error message that appears).

I looked at the file code "JMA_LATESTNEWS_JS.PHP", and on line 392, I suggest replacing the creation of the link with the following code:

$urlLink = \Joomla\Component\Content\Site\Helper\RouteHelper::getArticleRoute($row->id, $row->catid, $row->language);
$list[$i]->link=Route::link('site', $urlLink, true, Route::TLS_IGNORE, true);

It works on my test site and my production site.It gives the advantage of directly converting the link with the site links system.In any case, this is what is used all over the Joomla system.

With your code I get URL like

With the correction I get directly the good URL like

There it was only a suggestion
Thank you again for this module that is doing us a good service!
Have a good day