SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
MAGENTO 2 AND AVOIDING THE
RABBIT HOLE
Tony Brown
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Imagine…
• You’re on the “learn Magento 2” journey
• You hit a tricky problem which isn’t easy to
diagnose
• What do you do?
• How can you avoid losing time when learning /
fixing problems?
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
• Worked on Magento since 1.2
• Technical Director @ Space 48
• Love learning and collaborating
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Overview
• Magento 1 to Magento 2
• A learning / debugging technique
• Magento 2 development environment
• Problem solving example in M2
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Magento 1 to Magento 2
• Architecture changes
• Makes it easier to write tests
• More isolation of code
• More component friendly
• Mechanisms for more targeted changes
• Test coverage
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
What does this mean?
• Your WTF per minute rate is going to increase for a
while!
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Learning / Debugging Technique
• Debugging and Magento : https://youtu.be/xCjPQfuxxxQ
• Time can run away
• Regularly stepping back
• Pomodoro technique
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Dev Environment / Infrastructure
• VM via Vagrant
• Nginx, PHP-PFM (v7) with Xdebug
• Percona MySql
• Varnish
• SSL
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Varnish
Nginx
8080
HTTP
80
Varnish
Nginx
8080
HTTPS
80
Nginx
443
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Problem Solving Example
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
The problem
Varnish for Full Page Cache
+
SSL for the front-end
=
No navigation menu in Luma
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Research for M2 FPC
• Magento Stackexchange
• Same problem, but no answers! http://goo.gl/xK7VQi
• Alan Kent article
• http://devdocs.magento.com
• Other blog posts inc. Alan Storm: http://goo.gl/o4Z107
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
FPC with Varnish
• Varnish holds content responses for URL requests
• Magento decides if a page should be cached or not
• Ajax is used for private data
• ESI is used for finer control of public cache
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Debugging Steps
• Are there any errors in the Magento Logs?
• Are there any console errors?
• Examine the HTML output?
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Output over HTTPS
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Output over HTTP
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Debugging Steps
• Examine Varnish cache headers
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Debugging Steps
• Find the block definition
/vendor/magento/module-theme/view/frontend/layout/default.xml
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Debugging Steps
• Step through the code:
• /vendor/magento/module-page-cache/Model/
App/FrontController/VarnishPlugin.php
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
HTTPS = Not working
HTTP = working
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Debugging Steps
• Visit the ESI Controller directly
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
HTTPS HTTP
magento2.local/page_cache/block/esi/blocks/[%22catalog.topnav%22]/
handles/…
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Debugging Steps
• Verify the ESI Controller is being called by Varnish
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Debugging Steps
• Looking for Varnish logs?… use varnishlog
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Debugging Steps
• Search for the error
• An old Varnish ticket was found:
By default ignore an <esi:include> with src=" https://..."
Feature +esi_ignore_https treats it as http://... instead.
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Debugging Steps
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
Conclusion
• Magento 2 has a tricky learning curve
• Take regular breaks to avoid wasting time
• The Varnish FPC implementation is pretty cool!
@TONEGOLF71
@SPACE48ERS
#MAGETITANSIT
THANKS!!
Any questions?

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

How to improve Core Web Vitals on a WordPress website
How to improve Core Web Vitals on a WordPress websiteHow to improve Core Web Vitals on a WordPress website
How to improve Core Web Vitals on a WordPress website
 
Estrategias SEO en Gestion de Stocks para Ecommerce #CEMD2020
Estrategias SEO en Gestion de Stocks para Ecommerce  #CEMD2020Estrategias SEO en Gestion de Stocks para Ecommerce  #CEMD2020
Estrategias SEO en Gestion de Stocks para Ecommerce #CEMD2020
 
The Value of Featured Snippets (BrightonSEO 2023).pdf
The Value of Featured Snippets (BrightonSEO 2023).pdfThe Value of Featured Snippets (BrightonSEO 2023).pdf
The Value of Featured Snippets (BrightonSEO 2023).pdf
 
Core Web Vitals and SEO: Don't Panic. Improve.
Core Web Vitals and SEO: Don't Panic. Improve.Core Web Vitals and SEO: Don't Panic. Improve.
Core Web Vitals and SEO: Don't Panic. Improve.
 
SEO Reporting: Slay the Time-Sucking Monster and Deliver Amazing Reports
SEO Reporting: Slay the Time-Sucking Monster and Deliver Amazing ReportsSEO Reporting: Slay the Time-Sucking Monster and Deliver Amazing Reports
SEO Reporting: Slay the Time-Sucking Monster and Deliver Amazing Reports
 
How to Use Search Intent to Dominate Google Discover
How to Use Search Intent to Dominate Google DiscoverHow to Use Search Intent to Dominate Google Discover
How to Use Search Intent to Dominate Google Discover
 
Un Puzzle de 4 piezas llamado SEO [#ECONGRESS19]
Un Puzzle de 4 piezas llamado SEO [#ECONGRESS19]Un Puzzle de 4 piezas llamado SEO [#ECONGRESS19]
Un Puzzle de 4 piezas llamado SEO [#ECONGRESS19]
 
brightonSEO April 2023 - Sarah Presch - The Psychology Behind Inclusive iSEO ...
brightonSEO April 2023 - Sarah Presch - The Psychology Behind Inclusive iSEO ...brightonSEO April 2023 - Sarah Presch - The Psychology Behind Inclusive iSEO ...
brightonSEO April 2023 - Sarah Presch - The Psychology Behind Inclusive iSEO ...
 
Migraciones SEO para eCommerce - VisibilidadOn - Presentación Josep Deulofeu
Migraciones SEO para eCommerce - VisibilidadOn - Presentación Josep DeulofeuMigraciones SEO para eCommerce - VisibilidadOn - Presentación Josep Deulofeu
Migraciones SEO para eCommerce - VisibilidadOn - Presentación Josep Deulofeu
 
Google Tag Manager
Google Tag ManagerGoogle Tag Manager
Google Tag Manager
 
TechSEO Boost - Apps script for SEOs
TechSEO Boost - Apps script for SEOsTechSEO Boost - Apps script for SEOs
TechSEO Boost - Apps script for SEOs
 
Advanced Ways to Use Ahrefs (That You Didn't Know About)
Advanced Ways to Use Ahrefs (That You Didn't Know About)Advanced Ways to Use Ahrefs (That You Didn't Know About)
Advanced Ways to Use Ahrefs (That You Didn't Know About)
 
GretaMunari - The redemption of content automation
GretaMunari - The redemption of content automationGretaMunari - The redemption of content automation
GretaMunari - The redemption of content automation
 
Análisis de Contenidos y Competencia: Screaming Frog y Xpath #SeoDay
Análisis de Contenidos y Competencia: Screaming Frog y Xpath #SeoDayAnálisis de Contenidos y Competencia: Screaming Frog y Xpath #SeoDay
Análisis de Contenidos y Competencia: Screaming Frog y Xpath #SeoDay
 
Disambiguating Equiprobability in SEO Dawn Anderson Friends of Search 2020
Disambiguating Equiprobability in SEO Dawn Anderson Friends of Search 2020Disambiguating Equiprobability in SEO Dawn Anderson Friends of Search 2020
Disambiguating Equiprobability in SEO Dawn Anderson Friends of Search 2020
 
BrightonSEO - Apr 2022 - No excuses for doing UX
BrightonSEO - Apr 2022 - No excuses for doing UXBrightonSEO - Apr 2022 - No excuses for doing UX
BrightonSEO - Apr 2022 - No excuses for doing UX
 
SEO orientado a Objetivos de Negocio
SEO orientado a Objetivos de NegocioSEO orientado a Objetivos de Negocio
SEO orientado a Objetivos de Negocio
 
KIM DEWE - Transitioning into people management (BrightonSEO April 2022)
KIM DEWE - Transitioning into people management (BrightonSEO April 2022)KIM DEWE - Transitioning into people management (BrightonSEO April 2022)
KIM DEWE - Transitioning into people management (BrightonSEO April 2022)
 
brighton final.pptx
brighton final.pptxbrighton final.pptx
brighton final.pptx
 
Corrie Jones BrightonSEO deck
Corrie Jones BrightonSEO deckCorrie Jones BrightonSEO deck
Corrie Jones BrightonSEO deck
 

Destaque

Business Plan Final Dec 15
Business Plan Final Dec 15Business Plan Final Dec 15
Business Plan Final Dec 15
Michele Worden
 
Trabalho sobre eleições - João
Trabalho sobre eleições - JoãoTrabalho sobre eleições - João
Trabalho sobre eleições - João
Tânia Regina
 
01. simuladores de negocio
01. simuladores de negocio01. simuladores de negocio
01. simuladores de negocio
Cesar
 

Destaque (19)

Key Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UKKey Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UK
 
Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2
 
Checkout in Magento 2 by Max Pronko
Checkout in Magento 2 by Max PronkoCheckout in Magento 2 by Max Pronko
Checkout in Magento 2 by Max Pronko
 
A Successful Magento Project From Design to Deployment
A Successful Magento Project From Design to DeploymentA Successful Magento Project From Design to Deployment
A Successful Magento Project From Design to Deployment
 
Magento 2
Magento 2Magento 2
Magento 2
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
 
Business Plan Final Dec 15
Business Plan Final Dec 15Business Plan Final Dec 15
Business Plan Final Dec 15
 
Performance durch Caching
Performance durch CachingPerformance durch Caching
Performance durch Caching
 
Magento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed OptimizationMagento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed Optimization
 
How to Install Magento 2 on XAMPP Server localhost.
How to Install Magento 2 on XAMPP Server localhost.How to Install Magento 2 on XAMPP Server localhost.
How to Install Magento 2 on XAMPP Server localhost.
 
Trabalho sobre eleições - João
Trabalho sobre eleições - JoãoTrabalho sobre eleições - João
Trabalho sobre eleições - João
 
Ulrich
UlrichUlrich
Ulrich
 
La revolution russe (2)
La revolution russe (2)La revolution russe (2)
La revolution russe (2)
 
Panda Update @ TradeTracker
Panda Update @ TradeTrackerPanda Update @ TradeTracker
Panda Update @ TradeTracker
 
Magento 1.x to Magento 2 Code Migration Tools
Magento 1.x to Magento 2 Code Migration ToolsMagento 1.x to Magento 2 Code Migration Tools
Magento 1.x to Magento 2 Code Migration Tools
 
01. simuladores de negocio
01. simuladores de negocio01. simuladores de negocio
01. simuladores de negocio
 
아마존 AWS 클라우드에서 Magento 설치 매뉴얼
아마존 AWS 클라우드에서 Magento 설치 매뉴얼아마존 AWS 클라우드에서 Magento 설치 매뉴얼
아마존 AWS 클라우드에서 Magento 설치 매뉴얼
 
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid itIgor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
 
Afm uitvaart111202
Afm uitvaart111202Afm uitvaart111202
Afm uitvaart111202
 

Semelhante a Magento 2 and avoiding the rabbit hole

Today’s webinar is presented by Janet Gregory and she will d.docx
Today’s webinar is presented by Janet Gregory and she will d.docxToday’s webinar is presented by Janet Gregory and she will d.docx
Today’s webinar is presented by Janet Gregory and she will d.docx
edwardmarivel
 

Semelhante a Magento 2 and avoiding the rabbit hole (20)

Debugging and Magento
Debugging and MagentoDebugging and Magento
Debugging and Magento
 
Magento 2 Development for PHP Developers
Magento 2 Development for PHP DevelopersMagento 2 Development for PHP Developers
Magento 2 Development for PHP Developers
 
2015 nouveaux outilsdevweb
2015 nouveaux outilsdevweb2015 nouveaux outilsdevweb
2015 nouveaux outilsdevweb
 
MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2
 
Performance tuning
Performance tuningPerformance tuning
Performance tuning
 
Shifting is more than shifting left
Shifting is more than shifting leftShifting is more than shifting left
Shifting is more than shifting left
 
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferencedayPaving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
 
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
 
Everything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick Stox
Everything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick StoxEverything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick Stox
Everything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick Stox
 
Magento 2 Performance: Every Second Counts
Magento 2 Performance: Every Second CountsMagento 2 Performance: Every Second Counts
Magento 2 Performance: Every Second Counts
 
Today’s webinar is presented by Janet Gregory and she will d.docx
Today’s webinar is presented by Janet Gregory and she will d.docxToday’s webinar is presented by Janet Gregory and she will d.docx
Today’s webinar is presented by Janet Gregory and she will d.docx
 
Page Experience Update TMC June 2021 Patrick Stox
Page Experience Update TMC June 2021 Patrick StoxPage Experience Update TMC June 2021 Patrick Stox
Page Experience Update TMC June 2021 Patrick Stox
 
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
 
SFSCON23 - Tommaso Bailetti - Improving developer experience in Open Source P...
SFSCON23 - Tommaso Bailetti - Improving developer experience in Open Source P...SFSCON23 - Tommaso Bailetti - Improving developer experience in Open Source P...
SFSCON23 - Tommaso Bailetti - Improving developer experience in Open Source P...
 
Ben Marks - Magento in the Age of 2
Ben Marks - Magento in the Age of 2Ben Marks - Magento in the Age of 2
Ben Marks - Magento in the Age of 2
 
Monufacture: Effortless Test Data for MongoDB
Monufacture: Effortless Test Data for MongoDBMonufacture: Effortless Test Data for MongoDB
Monufacture: Effortless Test Data for MongoDB
 
Cloud agnostic serverless with fn project
Cloud agnostic serverless with fn projectCloud agnostic serverless with fn project
Cloud agnostic serverless with fn project
 
Magento 2 Modules are Easy!
Magento 2 Modules are Easy!Magento 2 Modules are Easy!
Magento 2 Modules are Easy!
 
Kubernetes: Learning from Zero to Production
Kubernetes: Learning from Zero to ProductionKubernetes: Learning from Zero to Production
Kubernetes: Learning from Zero to Production
 
Testing responsive websites @EuroTestConf
Testing responsive websites @EuroTestConfTesting responsive websites @EuroTestConf
Testing responsive websites @EuroTestConf
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
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?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Magento 2 and avoiding the rabbit hole