https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37629

--- Comment #1 from Baptiste Wojtkowski (bwoj) 
<[email protected]> ---
This behaviour is due to the behavior of
Koha::AdditionnalContents->search_for_display

It calls : Koha::AdditionalContentsLocalizations->search( $search_params,
$attribs ), which returns a set of AdditionalContentsLocalizationsn which are
very close to AdditionnalContents and whose interface allows to deal with them
as if they were AdditionnalContents EXCEPT that the field "id" contains the id
of the AdditionalContentsLocalizations.

Hence, when searching for the id of the news, one should use the field
AdditionalContentLocalization->additional_content->id.


Note : the fix I am about to propose fixes the issue but I am not sure about
the function search_for_display itself : the function
AdditionnalContent::search_for_display() should return objects with the exact
same interface as an AdditionnalContent, thus an AdditionnalContent.id that
allows to search and find for an additional_content.
Moreover it looks like it is a static method declared as an object method since
$self is declared as parameter but never used.

Do you think I should open a bug to fix that method or are these points normal
?

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to