-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkp/pkp-lib#7222 Use default landing page url for current publication #9
base: main
Are you sure you want to change the base?
Conversation
oh, noticed I need a continue instead of break there. Will fix that. |
98b39ec
to
82ca2fa
Compare
Nate, I think you're already active on this one. |
With this change, the current publication DOI will have the default landing page url instead of an url pointing to a specific version. This will fix the problem with google scholar plugin and will be more consistent with the other Crossref plugins. Currently DOI versioning is not supported in OPS main branch, but issue is raised here pkp/pkp-lib#8027 |
if ($submission->getCurrentPublication()->getId() === $publication->getId()) { | ||
$url = $dispatcher->url($request, Application::ROUTE_PAGE, null, 'preprint', 'view', $submission->getBestId()); | ||
} else { | ||
$url = $dispatcher->url($request, Application::ROUTE_PAGE, null, 'preprint', 'view', [$submission->getBestId(), 'version', $publication->getId()], null, null, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure but this might break when the code is run as part of an API request (which might be the case with the new changes). The reason is that when specifying a route type (Application::ROUTE_PAGE
) that doesn't match the current request, I think it requires a context path to be passed.
It looks like you've already got a $context
in this method, so you should be able to replace the null
right after ROUTE_PAGE
with $context->getPath()
. But you might want to test it first.
Not sure if this should be put on hold until it is decided whether to have DOI versioning or not? If we do not have DOI versioning, then the DOI will always just point to the latest version landing page and the original problem here is solved. We can also make the whole filter a lot simpler, because it will just provide the information for the latest publication. |
Yeah let's see what happens in the discussion for pkp/pkp-lib#8027. |
Did you make a decision about the versioning? |
Yes, we decided to remove the feature to automatically generate a new DOI for each version. I believe support for the |
ok, so basically in that case we just want to have Right? |
@ajnyga I'm not sure. It's still possible to assign different DOIs to two versions of the same publication. The only thing we settled on was removing the automatic creation of a different DOI for each version. |
pkp/pkp-lib#7222