Save 37% off PRO during our Black Friday Sale! »

EECI 2011 Workshop: Debugging EE

EECI 2011 Workshop: Debugging EE

These slides are from the workshop during Dev Day at EECI 2011. They contain some tips primarily centered around the following article: http://focuslabllc.com/blog/troubleshooting-expressionengine

During the workshop I demoed each "problem -> solution" so some context is lost with the standalone slides.

594642c6d8a7fa66c622e740496a0a32?s=128

Erik Reagan

October 22, 2011
Tweet

Transcript

  1. ERIKREAGAN • EECI DEBUGGING EE SITE PROBLEMS

  2. ERIKREAGAN • EECI WHO IS THIS GUY? 2 Partner &

    Lead Developer
  3. ERIKREAGAN • EECI FORMAT Sample problem Debugging process 3

  4. ERIKREAGAN • EECI STEP QUESTIONS • Verbally speak the problem

    • Have you seen this problem in the past? • Have you read about or hear someone talk about this problem? 4
  5. ERIKREAGAN • EECI STEP QUESTIONS • What are the symptoms?

    • I have incorrect content displaying • No content is displaying • My template not rendering as expected • All URLs show my site’s home page • I see the “white page of death” on certain pages 5
  6. ERIKREAGAN • EECI STEP CONFIRMATION • “Is it plugged in”

    • Clear your cache • Try multiple browsers / computers if necessary • Log in as the user who experienced the problem 6
  7. ERIKREAGAN • EECI STEP CONFIRMATION • Based on the symptom(s),

    what do we know about the problem in the past? • Log debugging issues for future use and refer to them later. 7
  8. ERIKREAGAN • EECI STEP MAKE CHANGES • Begin to change

    things to find the source of the problem • Template code • Channel Entry (or related module) data • System setting changes 8
  9. ERIKREAGAN • EECI SAMPLE PROBLEMS 9

  10. ERIKREAGAN • EECI PROBLEM Verbal review of the problem: I

    have the 10 most recent “News” entries on my sidebar, but they don’t show up on some pages. 10
  11. ERIKREAGAN • EECI PROBLEM THE QUESTIONS Have you seen this

    problem in the past? (If you’re Lisa Wess you probably have dreams (nightmares?) about this problem, they’re so common.) • If so, what was the solution to that problem? • If not, it’s time to start making changes. 11
  12. ERIKREAGAN • EECI PROBLEM THE SOLUTION Add dynamic=”no” to the

    {exp:channel:entries} loop parameters so the URL doesn’t determine what results are returned in the sidebar. 12
  13. ERIKREAGAN • EECI PROBLEM Verbal review of the problem: I’m

    making changes to my template flat file, but they aren’t appearing on the website. 13
  14. ERIKREAGAN • EECI 14 PROBLEM THE QUESTIONS Have you seen

    this problem in the past? • If so, what was the solution to that problem? • If not, it’s time to start making changes.
  15. ERIKREAGAN • EECI 15 PROBLEM CONFIRMATION • Check database details

    • Clear the cache • Try updating a different template (narrow the search)
  16. ERIKREAGAN • EECI 16 PROBLEM THE CHANGES • We have

    unexpected template / display output • Start with enabling the template debugging option • What is different between templates that work, and the one that does not? • Goes back to your experience and what you remember or have logged about previous problems
  17. ERIKREAGAN • EECI PROBLEM THE SOLUTION The template that wasn’t

    showing changes was flagged in the database to not be saved as a flat file and thus our changes were not being displayed. Switching the template to be saved as a flat file fixes the problem. 17
  18. ERIKREAGAN • EECI PROBLEM Verbal review of the problem: My

    channel:entries loop isn’t returning the expected number of results. 18
  19. ERIKREAGAN • EECI 19 PROBLEM THE QUESTIONS Have you seen

    this problem in the past? • If so, what was the solution to that problem? • If not, it’s time to start making changes.
  20. ERIKREAGAN • EECI 20 PROBLEM CONFIRMATION • Check number of

    results with CP filter (if possible) • Clear the cache
  21. ERIKREAGAN • EECI 21 PROBLEM THE CHANGES • Review the

    query being executed • Manually run the query yourself if needed • Update the channel:entries parameters to modify the query being executed
  22. ERIKREAGAN • EECI PROBLEM THE SOLUTION ExpressionEngine defaults to limiting

    Channel Entry loops to 100 results for performance reasons. Because we want over 100 results returned in a single loop we had to add a limit=”x” parameter to the tag. 22
  23. ERIKREAGAN • EECI PROBLEM Verbal review of the problem: My

    entire site is nothing but a “white page of death.” I can log in to the CP, but the front-end isn’t displaying. 23
  24. ERIKREAGAN • EECI 24 PROBLEM THE QUESTIONS Have you seen

    this problem in the past? • If so, what was the solution to that problem? • If not, it’s time to start making changes.
  25. ERIKREAGAN • EECI 25 PROBLEM CONFIRMATION • Make sure it’s

    not just a single template • Clear the cache • Review any recent repository changes • Recall any recent database changes
  26. ERIKREAGAN • EECI 26 PROBLEM THE CHANGES • Enable all

    debugging • Template debugging • Output profiler • Debug setting in EE • $debug variable in index.php
  27. ERIKREAGAN • EECI PROBLEM THE SOLUTION A newly implemented plugin,

    CI Helpers, had a bug in its plugin file. Turning on our debug settings allowed us to see the PHP error and fix the problem. 27
  28. ERIKREAGAN • EECI PROBLEM Verbal review of the problem: My

    entire site is nothing but a “white page of death.” This time it’s even the control panel. I can’t access the CP to turn on any debug settings or see what’s wrong. 28
  29. ERIKREAGAN • EECI 29 PROBLEM THE QUESTIONS Have you seen

    this problem in the past? • If so, what was the solution to that problem? • If not, it’s time to start making changes.
  30. ERIKREAGAN • EECI 30 PROBLEM CONFIRMATION • Review any recent

    repository changes • Recall any recent database changes
  31. ERIKREAGAN • EECI 31 PROBLEM THE CHANGES • Disable extensions

    to see if that helps • Enable all debugging in your config file • Template debugging • Output profiler • Debug setting in EE • $debug variable in index.php
  32. ERIKREAGAN • EECI PROBLEM THE SOLUTION A newly implemented extension

    had a bug in the code. Disabling extensions allowed us to determine it was an extension causing the problem. Turning on our debug settings allowed us to see the PHP error and fix the problem. 32
  33. ERIKREAGAN • EECI QUESTIONS • Verbally speak the problem •

    Have you seen this problem in the past? • Have you read about or hear someone talk about this problem? • What are the symptoms? 33
  34. ERIKREAGAN • EECI NON EE TIPS • .htaccess • print_r()

    • var_dump() • debug_backtrace() • Xdebug for PHP 34
  35. ERIKREAGAN • EECI GETTING HELP • Seek help on EE

    forums or 3rd party support channel • Ask on twitter (with the #eecms hash, of course) • Consider sites like Stack Overflow for general PHP or server issues 35
  36. ERIKREAGAN • EECI WHAT NOT TO DO • Bug the

    first person you see on AIM/Skype/gTalk without trying things yourself • Complain on the EE forums without troubleshooting yourself • Complain on a 3rd party dev's forums without troubleshooting yourself • Complain on twitter 36
  37. ERIKREAGAN • EECI 37 focuslabllc.com/blog/troubleshooting-expressionengine

  38. ERIKREAGAN • EECI THANKS! @ErikReagan 38