[3.1.2.0] Readding (previously patched/working and then deleted) original PayPal plugin returns old Error 500 as before patching. System says can't patch it again ("already patched")

Some years ago, after PayPal on our OJS 3.1.2.0 returned Error 500 with the infamous “PHP Fatal error: Uncaught Error: Interface ‘Symfony\Component\EventDispatcher\EventSubscriberInterface’ not found…” we updated composer dependencies for the PayPal plugin as described at [OJS 3.1.1.4] Paypal black page - #9 by asmecher. Everything worked fine after that and some other patching (not sure which ones - see Q3 below). In the meantime, we uninstalled PayPal and deleted its folder.

A few years later, we now want to reinclude it, so we cleaned PHP caches and, since we don’t have a backup that old, FTP-ed the /paypal folder from the original package (unzipped, since there’s no gz.tar version of the plugin within the package that OJS backend requires for installing/upgrading this plugin so we couldn’t take the upgrading route). Strangely, instead of showing it in the plugin gallery as a new plugin, OJS picked the plugin not only as present but as both installed and activated (box checked), although the /paypal folder had been gone for years.

In addition, trying to patch the readded plugin, was rejected as though the patch had already been applied. Obviously not, because clicking the PDF button of a paywalled article returns again the same Error 500 as before - meaning the patches were never applied - neither back then (as this hidden “OJS history” feature tells us) nor now.

Q1: Does OJS store (and keep forever) somewhere the information about plugin actions/old patching, which prevented us from actually patching the previously patched but now readded (should be obvious: now unpatched) plugin that in the meantime was physically removed?

Q2: Where to obtain the gz.tar paypal plugin?

Q3: What exact patches do we need for PayPal to work again besided the above one?

Interesting. I had a similar issue after the latest update. Some plugins disappeared from the plugin folder, were not listed in the installed plugins but in the plugin gallery there was a notification of new update for them. Update fails, so I recreated the folder of one of them (material theme), downloaded the latest release and unziped it. And it was there in the installed plugins, but not functioning (the website throwing error 500). So I removed it and reinstalled it resulting in a functioning frontend.
I didn’t look for the other plugins, but I will have in the next few days.
Here I have a feature request : adding a diagnosis to ojs to list errors, inconsistencies, broken files, missing db entries or structure, wrong files permissions, etc…

Hi all,

OJS 3.1.2-0 is obsolete and probably dangerous to run at this point, so your best bet is probably to upgrade to a supported release (I recommend the latest 3.3.0 LTS release). It’ll include the latest PayPal plugin, with no need to patch anything.

There is no “patch cache” or anything like that; I’m not sure why your codebase would behave differently after restoring then attempting to patch again, but I suspect you’ll find clues in your PHP error log when you encounter errors/blank screens.

Regards,
Alec Smecher
Public Knowledge Project Team

This topic was automatically closed after 10 days. New replies are no longer allowed.