Skip to content
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

Improve check for Archive_Tar in the PKP PLN plugin #948

Closed
mjordan opened this issue Dec 4, 2015 · 3 comments
Closed

Improve check for Archive_Tar in the PKP PLN plugin #948

mjordan opened this issue Dec 4, 2015 · 3 comments
Milestone

Comments

@mjordan
Copy link

mjordan commented Dec 4, 2015

We should improve how the PKP PLN plugin handles problems with the Archive_Tar extension (see this issue on the forum, for example) so that its absence from OJS's include path doesn't result in a WSOD on the plugin manager page. @asmecher can you advise on the best way to handle this? Tagging @ubermichael.

@mjordan
Copy link
Author

mjordan commented Dec 4, 2015

We should also consider checking for other dependencies as per http://forum.pkp.sfu.ca/t/error-404-on-my-ojs/4764/16.

@asmecher
Copy link
Member

asmecher commented Dec 4, 2015

Two possible approaches to avoiding breakage from missing dependencies:

  • Check for the existence of the class before permitting the user to enable the plugin. (class_exists or similar)
  • Only import the class just before it's required, not at the head of a file. In the case that the class is missing and the plugin is enabled, this will mean the whole site won't get broken (in the case of a generic plugin). Since generic plugins get loaded on every request, moving things into programatically-included code is a good thing, as it'll reduce unnecessary load on the system caused by generic plugins.

I had thought that this check was already in place, though?

@asmecher
Copy link
Member

asmecher commented Dec 7, 2015

Looks good -- merged the PR.

@asmecher asmecher closed this as completed Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants