Bug 37629: Link to news are broken

When browsing news in the opac (opac-main.pl), links in the titles of
news are broken. The id pasted in the link is the id from the
additional_contents_localizations instead of the id from
additional_contents.

TEST PLAN:
1 - In intranet create a news with multiple languages
2 - Create a second news
3 - In OPAC, the link of the title of the second news (and maybe the
    first) should be broken APPLY PATCH
4 - In OPAC, the link of the title of both news should work

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Baptiste Wojtkowski 2024-08-13 16:39:04 +02:00 committed by Katrin Fischer
parent 8830cd7eff
commit 173fee41e7
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -95,7 +95,7 @@
[% IF ( news_item ) %]
[% koha_new.title | html %]
[% ELSE %]
<a id="newsitem[% koha_new.id | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.id | uri %]">[% koha_new.title | html %]</a>
<a id="newsitem[% koha_new.additional_content.id | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.additional_content.id | uri %]">[% koha_new.title | html %]</a>
[% END %]
</h4>
<div class="newsbody">[% koha_new.content | $raw %]</div>