SlideShare a Scribd company logo
1 of 46
Download to read offline
Chrissy Wainwright, Python Web Conf 2021
Debugging Your


Plone Site
Hi! 👋
🐞 @cdw9 on Twitter, GitHub, Flickr, etc


🐞 @sixfeetup Python developer


🐞 @plone Foundation President
Bugs Happen
Basic Debugging Process
Reproduce the bug


Find the cause


Fix the bug
Reproduce the Bug
Reproduce the Bug
🐞 Make sure it's reproducible
Reproduce the Bug
🐞 Make sure it's reproducible


🐞 Understand how it’s reproducible
Reproduce the Bug
🐞 Make sure it's reproducible


🐞 Understand how it’s reproducible


🐞 Reproduce on local instance before
fi
xing


🐞 Test on the same instance as the user if you can’t reproduce


🐞 Test against a copy of the data
Find the Cause
Find the Cause
🐞 Check the logs/Sentry/JS console
Find the Cause
🐞 Check the logs/Sentry/JS console


🐞 Is it a data/content issue, or a code issue
Find the Cause
🐞 Check the logs/Sentry/JS console


🐞 Is it a data/content issue, or a code issue


🐞 Python debugger
Find the Cause
🐞 Check the logs/Sentry/JS console


🐞 Is it a data/content issue, or a code issue


🐞 Python debugger


🐞 Use Web Inspector tools
Find the Cause
🐞 Check the logs/Sentry/JS console


🐞 Is it a data/content issue, or a code issue


🐞 Python debugger


🐞 Use Web Inspector tools


🐞 Was it introduced by recent code changes?
Find the Cause
🐞 Check the logs/Sentry/JS console


🐞 Is it a data/content issue, or a code issue


🐞 Python debugger


🐞 Use Web Inspector tools


🐞 Was it introduced by recent code changes?


🐞 Don't rule out the possibility that the bug is in an add-on or core code
Find the Cause - Get Help
🐞 Rubber duck debugging


🐞 Ask colleagues, pair program


🐞 Community forum
Find the Cause - Get Help
🐞 Rubber duck debugging


🐞 Ask colleagues, pair program


🐞 Community forum


🐞 Walk away and come back later
Fix the Bug
Fix the Bug
🐞 Is there a workaround you can give the users for now?
🐞 Is there a workaround you can give the users for now?


🐞 If the user did something wrong, can you put something in place that will
expect or prevent the behavior?
Fix the Bug
🐞 Is there a workaround you can give the users for now?


🐞 If the user did something wrong, can you put something in place that will
expect or prevent the behavior?


🐞 Make sure your
fi
x disrupts the users as little as possible
Fix the Bug
🐞 Is there a workaround you can give the users for now?


🐞 If the user did something wrong, can you put something in place that will
expect or prevent the behavior?


🐞 Make sure your
fi
x disrupts the users as little as possible


🐞 Update the tests
Fix the Bug
Fix the Bug - Follow Up
🐞 Do what you can to help your future self
🐞 Do what you can to help your future self


🐞 Update forum post / collaborators with answer
Fix the Bug - Follow Up
🐞 Do what you can to help your future self


🐞 Update forum post / collaborators with answer


🐞 Submit PR
Fix the Bug - Follow Up
Debugging in Plone
Check the error_log
Check the Undo log
instance-debug + SSH tunnel
$ ssh -L 8089:localhost:8089 site.com


$ cd /path/to/plone


$ bin/instance-debug fg


View site at http://localhost:8089
Export section of data as .zexp
/buildout/var/parts/instance/import


Put .zexp in
Debugging Add-ons
plone.app.debugtoolbar


collective.recipe.omelette


plone.reload


Products.PDBDebugMode
PDBDebugMode
• Post-mortem debugger


• @@pdb browser view


• <?python locals().update(econtext);
import pdb; pdb.set_trace() ?>
Plone Classic Front-end bugs
• Disable the theme in the Theming control panel, set
back to Barceloneta


• Turn on development mode in the Resource Registries
Test in Vanilla Plone
• Disable the theme


• Test in the same site without data


• Create a new Plone site at the same
Zope root


• Test on demo.plone.org >>
portal_catalog Browser
Check online
• community.plone.org


• GitHub - Products.CMFPlone issues
Examples!
Example 1
A minor Plone upgrade broke the login
Example 2
Snippets were not loading in some cases
/depts/outreach/dual-credit:
/depts/outreach/dual-credit/high-school-and-dual-credit-programs
if self.request['PATH_INFO'].endswith('edit'):


return result
Example 3
A form was not displaying in the navigation portlet
excludeFromNav vs exclude_from_nav
Thank you!

More Related Content

What's hot

Vinted life embetterment
Vinted life embettermentVinted life embetterment
Vinted life embetterment
Agile Lietuva
 

What's hot (20)

GDG SF Meetup - Progressive Web Apps 101
GDG SF Meetup - Progressive Web Apps 101GDG SF Meetup - Progressive Web Apps 101
GDG SF Meetup - Progressive Web Apps 101
 
redhat_intern
redhat_internredhat_intern
redhat_intern
 
Is your python application secure? - PyCon Canada - 2015-11-07
Is your python application secure? - PyCon Canada - 2015-11-07Is your python application secure? - PyCon Canada - 2015-11-07
Is your python application secure? - PyCon Canada - 2015-11-07
 
Pharo JS
Pharo JSPharo JS
Pharo JS
 
On Call Engineer Happiness - DevOps Days Galway 2017
On Call Engineer Happiness - DevOps Days Galway 2017On Call Engineer Happiness - DevOps Days Galway 2017
On Call Engineer Happiness - DevOps Days Galway 2017
 
Vinted life embetterment
Vinted life embettermentVinted life embetterment
Vinted life embetterment
 
Hacking Selenium @ JSConf
Hacking Selenium @ JSConfHacking Selenium @ JSConf
Hacking Selenium @ JSConf
 
Testing containers with TestContainers @ AJUG 7/18/2017
Testing containers with TestContainers @ AJUG 7/18/2017Testing containers with TestContainers @ AJUG 7/18/2017
Testing containers with TestContainers @ AJUG 7/18/2017
 
Joel Arvidsson, Klarna. What You See is What You Get – a case for visual testing
Joel Arvidsson, Klarna. What You See is What You Get – a case for visual testingJoel Arvidsson, Klarna. What You See is What You Get – a case for visual testing
Joel Arvidsson, Klarna. What You See is What You Get – a case for visual testing
 
Extract source code from an Android apk file
Extract source code from an Android apk fileExtract source code from an Android apk file
Extract source code from an Android apk file
 
Html5
Html5 Html5
Html5
 
PHPUnit Automated Unit Testing Framework
PHPUnit Automated Unit Testing FrameworkPHPUnit Automated Unit Testing Framework
PHPUnit Automated Unit Testing Framework
 
JPA 스터디 Week1 - 하이버네이트, 캐시
JPA 스터디 Week1 - 하이버네이트, 캐시JPA 스터디 Week1 - 하이버네이트, 캐시
JPA 스터디 Week1 - 하이버네이트, 캐시
 
44CON London 2015 - reverse reverse engineering
44CON London 2015 - reverse reverse engineering44CON London 2015 - reverse reverse engineering
44CON London 2015 - reverse reverse engineering
 
Feature flags, a/b testing, canary amd split traffic ~ hail new agile po
Feature flags, a/b testing, canary amd split traffic ~ hail new agile poFeature flags, a/b testing, canary amd split traffic ~ hail new agile po
Feature flags, a/b testing, canary amd split traffic ~ hail new agile po
 
Basic reverse engineering steps about .apk file
Basic reverse engineering steps about .apk fileBasic reverse engineering steps about .apk file
Basic reverse engineering steps about .apk file
 
Building Big on the Web
Building Big on the WebBuilding Big on the Web
Building Big on the Web
 
JPA Week4. VALUE TYPES / CQRS
JPA Week4. VALUE TYPES / CQRSJPA Week4. VALUE TYPES / CQRS
JPA Week4. VALUE TYPES / CQRS
 
Oneclick Features
Oneclick FeaturesOneclick Features
Oneclick Features
 
IzPack - PoitouJUG
IzPack - PoitouJUGIzPack - PoitouJUG
IzPack - PoitouJUG
 

Similar to Debugging Your Plone Site

Passing The Joel Test In The PHP World
Passing The Joel Test In The PHP WorldPassing The Joel Test In The PHP World
Passing The Joel Test In The PHP World
Lorna Mitchell
 
Frequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last timeFrequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last time
Andreas Jung
 
Howto Test A Patch And Make A Difference!
Howto Test A Patch And Make A Difference!Howto Test A Patch And Make A Difference!
Howto Test A Patch And Make A Difference!
Joel Farris
 

Similar to Debugging Your Plone Site (20)

Passing The Joel Test In The PHP World
Passing The Joel Test In The PHP WorldPassing The Joel Test In The PHP World
Passing The Joel Test In The PHP World
 
Frequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last timeFrequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last time
 
Design and Evolution of cyber-dojo
Design and Evolution of cyber-dojoDesign and Evolution of cyber-dojo
Design and Evolution of cyber-dojo
 
Pimp my Plone
Pimp my PlonePimp my Plone
Pimp my Plone
 
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
 
Jr devsurvivalguide
Jr devsurvivalguideJr devsurvivalguide
Jr devsurvivalguide
 
Dear compiler please don't be my nanny v2
Dear compiler  please don't be my nanny v2Dear compiler  please don't be my nanny v2
Dear compiler please don't be my nanny v2
 
Ungooglable
UngooglableUngooglable
Ungooglable
 
Howto Test A Patch And Make A Difference!
Howto Test A Patch And Make A Difference!Howto Test A Patch And Make A Difference!
Howto Test A Patch And Make A Difference!
 
Scientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of dataScientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of data
 
Preparing for the WebGeek DevCup
Preparing for the WebGeek DevCupPreparing for the WebGeek DevCup
Preparing for the WebGeek DevCup
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
 
When Good Code Goes Bad: Tools and Techniques for Troubleshooting Plone
When Good Code Goes Bad: Tools and Techniques for Troubleshooting PloneWhen Good Code Goes Bad: Tools and Techniques for Troubleshooting Plone
When Good Code Goes Bad: Tools and Techniques for Troubleshooting Plone
 
The Junior Developer Survival Guide - GDI Ann Arbor 2/10/15
The Junior Developer Survival Guide -  GDI Ann Arbor 2/10/15The Junior Developer Survival Guide -  GDI Ann Arbor 2/10/15
The Junior Developer Survival Guide - GDI Ann Arbor 2/10/15
 
Resources For Floss Projects
Resources For Floss ProjectsResources For Floss Projects
Resources For Floss Projects
 
Firefox for Android Nightly (Fennec) Testing
Firefox for Android Nightly (Fennec) TestingFirefox for Android Nightly (Fennec) Testing
Firefox for Android Nightly (Fennec) Testing
 
Quality of Bug Reports in Open Source
Quality of Bug Reports in Open SourceQuality of Bug Reports in Open Source
Quality of Bug Reports in Open Source
 
Intro to WordPress Plugins
Intro to WordPress PluginsIntro to WordPress Plugins
Intro to WordPress Plugins
 
Reusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de ZopeReusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de Zope
 
Introducing BugBase 1.0
Introducing BugBase 1.0Introducing BugBase 1.0
Introducing BugBase 1.0
 

More from cdw9

Unknown plone
Unknown ploneUnknown plone
Unknown plone
cdw9
 
How to Get Started Theming Plone
How to Get Started Theming PloneHow to Get Started Theming Plone
How to Get Started Theming Plone
cdw9
 

More from cdw9 (11)

Crafting an Impactful Home Page That Your Editors Will Love
Crafting an Impactful Home Page That Your Editors Will LoveCrafting an Impactful Home Page That Your Editors Will Love
Crafting an Impactful Home Page That Your Editors Will Love
 
Contributing to Open Source (Lightning Talk version)
Contributing to Open Source (Lightning Talk version)Contributing to Open Source (Lightning Talk version)
Contributing to Open Source (Lightning Talk version)
 
Debugging with PDB
Debugging with PDBDebugging with PDB
Debugging with PDB
 
Introduction to Transmogrifier
Introduction to TransmogrifierIntroduction to Transmogrifier
Introduction to Transmogrifier
 
Contributing to Open Source
Contributing to Open SourceContributing to Open Source
Contributing to Open Source
 
The Future of [Plone] Theming
The Future of [Plone] ThemingThe Future of [Plone] Theming
The Future of [Plone] Theming
 
Unknown plone
Unknown ploneUnknown plone
Unknown plone
 
How to Get Started Theming Plone
How to Get Started Theming PloneHow to Get Started Theming Plone
How to Get Started Theming Plone
 
Making CSS and Firebug Your New Friends
Making CSS and Firebug Your New FriendsMaking CSS and Firebug Your New Friends
Making CSS and Firebug Your New Friends
 
Intro to TAL
Intro to TALIntro to TAL
Intro to TAL
 
Plone Theming in a Nutshell
Plone Theming in a NutshellPlone Theming in a Nutshell
Plone Theming in a Nutshell
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Debugging Your Plone Site