Closed jonasraoni closed 1 year ago
@withanage / @asmecher would any of you be able to review the linked PRs?
@jonasraoni, it looks like some code was rearranged/reformatted in the PR, which makes it hard to read; can you highlight the parts of the PR that corrected the reported problem?
Oh sorry, I've just dropped the setEnabled()
override plus another similar approach, and moved the validation check to the plugin initialization:
https://github.com/pkp/orcidProfile/pull/277/files#diff-c62bbbc2439724bd77f83a6cf1886cdf24c5eff8207e010372ac84b94c68b91eR103-R112
Looks like it worked fine for a user in the forum.
Also, the build is breaking in stable-3_4_0
(looks like there's a composer dependency requiring PHP >= 8.1), I didn't touch anything there, but I can inspect.
@jonasraoni, I suspect you need to change the distro in the Travis config from bionic
to focal
; I had to make a similar change in the webFeed
plugin just now.
@withanage, can you review the above, and check into why the automated testing didn't catch this?
@jonasraoni and @withanage, I ended up manually porting the parts of the PR that Jonas identified to stable-3_4_0
. The reformatting made cherry-picking difficult, and Dulip's PR included other things from the main
branch that probably shouldn't be back-ported.
Next time, it would be less risky to the stable-3_4_0
branch if...
main
, but this definitely needed fixing in stable-3_4_0
. It'll only get trickier from here as the branches diverge!)I also put together a Plugin Gallery release for the sake of 3.4.0-0 and 3.4.0-1 users.
Describe the bug In a clear installation, it's not possible to enable the plugin, due to a validation that happens within the
setEnabled()
method.Solution It should be possible to enable the plugin, otherwise it's not possible to setup the settings which are failing to be validated. If the settings are invalid, the plugin could just skip its normal operation, and perhaps emit an alert.
To Reproduce
Expected behavior I expect the plugin to be enabled right away, the validation can be moved elsewhere.
Origin https://forum.pkp.sfu.ca/t/orcid-profile-plugin-cannot-be-enabled-in-ojs-3-4-0-1/79469/29