[Koha-bugs] [Bug 30367] Plugins: Search explodes in error when searching for specific keywords

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue May 2 19:25:34 CEST 2023


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

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #150523|0                           |1
        is obsolete|                            |

--- Comment #4 from David Nind <david at davidnind.com> ---
Created attachment 150527
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150527&action=edit
Bug 30367: Skip processing if we don't get releases

Some repos don't have releases, and this seems to break things as get returns
an empty
response. Calling from_json on this is the error

This simply skips the bad responses to avoid the error:

To test:
1. Have this on your koha-conf.xml file:

 <plugin_repos>
    <repo>
        <name>ByWater Solutions</name>
        <org_name>bywatersolutions</org_name>
        <service>github</service>
    </repo>
    <repo>
        <name>Theke Solutions</name>
        <org_name>thekesolutions</org_name>
        <service>gitlab</service>
    </repo>
    <repo>
        <name>PTFS Europe</name>
        <org_name>ptfs-europe</org_name>
        <service>github</service>
    </repo>
 </plugin_repos>

2. Restart all services:
   $ restart_all
3. Search for the term 'barclaycard'

The search will give an error:

malformed JSON string, neither tag, array, object, number, string or atom, at
character offset 0 (before "(end of string)") at /usr/share/perl5/JSON.pm line
190
4. Apply patch
5. Repeat
6. No error

Note: The barclaycard plugin won't install even though it is returned as of
this note - the plugin needs an update I believe, I don't think it's a Koha
issue

Signed-off-by: David Nind <david at davidnind.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list