EPrints Technical Mailing List Archive

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

Message: #07584


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

Re: [EP-tech] related_resources field display


How did you display it? I've just added it to @{$c->{summary_page_metadata_full}} in cfg/cfg.d/x_recollect.pl and it worked.

Il 23/11/18 14:28, James Kerwin via Eprints-tech ha scritto:
Hi All,

I have a problem on our data repository which uses Recollect.

On the staff view, the "Related Resources" field displays as something similar to:

ARRAY(0x7f7c354a5c10)

Checking the database I can see the links I submitted for this field are still in the format I expected, so the problem appears to be in the display of these items. It looks as though it's trying to print a hash/array instead of accessing the object the "proper" way.

I've taken a good look at this and got to Details.pm in:

/usr/share/eprints3/perl_lib/EPrints/Plugin/Screen/EPrint

I can understand the code (more or less) to the point where it prints out each stages tab (Previews, Details, Actions, History, Issues) and how it appears to print the header for each section under each tab (e.g. Details ==> Upload, Details,Other Defined Fields.

I just can't see where each subheading is then printed to screen (Creators of, Title of Divisions etc):

image.png

Irritatingly, on the repository we have an analogous "related_url" field that displays correctly. If I knew where to look I could just compare and correct it. Does anybody have any ideas? There is an x_recollect.pl <https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fx_recollect.pl&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cc07074c47af44cead34708d6537c32f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=gknnT92a8nGQvuImn6%2BjY9KrV0wNgSrVmoTMsAGtB54%3D&amp;reserved=0> in cfg.d that contains the following, but I don't think that's what I want:


    $c->add_dataset_field(
        "eprint",
        {
         name  => 'related_resources',
         type  => 'compound',
         multiple  => 1,
         render_value => 'EPrints::Extras::render_url_truncate_end',
         fields  => [
    {
      sub_name  => 'url',
      type  => 'url',
      input_cols => 40,
    },
    {
      sub_name  => 'type',
      type  => 'set',
      render_quiet => 1,
      options => [
          qw(
    pub
    author
    org
    )
      ],
    } ],
         input_boxes  => 1,
     input_ordered => 0,
        },
        reuse => 1
         );


Thanks,
James



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cc07074c47af44cead34708d6537c32f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=yucarzXxII6aD5BYmcyb6ep%2FmvLa32Dm8y%2BuvbeD1C8%3D&amp;reserved=0
*** EPrints community wiki: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cc07074c47af44cead34708d6537c32f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=FaRlJsGfBQo5SCTN90%2FjjwlTcYWvlEVjtB756i3U9ts%3D&amp;reserved=0
*** EPrints developers Forum: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cc07074c47af44cead34708d6537c32f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=hlrXe0CUYfWL62h80GgC%2BxvkV6%2BIHgaszzx9ijUj2m8%3D&amp;reserved=0