Details
-
Type: Bug
-
Status: Open
-
Priority: Trivial
-
Resolution: Unresolved
-
Affects Version/s: 4.7.13
-
Fix Version/s: None
-
Component/s: Core CiviCRM
-
Labels:None
-
Versioning Impact:Minor (add functionality in backwards-compatible manner)
-
Documentation Required?:None
-
Funding Source:Needs Funding
-
Verified?:No
Description
On the Advanced Search page, I was receiving the following error message when expanding the accordion sections like "Grants" or "Pledges"
Network Error: Unable to reach the server. Please refresh this page in your browser and try again.
While debugging, I couldn't find any issue related to network connectivity. However, debugging in the console revealed that the actual error was "JSON.parse: unterminated string".
It turns out that the error is swallowed by the _onFailure function in crm.ajax.js file – anything other than a forbidden error generates the "network error".
It would have saved me a lot of time if the error shown in the UI was actually the error I was generating, or if at least the actual error was logged somewhere.
I thought I would mention it in case it helps someone else.
Just FYI for the curious, the root cause for my JSON error was OPCache settings that were too limiting.