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

Alex Birchall a.birchall at mdx.ac.uk
Wed Mar 7 16:52:18 GMT 2012


Hi Jon,

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

eprints at 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 at 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 at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Jon Hallett
Sent: 07 March 2012 10:45
To: eprints-tech at 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 at uwe.ac.uk

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


Message: 6
Date: Wed, 07 Mar 2012 09:35:01 +0000
From: Alex Birchall <a.birchall at 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 at ecs.soton.ac.uk" <eprints-tech at ecs.soton.ac.uk>
Message-ID:
	<FC5D3834842C2945916F894F40C7B21B865DEDACDE at 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 at 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 at 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 at 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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eprint_render.zip
Type: application/x-zip-compressed
Size: 3688 bytes
Desc: eprint_render.zip
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20120307/2b888c94/attachment.bin 


More information about the Eprints-tech mailing list