EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #00128


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: IRStats installation problem -- how to update


Hi Jon,

I tried what you suggested, but I am still getting the following error:

eprints@zeprints:~/bin$ ./epadmin refresh_abstracts mdxrep1
------------------------------------------------------------------
---------------- EPrints System Warning --------------------------
------------------------------------------------------------------
Failed to load config module for mdxrep1
------------------------------------------------------------------
error in /usr/share/eprints3/archives/mdxrep1/cfg/cfg.d/eprint_render.pl:
Global symbol "$links" requires explicit package name at /usr/share/eprints3/archives/mdxrep1/cfg/cfg.d/eprint_render.pl line 400.
Global symbol "$links" requires explicit package name at /usr/share/eprints3/archives/mdxrep1/cfg/cfg.d/eprint_render.pl line 401.
Global symbol "$title" requires explicit package name at /usr/share/eprints3/archives/mdxrep1/cfg/cfg.d/eprint_render.pl line 404.
Global symbol "$links" requires explicit package name at /usr/share/eprints3/archives/mdxrep1/cfg/cfg.d/eprint_render.pl line 404.

------------------------------------------------------------------
Use of uninitialized value in concatenation (.) or string at /usr/share/eprints3/perl_lib/EPrints/Repository.pm line 391.
Use of uninitialized value in concatenation (.) or string at /usr/share/eprints3/perl_lib/EPrints/Repository.pm line 644.
Could not open /workflows at /usr/share/eprints3/perl_lib/EPrints/Workflow.pm line 494.
eprints@zeprints:~/bin$

I attach my eprint_render.pl file.

Many thanks for your help.

Best regards,



Alexander J Birchall
Library Systems Manager
The Sheppard Library
Middlesex University
The Burroughs
Hendon
London NW4 4BT

+44 (0) 208 411 5235

-----Original Message-----
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Jon Hallett
Sent: 07 March 2012 10:45
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: IRStats installation problem -- how to update

Hi Alex,

The trick is that that code snippet has to be added to eprint_render.pl at a very specific place to ensure that $links has already been declared. If you have a look at eprint_render.pl, you should see these lines near the bottom:

        my $links = $session->make_doc_fragment();
        $links->appendChild( $session->plugin( "Export::Simple" )->dataobj_to_html_header( $eprint ) );
        $links->appendChild( $session->plugin( "Export::DC" )->dataobj_to_html_header( $eprint ) );

Add that code snippet immediately after those and you should be good.

Thanks,

Jon Hallett
Library IT Manager
Library Services
UWE Bristol
jon.hallett@uwe.ac.uk

-----Original Message-----


Message: 6
Date: Wed, 07 Mar 2012 09:35:01 +0000
From: Alex Birchall <a.birchall@mdx.ac.uk>
Subject: [EP-tech] IRStats installation problem -- how to update
	eprint_render.pl to add IRStats summary graphs to item summary pages?
To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
Message-ID:
	<FC5D3834842C2945916F894F40C7B21B865DEDACDE@WGFP-EXMAV1.uni.mdx.ac.uk>
Content-Type: text/plain; charset=us-ascii

Hi,

I am using EPrints 3.2.8 (Apple Crumble).

In the installation instructions for IRStats, it says:

5 Integrating IRStats (optional)
----------------------------------

i) Add IRStats download graphs to individual item summary pages

Add the following to archives/ARCHIVEID/cfg/cfg.d/eprint_render.pl:

        if( !$preview )
        {
                # IRSTATS CODE STARTS HERE
                if ($session->get_repository->can_call('irstats_abstract_content'))
                {
                        $page->appendChild($session->get_repository->call('irstats_abstract_content', $session, $eprint));
                }
                # END IRSTATS
                $links->appendChild( $session->plugin( "Export::Simple" )->dataobj_to_html_header( $eprint ) );
                $links->appendChild( $session->plugin( "Export::DC" )->dataobj_to_html_header( $eprint ) );
        }

        return( $page, $title, $links );

To enable, run the following command and then restart apache:

 $ cd /opt/eprints3
 $ bin/epadmin refresh_abstracts ARCHIVEID __ But the output from bin/epadmin refresh_abstracts ARCHIVEID is as follows:

eprints@zeprints:~/bin$ ./epadmin refresh_abstracts mdxrep1
------------------------------------------------------------------
---------------- EPrints System Warning --------------------------
------------------------------------------------------------------
Failed to load config module for mdxrep1
------------------------------------------------------------------
error in /usr/share/eprints3/archives/mdxrep1/cfg/cfg.d/eprint_render.pl:
Global symbol "$links" requires explicit package name at /usr/share/eprints3/archives/mdxrep1/cfg/cfg.d/eprint_render.pl line 400.
Global symbol "$links" requires explicit package name at /usr/share/eprints3/archives/mdxrep1/cfg/cfg.d/eprint_render.pl line 401.
Global symbol "$title" requires explicit package name at /usr/share/eprints3/archives/mdxrep1/cfg/cfg.d/eprint_render.pl line 404.
Global symbol "$links" requires explicit package name at /usr/share/eprints3/archives/mdxrep1/cfg/cfg.d/eprint_render.pl line 404.

------------------------------------------------------------------
Use of uninitialized value in concatenation (.) or string at /usr/share/eprints3/perl_lib/EPrints/Repository.pm line 391.
Use of uninitialized value in concatenation (.) or string at /usr/share/eprints3/perl_lib/EPrints/Repository.pm line 644.
Could not open /workflows at /usr/share/eprints3/perl_lib/EPrints/Workflow.pm line 494.
eprints@zeprints:~/bin$

Any suggestions on how to resolve this issue most gratefully received.

Thank you.



Alex Birchall
Library Systems Manager
Ext 5235
Mob 07765 237 570



------------------------------

_______________________________________________
Eprints-tech mailing list
Eprints-tech@ecs.soton.ac.uk
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech


End of Eprints-tech Digest, Vol 42, Issue 19
********************************************



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/

Attachment: eprint_render.zip
Description: eprint_render.zip