On CiviCRM for Wordpress, the extension "Documents" seem to install OK, but then fails with "Network Error. Unable to reach the server."
I'm using CiviCRM for Wordpress. Wordpress is version 6.2.2. CiviCRM is version 5.61.3. On a Ubuntu-Mate 22.04, Linux 5.19.0-45, PHP8.1, MySQL 8.0.33, Apache 2.4.52 platform.
Administer --> System Setting --> Extensions, locates Documents version 1.23.
Download and Install of the Documents extension appears to be OK and I get an "Enabled" status.
If I view a CiviCRM Contact I see the greyed out tab Documents 0. When I click on it I get the message Network Error. Unable to reach the server. Please refresh this page in your browser and try again. Also there is no + New Document button displayed.
If I go to /srv/www/wordpress/wp-content/uploads/civicrm/ext/
I have the directory org.civicoop.documents
. It contains 52 directories and 116 files.
If go to mysql and use the wordpress database, the SHOW TABLES;
includes:
| civicrm_document |
| civicrm_document_case |
| civicrm_document_contact |
| civicrm_document_entity |
| civicrm_document_version |
When I look at these tables they are all empty...
mysql> select * from civicrm_document;
Empty set (0.00 sec)
mysql> select * from civicrm_document_case;
Empty set (0.00 sec)
mysql> select * from civicrm_document_contact;
Empty set (0.00 sec)
mysql> select * from civicrm_document_entity;
Empty set (0.00 sec)
mysql> select * from civicrm_document_version;
Empty set (0.00 sec)
When I go to /srv/www/wordpress/wp-content/uploads/civicrm/ConfigAndLog
and look at the CiviCRM.1_xxx.log
, the only entry during the time of installation is:
$ cat CiviCRM.1_6ca797f0073c756baa947e42.log
Jun 25 10:00:11 [warning] Deprecated function CRM_Core_BAO_Setting::setItem,
use refer docs for correct methods https://docs.civicrm.org/dev/en/latest/framework/setting/.
CRM_Core_Error::deprecatedFunctionWarning
CRM_Core_BAO_Setting::setItem
CRM_Documents_Upgrader_Base::setCurrentRevision
CRM_Documents_Upgrader_Base::onInstall
Array
(
[civi.tag] => deprecated
)
The code within Base.php
that contains the CRM_Core_BAO_Setting::setItem
is:
public function setCurrentRevision($revision) {
// We call this during hook_civicrm_install, but the underlying SQL
// UPDATE fails because the extension record hasn't been INSERTed yet.
// Instead, track revisions in our own namespace.
// CRM_Core_BAO_Extension::setSchemaVersion($this->extensionName, $revision);
$key = $this->extensionName . ':version';
CRM_Core_BAO_Setting::setItem($revision, 'Extension', $key);
return TRUE;
}
I notice that Base.php
also contains getItem
which I understand is also deprecated.
Please let me know if you'd like any more information to help with resolving this issue.
regards, Ian.