coral-erm / coral

CORAL ERM main repository
http://coral-erm.org/
Other
52 stars 64 forks source link

Coral (2020.02) - Koha (20.05.01) connectivity error #657

Open psmukhopadhyay opened 4 years ago

psmukhopadhyay commented 4 years ago

I've done everything as prescribed in the current documentation (http://docs.coral-erm.org/en/latest/integration.html) for Coral-Koha connectivity but getting this error (my system is Ubuntu 20.04 and PHP ver is 7.4.3):

  1. It is trying to fetch vendor from Koha but fails;
  2. A look inside apache error log shows the following issues:

[Sun Jul 26 20:22:06.075626 2020] [php7:notice] [pid 21693] [client 127.0.0.1:58590] PHP Notice: Undefined index: organizationID in /var/www/html/coral/organizations/admin/classes/common/DatabaseObject.php on line 91, referer: http://localhost/coral/organizations/ [Sun Jul 26 20:22:06.077839 2020] [php7:notice] [pid 21693] [client 127.0.0.1:58590] PHP Notice: Undefined index: organizationID in /var/www/html/coral/organizations/admin/classes/common/DatabaseObject.php on line 91, referer: http://localhost/coral/organizations/ [Sun Jul 26 20:22:06.079314 2020] [php7:notice] [pid 21693] [client 127.0.0.1:58590] PHP Notice: Undefined index: name in /var/www/html/coral/organizations/admin/classes/common/DatabaseObject.php on line 91, referer: http://localhost/coral/organizations/ [Sun Jul 26 20:22:06.079493 2020] [php7:notice] [pid 21693] [client 127.0.0.1:58590] PHP Notice: Undefined index: ilsID in /var/www/html/coral/organizations/admin/classes/common/DatabaseObject.php on line 91, referer: http://localhost/coral/organizations/ [Sun Jul 26 20:22:06.079607 2020] [php7:notice] [pid 21693] [client 127.0.0.1:58590] PHP Notice: Undefined index: ilsID in /var/www/html/coral/organizations/admin/classes/common/DatabaseObject.php on line 91, referer: http://localhost/coral/organizations/ [Sun Jul 26 20:22:06.079760 2020] [php7:notice] [pid 21693] [client 127.0.0.1:58590] PHP Notice: Undefined index: ilsID in /var/www/html/coral/organizations/admin/classes/common/DatabaseObject.php on line 91, referer: http://localhost/coral/organizations/ [Sun Jul 26 20:22:06.080027 2020] [php7:notice] [pid 21693] [client 127.0.0.1:58590] PHP Notice: Undefined index: accountDetailText in /var/www/html/coral/organizations/admin/classes/common/DatabaseObject.php on line 91, referer: http://localhost/coral/organizations/ [Sun Jul 26 20:22:06.080162 2020] [php7:notice] [pid 21693] [client 127.0.0.1:58590] PHP Notice: Undefined index: ilsID in /var/www/html/coral/organizations/admin/classes/common/DatabaseObject.php on line 91, referer: http://localhost/coral/organizations/ [Sun Jul 26 20:22:06.080263 2020] [php7:notice] [pid 21693] [client 127.0.0.1:58590] PHP Notice: Undefined index: noteText in /var/www/html/coral/organizations/admin/classes/common/DatabaseObject.php on line 91, referer: http://localhost/coral/organizations/ [Sun Jul 26 20:22:15.869420 2020] [php7:notice] [pid 21703] [client 127.0.0.1:58598] PHP Notice: Trying to get property 'name' of non-object in /var/www/html/coral/organizations/ajax_processing.php on line 547, referer: http://localhost/coral/organizations/

veggiematts commented 4 years ago

Hi,

What does your browser's javascript console says when you try to fetch vendors ?

psmukhopadhyay commented 4 years ago

Hello ..

I checked it as suggested in both firefox and chrome. Both are reporting:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/

psmukhopadhyay commented 4 years ago

If I Check browser console in Firefox it shows:

[Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIXPCComponents_Utils.readUTF8URI]" nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)" location: "JS frame :: resource://gre/modules/L10nRegistry.jsm :: L10nRegistry.loadSync :: line 658" data: no]

psmukhopadhyay commented 4 years ago

My ils section is as follows:

[ils] ilsConnector=koha ilsVendorRole="Vendor" ilsApiUrl="http://localhost:2001/api/v1" ilsAdminUrl="http://localhost:2001/" oauthid="b17e7546-5da7-44f1-84be-10afdf644633" oauthsecret="43bd8ba4-23fc-4ab3-a615-dbd191d1b94e"

psmukhopadhyay commented 4 years ago

I got a solution for this problem. The problem was neither with Koha nor with the Coral. The Apache was stripping down OAuth2 authorization headers for security reasons somehow. See this for reference: https://support.deskpro.com/en/kb/articles/missing-authorization-headers-with-apache. It is working now.. Thank you all for supports. Screenshot from 2020-09-02 16-34-30 Screenshot from 2020-09-02 16-36-01

veggiematts commented 4 years ago

Thank you for the feedback !