EPrints Technical Mailing List Archive

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

Message: #04881


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

[EP-tech] Re: Regenerate Views from Admin page causes [pin missing: orcid]


When you see a difference between what you're doing on the command-line and what's happening at the front end, it's invariably because you need to restart apache.  When apache starts up, the configuration is loaded.  Much of the configuration (though not all) is not loaded again until apache is restarted.

--
Adam Field
Business Relationship Manager and Community Lead
EPrints Services
+44 (0)23 8059 8814





On 7 Oct 2015, at 18:24, Adams, Thomas wrote:

> Using EPrints 3.3.11, I have duplicated some code to allow a person’s orcid id to be displayed within the Update/View.pm.
>  
> When I run “bin/generate_view archiveid” command from the CLI, I get the expected display of the orcid number and link in the view page.
>  
> However, when I click on “Regenerate Views” from the Admin page and look at a view page, instead of seeing a link and display of the orcid id, what is shown is:
> [pin missing: orcid]
> On the newly regenerated page.
>  
> I would like for the view page to be render correctly, when it is being regenerated after a “Regenerate Views” request.
>  
> I am puzzled, why bin/generate works but the Regenerate Views for the Admin menu does not.  Is there another CLI command I need to issue to ensure that the Regenerated View sees the defined orcid parameter? Or some file which might need to be updated?
>  
> BTW – I get the following error message (423 times) when running bin/generate_views.  Line 13 is just a comment, so I do not know where the error message is referring in order to correct it …
> bin/generate_views cshleprints3 |& sort | uniq -c
>     423 Use of uninitialized value in string eq at (eval 163) line 13.
>  
> My addition within Update/Views.pm:
>                         my $orcid_phrase;
>                         if (defined $oid)
>                         {
>                                 my $op = $xml->create_element("p", class=>'cshl_author_orcid');
>                                 $op->appendChild($xml->create_text_node('ORCID: '));
>                                 my $aao = $xml->create_element( "a", href=>'http://orcid.org/' . "$oid" );
>                                 $aao->appendChild($xml->create_text_node( $oid ));
>                                 $op->appendChild($aao);
>                                 $orcid_phrase = $repo->html_phrase(
>                                         "cshl_author_orcid",
>                                         orcid=>$op,
>                                 );
>                         }
>                         else
>                         {
>                                 $orcid_phrase = $repo->html_phrase("cshl_author_no_orcid");
>                         }
>  
>                         $intro_phrase_id = "viewintro_$view->{id}";
>                         $intro = $repo->html_phrase(
>                                 $intro_phrase_id,
>                                 name=>$name_phrase,
>                                 image=>$image_phrase,
>                                 web=>$webpage_phrase,
>                                 orcid=>$orcid_phrase
>                         );
>           
> The phrases file cfg/lang/en/phrases/local.xml:
>  
> <?xml version="1.0" encoding="utf-8" standalone="no"?>
> <!DOCTYPE phrases SYSTEM "entities.dtd">
> <epp:phrases xmlns="http://www.w3.org/1999/xhtml"; xmlns:epp="http://eprints.org/ep3/phrase"; xmlns:epc="http://eprints.org/ep3/control";>
>  
> <!-- CSHL-3: Phrases for the Browse view pages for CSHL Authors -->
> <epp:phrase id="viewintro_cshl_author"><span class="cshl_author_view"><epc:pin name="name" /><epc:pin name="web" /><epc:pin name="orcid" /><epc:pin name="image" /></span></epp:phrase>
> <epp:phrase id="cshl_author_name"><h3><epc:pin name="name" /></h3></epp:phrase>
> <epp:phrase id="cshl_author_no_name"></epp:phrase>
> <epp:phrase id="cshl_author_image"><epc:pin name="image" /></epp:phrase>
> <epp:phrase id="cshl_author_no_image"></epp:phrase>
> <epp:phrase id="cshl_author_web"><epc:pin name="web" /></epp:phrase>
> <epp:phrase id="cshl_author_no_web"></epp:phrase>
> <epp:phrase id="cshl_author_orcid"><epc:pin name="orcid" /></epp:phrase>
> <epp:phrase id="cshl_author_no_orcid"></epp:phrase>
>  
> <!-- CSHL-3: Phrases to describe the new languages -->
> <epp:phrase id="languages_typename_web">URL</epp:phrase>
> <epp:phrase id="languages_typename_img">Image</epp:phrase>
> <epp:phrase id="languages_typename_orcid">ORCID</epp:phrase>
>  
> <!-- CSHL-2: Phrases for the TagLite components in the workflow -->
> <epp:phrase id="Field/TagLite:cshl_author:blurb">CSHL Authors:</epp:phrase>
> <epp:phrase id="Field/TagLite:cshl_author:taglite_picklist_blurb">Choose a CSHL Author</epp:phrase>
> <epp:phrase id="Field/TagLite:highlight:blurb">CSHL Authors:</epp:phrase>
>  
> <!-- CSHL: No idea what this phrase is about -->
> <epp:phrase id="viewname_eprint_highlight">VIEWNAME HIGHLIGHT</epp:phrase>
>  
> </epp:phrases>
>  
> *** 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/