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: [ https://doi.org/10.11111/1111-11111-2018-A-1-5-11]. But working link is [ https://doi.org/10.11111/1111-11111-2018-A-1-5] (without 11 - last page). Is there way to make plugin form right link?

(WALL)
I found where DOI suffix is generated. It is in “classes/plugins/PubIdPlugin.inc.php”

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/PubIdPlugin.inc.php”:

// %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