OJS 3.1.1 Plugin Gallery not loading

Using OJS 3.1.1 with php 7.1, when I click on “Plugin Gallery” I get a spinning wheel forever. In the error log:
[Wed Dec 19 14:44:04.862937 2018] [php7:error] [pid 27540] [client 132.66.11.1:38433] PHP Fatal
error: Uncaught Error: Class ‘DOMDocument’ not found in /var/www/html/ojs/lib/pkp/classes/plugi
ns/PluginGalleryDAO.inc.php:55\nStack trace:\n#0 /var/www/html/ojs/lib/pkp/classes/plugins/Plugi
nGalleryDAO.inc.php(33): PluginGalleryDAO->_getDocument()\n#1 /var/www/html/ojs/lib/pkp/controll
ers/grid/plugins/PluginGalleryGridHandler.inc.php(127): PluginGalleryDAO->getNewestCompatible(Ob
ject(Application), NULL, NULL)\n#2 /var/www/html/ojs/lib/pkp/classes/controllers/grid/GridHandle
r.inc.php(311): PluginGalleryGridHandler->loadData(Object(Request), Array)\n#3 /var/www/html/ojs
/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1034): GridHandler->getGridDataElements(Ob
ject(Request))\n#4 /var/www/html/ojs/lib/pkp/classes/controllers/grid/GridHandler.inc.php(927):
GridHandler->renderGridBodyPartsInternally(Object(Request))\n#5 /var/www/html/ojs/lib/pkp/classe
s/controllers/grid/GridHandler.inc.php(642): GridHandler->doSpecificFetchGridActions(Array, Obje
ct(Request), Object(TemplateManager))\n#6 /var/www/html/ojs/lib/pkp/classes/core in /var/www/htm
l/ojs/lib/pkp/classes/plugins/PluginGalleryDAO.inc.php on line 55

php-xml is installed and active.

Hi @sitman
There are plugins that make a call to the PHP DOM library. Usually, it is included in PHP distribution. Basically, here OJS tries to make an instance of a class but isn’t able to find it: https://github.com/pkp/pkp-lib/blob/master/classes/plugins/PluginGalleryDAO.inc.php#L55

Can you double check if this library is present in your PHP distribution? If not, you can install it by yourself: php - Class 'DOMDocument' not found - Stack Overflow
or ask a hosting provider

I have just installed OJS 3.1.2-1 and also have the problem that the plugin gallery is empty. I see the heading and then “No Items”.
In the log I get many times

PHP Notice: Undefined property: DOMElement::$tagName in /var/www/html/ojs/lib/pkp/classes/plugins/PluginGalleryDAO.inc.php on line 86

The DOM library is loaded.
`

Again, maybe this is late but may as new directives like PUTS and DAO COM-XML are added to versions, that list of requirements can go into the Upgrade.php and check just like the “writeable directories” checks?

I have checked SSL on this server and it seems that this is the root cause of the issue…

fsockopen(): unable to connect to ssl://pkp.sfu.ca:443

I noticed when I used wget to get the latest version of the code, I got the following:
Resolving pkp.sfu.ca (pkp.sfu.ca)… 204.187.13.80
Connecting to pkp.sfu.ca (pkp.sfu.ca)|204.187.13.80|:443… connected.
ERROR: cannot verify pkp.sfu.ca’s certificate, issued by ‘/C=US/O=Let’s Encrypt/CN=R3’:
Issued certificate has expired.
To connect to pkp.sfu.ca insecurely, use `–no-check-certificate’.

Hi @radjr,

This is a problem with an expired certificate on your server; you’ll need to update the server’s certificate list. This will affect many sites using Let’s Encrypt certificates, not just PKP’s. See for example:

https://blog.devgenius.io/rhel-centos-7-fix-for-lets-encrypt-change-8af2de587fe4

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks. For the record: If there is a certificate problem, the plugin gallery may(will) not load. In our case, we cloned the production VPS and broke the SSL chain. We should have seen this when we saw that we had to force the connection to earlier WGETs of OJS code.

From our hosting provider below. The trick is to use this command and see what errors pop up: wget https://pkp.sfu.ca/ojs/xml/plugins.xml

Hello,

The SSL error has been fixed by installing the ca certificate package.

yum install -y ca-certificates

++++++++++++++
[root@serverojs2 ~]# wget https://pkp.sfu.ca/ojs/xml/plugins.xml
–2022-04-22 20:20:59-- https://pkp.sfu.ca/ojs/xml/plugins.xml
Resolving pkp.sfu.ca (pkp.sfu.ca)… 204.187.13.80
Connecting to pkp.sfu.ca (pkp.sfu.ca)|204.187.13.80|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 320003 (313K) [application/xml]
Saving to: ‘plugins.xml’

100%[======================================>] 320,003 493KB/s in 0.6s

2022-04-22 20:21:00 (493 KB/s) - ‘plugins.xml’ saved [320003/320003]

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