EPrints Technical Mailing List Archive

Message: #04030


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

[EP-tech] Re: Export subjects in 3.3.13 creates an empty XML


Hi Peter

I found the code they talking about. Is in perl_lib/EPrints/Plugin/Import/FlatSubjects.pm at line 65 not in the bin/import_subject.
I have already changed it and now import_subject works perfectly.

Thank you very much for pointing out the solution.

Kostas 




2015-03-04 12:25 GMT+02:00 peter <pjw@repositoryservices.co.uk>:
Hi
In the file bin/import_subjects at around line 65 you might see a line
of code that is:

  @vals = map { s/%3A/:/g } @vals;

If you do this needs to be changed so that it looks like:

@vals = map { ( my $s = $_ ) =~ s/%3A/:/g; $s } @vals;

If your code has already been changed then your problem might not be
related to issue 291.
Thanks
Peter

On 04/03/15 09:55, pgasinos pgs wrote:
> Hi Peter
> Thanks for your response but I didn't understand what the fix is in
> the bin/import_subjects file (I am not a perl programmer). Could you
> explain to me what does he changes in the the code because I didn't
> find any of the strings he writes.
>
> Thanks
> Kostas
>
>
> 2015-03-04 11:37 GMT+02:00 peter <pjw@repositoryservices.co.uk
> <mailto:pjw@repositoryservices.co.uk>>:
>
>     Hi
>     Have you tried applying the fix for
>     https://github.com/eprints/eprints/issues/291
>     and then try the import again
>
>     Thanks
>     Peter
>
>     On 04/03/15 09:22, pgasinos pgs wrote:
>     > Thanks Lizz but I have already did that.
>     >
>     > I have tried to import the default subject tree from eprints
>     3.3.13 to
>     > figure out if something is wrong with the file but no luck. The
>     export
>     > to subject.xml is an empty file!!!
>     > So, I have lost all my subject tree and I have no views by
>     subject and
>     > division :(
>     > Never had a problem with that conversion before. I just don't have a
>     > clue where to search for the problem.
>     >
>     > Kostas Pgasinos
>     >
>     >
>     >
>     > 2015-03-03 19:19 GMT+02:00 Lizz Jennings <E.Jennings@bath.ac.uk
>     <mailto:E.Jennings@bath.ac.uk>
>     > <mailto:E.Jennings@bath.ac.uk <mailto:E.Jennings@bath.ac.uk>>>:
>     >
>     >     I didn’t have the same errors but did need to update the
>     database
>     >     after installing 3.3.13 to fix a subject import error.
>     >
>     >     Lizz
>     >
>     >     --
>     >
>     >     Lizz Jennings BA MSc ACLIP MCLIP (Revalidated 2014)
>     >
>     >     Technical Data Officer
>     >
>     >     The Library 4.10, University of Bath, Bath, BA2 7AY UK
>     >
>     >     Ext. 3570 (External 01225 383570)
>     >
>     > E.Jennings@bath.ac.uk <mailto:E.Jennings@bath.ac.uk>
>     <mailto:E.Jennings@bath.ac.uk <mailto:E.Jennings@bath.ac.uk>>__
>     >
>     >     Research Data Management: http://www.bath.ac.uk/research/data
>     >
>     >     *From:*eprints-tech-bounces@ecs.soton.ac.uk
>     <mailto:eprints-tech-bounces@ecs.soton.ac.uk>
>     >     <mailto:eprints-tech-bounces@ecs.soton.ac.uk
>     <mailto:eprints-tech-bounces@ecs.soton.ac.uk>>
>     >     [mailto:eprints-tech-bounces@ecs.soton.ac.uk
>     <mailto:eprints-tech-bounces@ecs.soton.ac.uk>
>     >     <mailto:eprints-tech-bounces@ecs.soton.ac.uk
>     <mailto:eprints-tech-bounces@ecs.soton.ac.uk>>] *On Behalf Of
>     >     *pgasinos pgs
>     >     *Sent:* 03 March 2015 12:59
>     >     *To:* eprints-tech@ecs.soton.ac.uk
>     <mailto:eprints-tech@ecs.soton.ac.uk>
>     >     <mailto:eprints-tech@ecs.soton.ac.uk
>     <mailto:eprints-tech@ecs.soton.ac.uk>>
>     >     *Subject:* [EP-tech] Export subjects in 3.3.13 creates an
>     empty XML
>     >
>     >     I have imported subject tree and converted in XML as usual
>     (I have
>     >     done it many times before in 3.3.12)
>     >
>     >     /usr/share/eprints3/bin/import_subjects <archive id>
>     >
>     >     /usr/share/eprints3/bin/export <archive id> subject XML >
>     /usr/share/eprints3/archives/<archive id>/cfg/subjects.xml
>     >
>     >     but the result is an empty xml. I tried to reindex
>     >
>     >     ./bin/epadmin reindex <archive id> subject and the result is:
>     >
>     >     You are about to reindex "subject" in the <archive id>
>     repository.
>     >     This can take some time.
>     >
>     >     Number of records in set: 1
>     >     Continue [y/n] ? es
>     >     'el' is not a supported Xapian stem language, using English
>     instead
>     >     Use of uninitialized value in concatenation (.) or string at
>     (eval 97) line 54, <DATA> line 960.
>     >
>     >     I have attached the created xml file. What could be the problem?
>     >
>     >     Kostas Pgasinos
>     >
>     >
>     >     *** 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/
>     >     *** EPrints developers Forum: http://forum.eprints.org/
>     >
>     >
>     >
>     >
>     > *** 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/
>     > *** EPrints developers Forum: http://forum.eprints.org/
>
>
>     --
>     Peter J. West
>     Digital Repository Services Ltd
>
>
>     *** 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/
>     *** EPrints developers Forum: http://forum.eprints.org/
>
>
>
>
> *** 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/
> *** EPrints developers Forum: http://forum.eprints.org/


--
Peter J. West
Digital Repository Services Ltd


*** 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/
*** EPrints developers Forum: http://forum.eprints.org/