19

A white screen (WSoD or "white screen of death") indicates that PHP is configured not to display errors, and has hit an error which it can't recover from. The result is an empty page. Your next step is not to fix the error, but to first give yourself enough information to identify the source of the error. (Diagnose, then treat.) Viewing errors in logfiles ...


10

The two directories are found side-by-side. The location varies by CMS; see below. Note that you'll need access to your server's file system. If you have FTP/SFTP/SSH access, you can use that. If you have a control panel, check for a "File Manager" plugin: Drupal: <drupalroot>/sites/default/files/civicrm/ Joomla: <joomlaroot>/media/civicrm/ ...


9

Xdebug configuration is a somewhat temperamental issue -- the details depend on the IDE, the PHP build, host OS, target application, test suite, etc. Providing a good answer to this is tricky -- e.g. I could describe my configuration (Mac OS X, PHPStorm 2016.2, MAMP 3.4, PHP 5.4, buildkit/dmaster), but the odds are that most people reading it will need ...


8

(Update) As of v4.7.0, the approaches below still work, but there's a better way to write to the log file using a PSR-3 logger, e.g.: Civi::log()->info('Hello, log!'); Civi::log()->error('I'm sorry, {name}. I'm afraid I can't do that.', array( 'name' => 'Stanley Kubrick', )); See also: https://civicrm.org/blog/totten/the-static-is-dead-long-live-...


8

If you want to see everything, you can enable MySQL logging as follows (don't do this on production!): From the mysql console (or within an application like MySQL Workbench), run: SET global general_log = 1; SET global log_output = 'table'; Look at all queries run within the last 15 seconds select * from mysql.general_log where command_type = '...


8

Try setting: define('CIVICRM_DAO_DEBUG', 1); in your civicrm.settings.php file, this might work based on a quick glance at the code. The output will appear onscreen and in the CiviCRM log file (eg sites/default/files/civicrm/ConfigAndLog/CiviCRM*log or media/civicrm/ConfigAndLog/CiviCRM*log or wp-content/plugins/files/civicrm/ConfigAndLog/CiviCRM*log)


5

Krumo is part of the Drupal Devel module. If you want to print out debugging statements in Drupal, you can put this line in your code: dsm($myvariable); It will print out the variable info with much more nicely-formatted HTML than just print_r() or similar. In CiviCRM, I don't use this - I prefer require_once 'CRM/Core/Error.php'; CRM_Core_Error::...


5

This code might help shed some light: $template = CRM_Core_Smarty::singleton(); print_r($template->template_dir);


5

Reviewing the stack trace you provided, the line [debug_info] => SELECT GET_LOCK( 'pantheon.1.cache.3a9e8c34426bc6dde01d5581d9654dcf_mapper/moduleFiles._', 3 ) [nativecode=3057 ** Incorrect user-level lock name 'pantheon.1.cache.3a9e8c34426bc6dde01d5581d9654dcf_mapper/moduleFiles._'.] is the important one. I googled nativecode=3057 ** Incorrect user-...


4

Browser - From the browser, go to Administer > System Settings > Debugging and Error Handling and you can turn on Enable Debugging and Display Backtrace. That should provide you with more specific errors that you need to debug. Also, per the help item on "Enable Bugging" you can do the following to any Civi URL for a stack trace: Stack Trace - To display ...


4

I think the real answer to this situation is: "don't use tpl.extra files in an extension". The reason is that there can be only one of them, and potentially many extensions. That little trick is really only suitable for in-house customizations, in which case you can stick it in the custom templates folder. Here's some solutions to the same problem that do ...


4

Turns out that Jetpack conflicts with CiviCRM - Fix for now is to disable Jetpack when using CiviCRM Profiles on contribution pages and then reactivate when done. Also note: Jetpack also impacts the ability to edit a calendar date in CiviEvents. Update: In speaking with Jetpack, the Jetpack Notifications module relies on Backbone.js and is in conflict with ...


3

It really depends on the type of error you are getting. If something is wrong with the display or some ajax functionality isn't working I check the JavaScript console. If there is an actual error message I check the php log and then turn on display back-trace to get a better view of where the problem is occurring.


3

Whenever you have a serious database error after installing an upgrade the best approach is to restore the previous version from the backups taken before the upgrade as follows: Delete all tables, views and procedures in the database with the error. Restore the pre-upgrade database by importing it (using PHPMyadmin or mysql command line for example) Restore ...


3

Have you tried running mod_php as opposed to fastcgi mode? In the past when we've had this with our servers our first point of call is to determine which part of the stack is limited to 1 core. Our experience has been that its normally mysql. Could you load up mysql with a few concurrent large DB operations and see if it uses multiple cores? This should ...


3

So I think I found the fix. I had my Images directory under Admin=>Directories to the following: /home/my_site/www/www/civi_images The Image Upload URL under Admin=>Resource URLS to the following: https://saintfrancisocc.org/civi_images When I upgraded to 4.6.2 is when I started getting the error. I checked that line in the Security.php file and it ...


3

If your page happens to be a report, you can install the Extended Reports extension which will display the full sql query being run.


3

The civicrm-disable-debug command isn't defined in civicrm_drush_command(). See line 155: $items['civicrm-enable-debug'] = array( 'description' => "Enable CiviCRM Debugging.", ); To solve this problem, you can add this below that: $items['civicrm-disable-debug'] = array( 'description' => "Disable CiviCRM Debugging.", ); This would be an easy ...


3

Cross-origin refers to accessing resources on a different domain. It's curious that URLs you reference are actually different domains -- www.netzwerk-n.org vs netzwerk-n.org. You might want to check which of those appear in (a) the URL bar (b) the Resource URLs (esp under "?" help button) and (c) the outputted HTML documents. As an alternative to "Debug" ...


2

To view debug output for the main page template, add &smartyDebug=1 to the url of your page. To view debug output in a nested template, add the tag {debug} in the template itself. Note that only users with the permission "view debug output" will be able to see debug info.


2

You can access it directly using the URL: - yourdomain.com/civicrm/admin/ But from there you should see the navigation menu and be able to edit the menu and what shows in it. You might need to check the permissions for your user role in your CMS (Drupal?)


2

:( it is hard-coded. I changed $maxArgLen in CRM/Core/Error.php and now I can see the full backtrace.


2

This sounds like a javascript error on your Wordpress site. These are typically caused by buggy WP plugins. I suggest you disable plugins to identify the problem. Here are more detailed javascript troubleshooting steps for CiviCRM.


2

Sorry for the late post here, but this tip might help someone going forward with this error. I too was receiving this error on a fresh install of CiviCRM with WordPress. It was noted there were ajax errors. We guessed that the script was calling for more memory than the server had allotted. Memory allocation was increased and the error went away. It was ...


2

If you have command-line access and wp-cli enabled (with the CiviCRM extension), you can run: wp civicrm disable-debug. If you don't have command-line access, run the following SQL via PHPMyAdmin or similar: UPDATE civicrm_setting SET value = 'i:0;' WHERE name = 'backtrace' OR name = 'debug_enabled';


2

Sorry, should have searched more carefully. Found the answer here: Status page angular load error


1

Based on the following line in the CiviCRM log file: [debug_info] => SELECT GET_LOCK( 'pantheon.1.cache.3a9e8c34426bc6dde01d5581d9654dcf_mapper/moduleFiles._', 3 ) [nativecode=3057 ** Incorrect user-level lock name 'pantheon.1.cache.3a9e8c34426bc6dde01d5581d9654dcf_mapper/moduleFiles._'.] this appears to be an issue with Pantheon's database setup. I ...


1

Or call CRM_Core_Error::debug('message',CRM_Core_Error::formatBacktrace(debug_backtrace(), TRUE, 300)); where 300 is the maximum characters allowed for each arguments


1

I use Civi::log()->debug('my message') to write to the log file.


1

There are two good questions here: How to write debug info out while trying to debug something specific. What kind of debug info to write out when writing an extension to help others who will be debugging stuff in your code later. The first one is probably best handled with the debugging facilities you're used to, from whatever CMS you're using. I like ...


Only top voted, non community-wiki answers of a minimum length are eligible