Not correct DOI link in article when using DOI plugin

Enable DOI plugin (in Public Identifier Plugins). In pattern for article write 1111-1111-%Y-A-%i-%p. And when field “Pages” is filled (for example: 5-11), link in article preview is like this: []. But working link is [] (without 11 - last page). Is there way to make plugin form right link?

I found where DOI suffix is generated. It is in “classes/plugins/”

if ($submission->getPages()) {
$pubIdSuffix = PKPString::regexp_replace(’/%p/’, $submission->getPages(), $pubIdSuffix);}
The question is how correctly change code. There may be 3 variants:

  1. empty Pages field
  2. one page filled: 5
  3. interval: 5-11
    And it is code for all PubId plugins. And we need only for doi plugin.

Solve problem.
Made corrections in “classes/plugins/”:

// %p - page number
if ($submission->getPages()) { $Pgs=$submission->getPages();
$pubIdSuffix = PKPString::regexp_replace(’/%p/’,($pubIdType==‘doi’? (strpos($Pgs,’-’)? substr($Pgs,0,strpos($Pgs,’-’)):$Pgs): $submission->getPages()), $pubIdSuffix);

1 Like