19. Debugging
Debugging is a methodical process of finding and
reducing the number of bugs, or defects, in a computer program or a
piece of electronic hardware, thus making it behave as expected.
–wikipedia
22. When you assume…
Don’t assume it’s an extension
Don’t assume it’s the database
Don’t assume it’s your host
Don’t assume…
It’s much faster to determine what the problem is
than what the problem isn’t.
23. Is it plugged in?
Can you SSH/FTP?
Can you access a static HTML file?
Can you access your database?
Can you access PHP info?
25. Broad strokes
Check the application, can you log into the CP?
Check the templates, can you access other
pages?
Remove half the template, does it show up?
Remove a fourth the template, does it show up?
Rinse, repeat…
26. KISS Huot Style
1. Test a static file
2. Test the control panel
3. Test other templates
4. Remove the entire trouble template, replace it
with “test”
5. Fill back in the template until it breaks
27. KISS Huot Style
6. Is the trouble spot fixable in the template?
7. If not open the add-on and place debugging
lines throughout
8. Is the trouble spot in the add-on?
9. If not open the core EE files and place
debugging lines throughout
36. Is it plugged in?
Check with the client, what is really missing?
Can they tell you anything about the data?
What channel it was in?
What status they set it to?
5:58 pm
on a Friday
37. The Solution
“Don't worry Mark, they never existed in the DB. We got to
the bottom of it. I'm adding them by hand tomorrow. Sorry for
all the confusion.”
6:23 pm
on a Friday
60. Under the Hood
Standard EE 2.x install
EE Members
EE Member Custom Profile Fields
Mark Huot Vote Module
Solspace User Module
61. All together now…
The Vote module records votes in a separate
database table.
The Vote module summarizes total votes into a
standard EE member profile field.
The User module displays users ordered by the
EE member profile field.
64. It’s Vote’s Fault
Module code looks correct.
Correctly using
exp_member_data table.
Pulling correct custom
field, I think…
65. It’s User’s Fault
Nope, template appears
correct.
Sorting by other fields
works as expected
(username, other custom
fields).
Sort attribute correctly flips
the results, but keeps them
out of order.