Slide 1

Slide 1 text

ERIKREAGAN • EECI DEBUGGING EE SITE PROBLEMS

Slide 2

Slide 2 text

ERIKREAGAN • EECI WHO IS THIS GUY? 2 Partner & Lead Developer

Slide 3

Slide 3 text

ERIKREAGAN • EECI FORMAT Sample problem Debugging process 3

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

ERIKREAGAN • EECI SAMPLE PROBLEMS 9

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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.

Slide 15

Slide 15 text

ERIKREAGAN • EECI 15 PROBLEM CONFIRMATION • Check database details • Clear the cache • Try updating a different template (narrow the search)

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

ERIKREAGAN • EECI PROBLEM Verbal review of the problem: My channel:entries loop isn’t returning the expected number of results. 18

Slide 19

Slide 19 text

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.

Slide 20

Slide 20 text

ERIKREAGAN • EECI 20 PROBLEM CONFIRMATION • Check number of results with CP filter (if possible) • Clear the cache

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

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.

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

ERIKREAGAN • EECI 26 PROBLEM THE CHANGES • Enable all debugging • Template debugging • Output profiler • Debug setting in EE • $debug variable in index.php

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

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.

Slide 30

Slide 30 text

ERIKREAGAN • EECI 30 PROBLEM CONFIRMATION • Review any recent repository changes • Recall any recent database changes

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

ERIKREAGAN • EECI NON EE TIPS • .htaccess • print_r() • var_dump() • debug_backtrace() • Xdebug for PHP 34

Slide 35

Slide 35 text

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

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

ERIKREAGAN • EECI 37 focuslabllc.com/blog/troubleshooting-expressionengine

Slide 38

Slide 38 text

ERIKREAGAN • EECI THANKS! @ErikReagan 38