1

Having trouble to figure out whats wrong with the edit expense function as it always return a blank page. What could be the issue?

I extracted the error code from the error log.

enter image description here

enter image description here

enter image description here

My setup environment: Wordpress Civicrm 5.35.1

Blank page shown when trying to edit

After clicking edit button

3
  • 1
    To be sure, you mean this extension lab.civicrm.org/extensions/expenses ? Mar 27 '21 at 13:57
  • 1
    A network error usually hides another error. When you disable popup screens (Can be done at https://<server>/civicrm/admin/setting/preferences/display?reset=1 and look for enable popup, and uncheck), the real error is shown. Mar 27 '21 at 14:21
  • Try opening the page/form on a new tab Mar 28 '21 at 0:01
1

This sounds like it might be a bug in the expenses extension. It's hitting line 121 in CRM/Expenses/Form/Expense.php but $this->_expense is a string instead of an array at that point.

It's not clear why it's a string - it gets set at line 46 - if you add something like CRM_Core_Error::debug_log_message(var_export($this->_expense, true)); either at line 48 or at line 120 and then check in the ConfigAndLog file it will tell you what it looks like.

6
  • Below is the error log i got from ConfigAndLog:> Mar 27 12:08:30 [info] Creating canary table Mar 27 12:08:43 [warning] Deprecated function CRM_Core_BAO_Setting::setItem, use refer docs for correct methods docs.civicrm.org/dev/en/latest/framework/setting. Array ( [civi.tag] => deprecated ) Mar 28 05:34:02 [info] 'Expense'
    – HRAC
    Mar 28 '21 at 5:36
  • I attached a screenshot of the log in the post >Mar 28 05:46:43 [info] 'Expense'
    – HRAC
    Mar 28 '21 at 5:53
  • 1
    Ok great so that's confirming it's the literal string 'Expense' instead of an array. That's weird.
    – Demerit
    Mar 28 '21 at 6:22
  • What should i do? Is there any part of the code need to change?
    – HRAC
    Mar 28 '21 at 8:05
  • 1
    Do you have anything in the civicrm_expense database table that looks weird?
    – Demerit
    Mar 28 '21 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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