QUTlib/citation-import

Can't call method "textContent" on an undefined value

Closed this issue · 4 comments

As of 0200 UTC+10, the Scopus plugin is dying with the following:

[quteprints scopus] Error: Unhandled exception in Import::CitationService::Scopus: Can't call method "textContent" on an undefined value at .../archives/quteprints/cfg/plugins/EPrints/Plugin/Import/CitationService/Scopus.pm line 248, <$fh> line 1437.

This appears to be an upstream issue; the web service is returning an incorrect returnedResults value - it is returning '25' whether totalResults is zero or more. I have reported to Scopus Integration, placing it here for user visibility.

Feedback from Scopus Integration is that a ticket has been raised.

Workaround:

Index: perl_lib/EPrints/Plugin/Import/CitationService/Scopus.pm
===================================================================
--- cfg/plugins/EPrints/Plugin/Import/CitationService/Scopus.pm (revision 4670)
+++ cfg/plugins/EPrints/Plugin/Import/CitationService/Scopus.pm (working copy)
@@ -235,7 +235,7 @@
        my ( $result ) = $doc->getElementsByTagName( "scopusSearchResults" );
        if ( defined( $result ) )
        {
-       my ( $results_count ) = $result->getElementsByTagName( "returnedResults" );
+       my ( $results_count ) = $result->getElementsByTagName( "totalResults" );

        if ( defined( $results_count ) && $results_count->textContent > 0 )
        {

I'm not sure whether Scopus have resolved this or not - I haven't heard back - but it's closed by 1e29050 anyway

Even though it has no impact on the citation plugins, I'm just noting that Scopus have resolved this bug in their web service now.