0

As Drupal 7 EoL approaches once again, we're considering a move to WordPress. I've got a test build running locally, and I've successfully imported all our CiviCRM data following the guide at https://docs.civicrm.org/sysadmin/en/latest/misc/switching-cms/drupal-to-wordpress/

That done, I am now unable to enable or disable any CiviCRM extensions on the WordPress site. The CiviCRM Extensions page loads fine, and clicking enable/disable in the right hand column on any module leads to the confirmation screen as expected. Once I confirm, however, I am returned to the Extensions page with no changes. There is no specific error message.

I do have one error that is appearing periodically as a notification in the top right seemingly at random. It simply reads, Error The file is either empty or you do not have permission to retrieve the file. My best guess is that this is related to the CiviMobile API that was installed on the Drupal site, and is now displaying without the QR code that would normally load - but I'm unable to disable the module to establish for sure whether that's the cause! [Edit: My guess was wrong. Disabling CiviMobileAPI did nothing for that error, but disabling and re-enabling DataProcessor seems to have cleared it.]

There's nothing in ConfigAndLog that seems to tally with the times at which I've tried to enable or disable extensions, but I do see this, if it means anything:

Feb 08 11:15:07  [error] 
$Fatal Error Details = array:3 [
  "message" => " is not of type String"
  "code" => null
  "exception" => CRM_Core_Exception {#9862
    -errorData: array:1 [
      "error_code" => 0
    ]
    #cause: null
    -_trace: null
    #message: " is not of type String"
    #code: 0
    #file: "/Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php"
    #line: 1807
    trace: {
      /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1807 {
        › elseif ($abort) {
        ›   throw new CRM_Core_Exception("{$item[0]} is not of type {$item[1]}");
        › }
      }
      /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1657 { …}
      /Applications/MAMP/htdocs/test_wp/wp-content/uploads/civicrm/ext/dataprocessor/CRM/Dataprocessor/Form/Output/AbstractUIOutputForm.php:92 { …}
      /Applications/MAMP/htdocs/test_wp/wp-content/uploads/civicrm/ext/dataprocessor/CRM/DataprocessorSearch/Form/AbstractSearch.php:534 { …}
      /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:549 { …}
      /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:354 { …}
      /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php:98 { …}
      /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:292 { …}
      /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
      /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
      /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm.php:1199 { …}
      /Applications/MAMP/htdocs/test_wp/wp-includes/class-wp-hook.php:308 { …}
      /Applications/MAMP/htdocs/test_wp/wp-includes/class-wp-hook.php:332 { …}
      /Applications/MAMP/htdocs/test_wp/wp-includes/plugin.php:517 { …}
      /Applications/MAMP/htdocs/test_wp/wp-admin/admin.php:259 { …}
    }
  }
]


Feb 08 11:15:07  [debug] $backTrace = #0 /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(441): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
#2 /Applications/MAMP/htdocs/test_wp/wp-content/plugins/civicrm/civicrm.php(1199): CRM_Core_Invoke::invoke((Array:4))
#3 /Applications/MAMP/htdocs/test_wp/wp-includes/class-wp-hook.php(308): CiviCRM_For_WordPress->invoke("")
#4 /Applications/MAMP/htdocs/test_wp/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters("", (Array:1))
#5 /Applications/MAMP/htdocs/test_wp/wp-includes/plugin.php(517): WP_Hook->do_action((Array:1))
#6 /Applications/MAMP/htdocs/test_wp/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM")
#7 {main}

WordPress is on version 6.1.1, Drupal was on 7.94. CiviCRM on both is 5.58.0. System Status has a warning about making Resource URLs portable, but I've checked and they all look in order apart from CiviCRM Resource URL, which is absolute but also read only. The Extentions page is correctly listing all available extensions from wp-content/uploads/civicrm/ext. System Status lists the following installed and up to date:

  • AuthX: Version 5.58.0
  • Calendar: Version 3.5.1
  • CiviCRM Bootstrap theme: Version 1.0.0-beta.12
  • CiviMobileAPI: Version 6.1.2
  • CKEditor4: Version 5.58.0
  • Contribution cancel actions: Version 5.58.0
  • Custom search framework: Version 5.58.0
  • Data Processor: Version 1.59
  • Event Cart: Version 5.58.0
  • Financial ACLs: Version 5.58.0
  • FlexMailer: Version 5.58.0
  • Form Core: Version 5.58.0
  • General Data Protection Regulation: Version 3.4
  • GoCardless Direct Debit Payment Processor: Version 1.13.0
  • Mosaico: Version 2.10.1665574809
  • OAuth Client: Version 5.58.0
  • reCAPTCHA: Version 5.58.0
  • SearchKit: Version 5.58.0
  • Sequential credit notes: Version 5.58.0
  • Theme: Greenwich: Version 5.58.0

Obviously, I know Shoreditch is not officially supported on Wordpress, but I'd prefer to keep things consistent for our users if I can, and it seemed to be running fine before the database import using the Shoreditch WordPress Workarounds extension. But that's now disabled because it wasn't enabled in the imported Drupal database, and I can neither enable that nor disable Shoreditch itself.

Can anyone shed any light?

2
  • Can you disable/enable extensions using cv? That might give you a few more clues.
    – Aidan
    Feb 8 at 12:43
  • 1
    @Aidan Doh. Should have thought of that. Thank you! disabling CiviMobile API with cv seems to have unblocked whatever the problem was with everything else and now it works fine through the UI. Still got some debugging to do on the other errors then, but being able to disable extensions will make that much easier. Give that as an answer and I'll accept it. Feb 8 at 14:13

1 Answer 1

3

As per the comment, try disabling/enabling the extensions using cv. That might give you some other messages and clues about what is happening.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.