[EP-tech] Re: multilang eprints.* fields show up as HASH(0xhexnumber) in html head

Antje.vonSchmidt at dlr.de Antje.vonSchmidt at dlr.de
Fri Mar 9 08:40:56 GMT 2012


Dear Dobrica,

thanks for the hint and the solution. I have created a file called "MySimple.pm" (see the attachment). To keep the changes even after an EPrints-Update you can copy this file in "../archiveID/cfg/plugins/EPrints/Plugin/Export/" and include the following lines in the file "../archiveID/cfg/cfg.d/plugins.pl"

# Plugin Mapping
$c->{plugin_alias_map}->{"Export::Simple"} = "Export::MySimple";
$c->{plugin_alias_map}->{"Export::MySimple"} = undef;

I have also changed the render function for the subject field. Until now the content includes only the key of the subject but not the description (<meta  name="eprints.subjects" content="KEY" /> changed to <meta  name="eprints.subjects" content="KEY-Description" />)

Best regards

Antje

-----Ursprüngliche Nachricht-----
Von: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] Im Auftrag von Dobrica Pavlinušic
Gesendet: Dienstag, 6. März 2012 02:24
An: eprints-tech at ecs.soton.ac.uk
Betreff: [EP-tech] Re: multilang eprints.* fields show up as HASH(0xhexnumber) in html head

If anybody cares, those meta fields are generated in EPrints/Plugin/Export/Simple.pm and attached patch adds multilang support by simple copy/paste from DC.pm

2012/3/2 Dobrica Pavlinušić <dpavlin at gmail.com>:
> We are using eprints 3.3.8 from Debian package and decided to use 
> multilang fields for title, keywords and abstracts to provide English 
> translation along with our Croatian originals.
>
> However, when EPrints generates <meta> tags we get something like this:
>
> <meta name="eprints.title" content="HASH(0xfc3107a8)" /> <meta 
> name="eprints.ispublished" content="submitted" /> <meta 
> name="eprints.subjects" content="SOC" /> <meta 
> name="eprints.full_text_status" content="public" /> <meta 
> name="eprints.keywords" content="HASH(0xfc236248)" /> <meta 
> name="eprints.keywords" content="HASH(0xfc301f40)" /> <meta 
> name="eprints.abstract" content="HASH(0xfc315c48)" /> <meta 
> name="eprints.abstract" content="HASH(0xfc330770)" />
>
> This makes *some* sense, because we have one title, and multilang 
> keywords and abstract for this entry, however I would love to have 
> text inside content. This is especially bad for Google Scholar and 
> other crawlers (including Zoterro) which seem to prefer eprints.* meta 
> fields as opposed to DC.title and/or DC.subject.
>
> I should also stress out that DC.* meta fileds are correctly generated 
> (once, using default language to select one of available values).
>
> I did try to find my way through source code using grep, but I'm stuck 
> where to look. Any help is greatly appreciated.
>
> --
>  ...2share!2flame... http://blog.rot13.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/



--
 ...2share!2flame... http://blog.rot13.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MySimple.pm
Type: application/octet-stream
Size: 3850 bytes
Desc: MySimple.pm
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20120309/1b25d1e3/attachment.obj 


More information about the Eprints-tech mailing list