SlideShare una empresa de Scribd logo
1 de 11
Integrating 123betaal into Magento
Me


• Jira ICT
  – Training in Magento, Joomla! & Drupal
  – Consult regarding implementation, security, architecture, etc
  – Some other things like open source
• Jisse Reitsma (me)
  –   PHP programming (Magento, Joomla! & Drupal)
  –   System administrator
  –   Security consultant
  –   Writer of “Joomla!-templates ontwerpen”-book




                       Jisse Reitsma (www.jira.nl) @Dutch Magento Day   2
Steps


• Rename “PayPal” to “123betaal”
  – Package name “Jira”
  – Module name “123Betaal”
  – Total name “Jira_123Betaal”
• Debug everything that does not work
• Re-check functionality




                     Jisse Reitsma (www.jira.nl) @Dutch Magento Day   3
Debugging


In general
Read before you start
White Screen Of Death
  PHP Fatal Errors
  Regular PHP debugging


Specific problems
Garbled output because of XML syntax
  Legal but non-usable XML caused the buffer to go crazy
  The “Comment Everything” strategy
Model-class not found
  Using a different name-base then Mage_*
  Opening up the Magento source



                      Jisse Reitsma (www.jira.nl) @Dutch Magento Day   4
php|architects Guido to Prog. with Magento


• A very small book for a very complex application
• Requires a good understanding of Object-Oriented Programming




                 Jisse Reitsma (www.jira.nl) @Dutch Magento Day   5
White Screen Of Death


•   ... or read the PHP Fatal Error from the screen
•   ... or read the Apache error-log
•   Check the syntax of your PHP-code
•   Check the syntax of your Magento-specific code
•   RTFM (“Read The Fine Manual”)




                    Jisse Reitsma (www.jira.nl) @Dutch Magento Day   6
Garbled output because of XML syntax


Problem: When going to the “Settings” screen, instead of HTML
  something half compressed(?) is shown, but no error is logged.




• Conclusion 1: The problem lies in a XML error.
• Debug method: Comment everything but X
• Conclusion 2: <123betaal> is causing the problem, because the
  variable $123betaal can not exit
• Solution: Rename “123betaal” to “betaal123”


                  Jisse Reitsma (www.jira.nl) @Dutch Magento Day   7
Model “Mage_Jira_Betaal123” not found (1)


Problem: XML in “system.xml” contains a <source_model>-tag defining
  “betaal123/source_paymentAction” as PHP-class to fill the parameter
  in question with options. The final PHP-class that should be called is
  “[local]Jira_Betaal123_Model_Source_PaymentAction” but instead
  Magento tries to call “[*]Mage_Jira_Model_123Betaal” which does not
  exist.

• Debug method: Read all the PHP source-code involved




                   Jisse Reitsma (www.jira.nl) @Dutch Magento Day      8
Model “Mage_Jira_Betaal123” not found (2)


•   Mage_Adminhtml_Block_System_Config_Form::initFields()
•   Mage::getSingleton()
•   Mage::getModel()
•   Mage_Core_Model_Config::getModelInstance()
•   Mage_Core_Model_Config::getModelClassName()
•   Mage_Core_Model_Config::getGroupedClassName()
•   PROBLEM FOUND!

Cause: <source_model> can never refer to a base-name other than
 Mage_* (for instance Jira_Betaal123)

Solution: Rename “Jira_Betaal123” to “Mage_Betaal123”


                   Jisse Reitsma (www.jira.nl) @Dutch Magento Day   9
Copying module from server1 to server2


•   Copy all files through a ZIP-patch
•   Refresh “Admin” page
•   Huh, nothing happens?
•   Disable Cache
•   Refresh “Admin” page
•   (no database action needed!)
•   It works




                     Jisse Reitsma (www.jira.nl) @Dutch Magento Day   10
Conclusions


• Debugging requires a solid understanding of Object-Oriented PHP
• Debugging takes more time because of the complex object-hierarchy
  within the Magento core
• Third party packages can still cause (wierd) problems




                 Jisse Reitsma (www.jira.nl) @Dutch Magento Day   11

Más contenido relacionado

Similar a Jisse Reitsma 123betaal

Developing new feature in Joomla - Joomladay UK 2016
Developing new feature in Joomla - Joomladay UK 2016Developing new feature in Joomla - Joomladay UK 2016
Developing new feature in Joomla - Joomladay UK 2016Peter Martin
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101Mathew Beane
 
Finding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento CodeFinding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento CodeBen Marks
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101Mathew Beane
 
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...Peter Martin
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyMarcos Labad
 
Sandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession LearnedSandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession LearnedMinded Security
 
Encompassing Information Integration
Encompassing Information IntegrationEncompassing Information Integration
Encompassing Information Integrationnguyenfilip
 
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07garrett honeycutt
 
Creating Custom Templates for Joomla! 2.5
Creating Custom Templates for Joomla! 2.5Creating Custom Templates for Joomla! 2.5
Creating Custom Templates for Joomla! 2.5Don Cranford
 
Improving your code design using Java
Improving your code design using JavaImproving your code design using Java
Improving your code design using JavaRoan Brasil Monteiro
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara AnjargolianHakka Labs
 
How the HotSpot and Graal JVMs execute Java Code
How the HotSpot and Graal JVMs execute Java CodeHow the HotSpot and Graal JVMs execute Java Code
How the HotSpot and Graal JVMs execute Java CodeJim Gough
 
PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...
PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...
PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...Alessandro Molina
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development Mage Guru
 
Drupal 8 - Build Week Update
Drupal 8 - Build Week UpdateDrupal 8 - Build Week Update
Drupal 8 - Build Week UpdateAngela Byron
 
Java Performance Mistakes
Java Performance MistakesJava Performance Mistakes
Java Performance MistakesAndreas Grabner
 

Similar a Jisse Reitsma 123betaal (20)

Developing new feature in Joomla - Joomladay UK 2016
Developing new feature in Joomla - Joomladay UK 2016Developing new feature in Joomla - Joomladay UK 2016
Developing new feature in Joomla - Joomladay UK 2016
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101
 
Django at Scale
Django at ScaleDjango at Scale
Django at Scale
 
Finding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento CodeFinding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento Code
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101
 
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
 
Sandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession LearnedSandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession Learned
 
Encompassing Information Integration
Encompassing Information IntegrationEncompassing Information Integration
Encompassing Information Integration
 
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
 
Creating Custom Templates for Joomla! 2.5
Creating Custom Templates for Joomla! 2.5Creating Custom Templates for Joomla! 2.5
Creating Custom Templates for Joomla! 2.5
 
Improving your code design using Java
Improving your code design using JavaImproving your code design using Java
Improving your code design using Java
 
jQuery PPT
jQuery PPTjQuery PPT
jQuery PPT
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara Anjargolian
 
How the HotSpot and Graal JVMs execute Java Code
How the HotSpot and Graal JVMs execute Java CodeHow the HotSpot and Graal JVMs execute Java Code
How the HotSpot and Graal JVMs execute Java Code
 
PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...
PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...
PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...
 
Git Makes Me Angry Inside
Git Makes Me Angry InsideGit Makes Me Angry Inside
Git Makes Me Angry Inside
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development
 
Drupal 8 - Build Week Update
Drupal 8 - Build Week UpdateDrupal 8 - Build Week Update
Drupal 8 - Build Week Update
 
Java Performance Mistakes
Java Performance MistakesJava Performance Mistakes
Java Performance Mistakes
 

Más de Guido X Jansen

Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024Guido X Jansen
 
Grow Smart or Die Fast: 5 Guidelines to Navigate the Recession
Grow Smart or Die Fast: 5 Guidelines to Navigate the RecessionGrow Smart or Die Fast: 5 Guidelines to Navigate the Recession
Grow Smart or Die Fast: 5 Guidelines to Navigate the RecessionGuido X Jansen
 
Emerce Retail_Stage Session_SQLI&Spryker_2022_AU (1).pdf
Emerce Retail_Stage Session_SQLI&Spryker_2022_AU (1).pdfEmerce Retail_Stage Session_SQLI&Spryker_2022_AU (1).pdf
Emerce Retail_Stage Session_SQLI&Spryker_2022_AU (1).pdfGuido X Jansen
 
Emerce B2B_Stage Session_YOUWE&Spryker_2022_AU.pdf
Emerce B2B_Stage Session_YOUWE&Spryker_2022_AU.pdfEmerce B2B_Stage Session_YOUWE&Spryker_2022_AU.pdf
Emerce B2B_Stage Session_YOUWE&Spryker_2022_AU.pdfGuido X Jansen
 
B2BOnline_Keynote - Guido @ Emerce B2B Dinner.pdf
B2BOnline_Keynote - Guido @ Emerce B2B Dinner.pdfB2BOnline_Keynote - Guido @ Emerce B2B Dinner.pdf
B2BOnline_Keynote - Guido @ Emerce B2B Dinner.pdfGuido X Jansen
 
Emerce Live Keynote - June 1st 2022.pdf
Emerce Live Keynote - June 1st 2022.pdfEmerce Live Keynote - June 1st 2022.pdf
Emerce Live Keynote - June 1st 2022.pdfGuido X Jansen
 
Why Marketplace is Your Next Big Initiative
Why Marketplace is Your Next Big InitiativeWhy Marketplace is Your Next Big Initiative
Why Marketplace is Your Next Big InitiativeGuido X Jansen
 
Still A/B testing your buttons? You need to think (much) bigger...
Still A/B testing your buttons? You need to think (much) bigger...Still A/B testing your buttons? You need to think (much) bigger...
Still A/B testing your buttons? You need to think (much) bigger...Guido X Jansen
 
Persuasive e commerce workshop - Spryker
Persuasive e commerce workshop - SprykerPersuasive e commerce workshop - Spryker
Persuasive e commerce workshop - SprykerGuido X Jansen
 
JDE ecomweek presentation on user validation
JDE ecomweek presentation on user validationJDE ecomweek presentation on user validation
JDE ecomweek presentation on user validationGuido X Jansen
 
Picking software to run a business livestream
Picking software to run a business livestream Picking software to run a business livestream
Picking software to run a business livestream Guido X Jansen
 
Cross cultural website optimization
Cross cultural website optimizationCross cultural website optimization
Cross cultural website optimizationGuido X Jansen
 
Building your optimization technology stack
Building your optimization technology stackBuilding your optimization technology stack
Building your optimization technology stackGuido X Jansen
 
Data driven decisions meet psychology
Data driven decisions meet psychologyData driven decisions meet psychology
Data driven decisions meet psychologyGuido X Jansen
 
Building your optimization dream team
Building your optimization dream teamBuilding your optimization dream team
Building your optimization dream teamGuido X Jansen
 
Creating an optimization culture
Creating an optimization cultureCreating an optimization culture
Creating an optimization cultureGuido X Jansen
 
Optimization culture - Conversion Elite London 2018
Optimization culture - Conversion Elite London 2018Optimization culture - Conversion Elite London 2018
Optimization culture - Conversion Elite London 2018Guido X Jansen
 
Optimization culture @DDTT
Optimization culture @DDTTOptimization culture @DDTT
Optimization culture @DDTTGuido X Jansen
 

Más de Guido X Jansen (20)

Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
 
Outlook 2023
Outlook 2023Outlook 2023
Outlook 2023
 
Grow Smart or Die Fast: 5 Guidelines to Navigate the Recession
Grow Smart or Die Fast: 5 Guidelines to Navigate the RecessionGrow Smart or Die Fast: 5 Guidelines to Navigate the Recession
Grow Smart or Die Fast: 5 Guidelines to Navigate the Recession
 
Emerce Retail_Stage Session_SQLI&Spryker_2022_AU (1).pdf
Emerce Retail_Stage Session_SQLI&Spryker_2022_AU (1).pdfEmerce Retail_Stage Session_SQLI&Spryker_2022_AU (1).pdf
Emerce Retail_Stage Session_SQLI&Spryker_2022_AU (1).pdf
 
Emerce B2B_Stage Session_YOUWE&Spryker_2022_AU.pdf
Emerce B2B_Stage Session_YOUWE&Spryker_2022_AU.pdfEmerce B2B_Stage Session_YOUWE&Spryker_2022_AU.pdf
Emerce B2B_Stage Session_YOUWE&Spryker_2022_AU.pdf
 
B2BOnline_Keynote - Guido @ Emerce B2B Dinner.pdf
B2BOnline_Keynote - Guido @ Emerce B2B Dinner.pdfB2BOnline_Keynote - Guido @ Emerce B2B Dinner.pdf
B2BOnline_Keynote - Guido @ Emerce B2B Dinner.pdf
 
Emerce Live Keynote - June 1st 2022.pdf
Emerce Live Keynote - June 1st 2022.pdfEmerce Live Keynote - June 1st 2022.pdf
Emerce Live Keynote - June 1st 2022.pdf
 
Why Marketplace is Your Next Big Initiative
Why Marketplace is Your Next Big InitiativeWhy Marketplace is Your Next Big Initiative
Why Marketplace is Your Next Big Initiative
 
Still A/B testing your buttons? You need to think (much) bigger...
Still A/B testing your buttons? You need to think (much) bigger...Still A/B testing your buttons? You need to think (much) bigger...
Still A/B testing your buttons? You need to think (much) bigger...
 
Persuasive e commerce workshop - Spryker
Persuasive e commerce workshop - SprykerPersuasive e commerce workshop - Spryker
Persuasive e commerce workshop - Spryker
 
JDE ecomweek presentation on user validation
JDE ecomweek presentation on user validationJDE ecomweek presentation on user validation
JDE ecomweek presentation on user validation
 
Picking software to run a business livestream
Picking software to run a business livestream Picking software to run a business livestream
Picking software to run a business livestream
 
Cross cultural website optimization
Cross cultural website optimizationCross cultural website optimization
Cross cultural website optimization
 
Building your optimization technology stack
Building your optimization technology stackBuilding your optimization technology stack
Building your optimization technology stack
 
Data driven decisions meet psychology
Data driven decisions meet psychologyData driven decisions meet psychology
Data driven decisions meet psychology
 
Building your optimization dream team
Building your optimization dream teamBuilding your optimization dream team
Building your optimization dream team
 
Creating an optimization culture
Creating an optimization cultureCreating an optimization culture
Creating an optimization culture
 
Optimization culture - Conversion Elite London 2018
Optimization culture - Conversion Elite London 2018Optimization culture - Conversion Elite London 2018
Optimization culture - Conversion Elite London 2018
 
Optimization culture @DDTT
Optimization culture @DDTTOptimization culture @DDTT
Optimization culture @DDTT
 
Persuasive ecommerce
Persuasive ecommercePersuasive ecommerce
Persuasive ecommerce
 

Último

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 StrategiesBoston Institute of Analytics
 
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...Miguel Araújo
 
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, ...apidays
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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 CVKhem
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
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.pdfUK Journal
 
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)wesley chun
 

Último (20)

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
 
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...
 
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, ...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
+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...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
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)
 

Jisse Reitsma 123betaal

  • 2. Me • Jira ICT – Training in Magento, Joomla! & Drupal – Consult regarding implementation, security, architecture, etc – Some other things like open source • Jisse Reitsma (me) – PHP programming (Magento, Joomla! & Drupal) – System administrator – Security consultant – Writer of “Joomla!-templates ontwerpen”-book Jisse Reitsma (www.jira.nl) @Dutch Magento Day 2
  • 3. Steps • Rename “PayPal” to “123betaal” – Package name “Jira” – Module name “123Betaal” – Total name “Jira_123Betaal” • Debug everything that does not work • Re-check functionality Jisse Reitsma (www.jira.nl) @Dutch Magento Day 3
  • 4. Debugging In general Read before you start White Screen Of Death PHP Fatal Errors Regular PHP debugging Specific problems Garbled output because of XML syntax Legal but non-usable XML caused the buffer to go crazy The “Comment Everything” strategy Model-class not found Using a different name-base then Mage_* Opening up the Magento source Jisse Reitsma (www.jira.nl) @Dutch Magento Day 4
  • 5. php|architects Guido to Prog. with Magento • A very small book for a very complex application • Requires a good understanding of Object-Oriented Programming Jisse Reitsma (www.jira.nl) @Dutch Magento Day 5
  • 6. White Screen Of Death • ... or read the PHP Fatal Error from the screen • ... or read the Apache error-log • Check the syntax of your PHP-code • Check the syntax of your Magento-specific code • RTFM (“Read The Fine Manual”) Jisse Reitsma (www.jira.nl) @Dutch Magento Day 6
  • 7. Garbled output because of XML syntax Problem: When going to the “Settings” screen, instead of HTML something half compressed(?) is shown, but no error is logged. • Conclusion 1: The problem lies in a XML error. • Debug method: Comment everything but X • Conclusion 2: <123betaal> is causing the problem, because the variable $123betaal can not exit • Solution: Rename “123betaal” to “betaal123” Jisse Reitsma (www.jira.nl) @Dutch Magento Day 7
  • 8. Model “Mage_Jira_Betaal123” not found (1) Problem: XML in “system.xml” contains a <source_model>-tag defining “betaal123/source_paymentAction” as PHP-class to fill the parameter in question with options. The final PHP-class that should be called is “[local]Jira_Betaal123_Model_Source_PaymentAction” but instead Magento tries to call “[*]Mage_Jira_Model_123Betaal” which does not exist. • Debug method: Read all the PHP source-code involved Jisse Reitsma (www.jira.nl) @Dutch Magento Day 8
  • 9. Model “Mage_Jira_Betaal123” not found (2) • Mage_Adminhtml_Block_System_Config_Form::initFields() • Mage::getSingleton() • Mage::getModel() • Mage_Core_Model_Config::getModelInstance() • Mage_Core_Model_Config::getModelClassName() • Mage_Core_Model_Config::getGroupedClassName() • PROBLEM FOUND! Cause: <source_model> can never refer to a base-name other than Mage_* (for instance Jira_Betaal123) Solution: Rename “Jira_Betaal123” to “Mage_Betaal123” Jisse Reitsma (www.jira.nl) @Dutch Magento Day 9
  • 10. Copying module from server1 to server2 • Copy all files through a ZIP-patch • Refresh “Admin” page • Huh, nothing happens? • Disable Cache • Refresh “Admin” page • (no database action needed!) • It works Jisse Reitsma (www.jira.nl) @Dutch Magento Day 10
  • 11. Conclusions • Debugging requires a solid understanding of Object-Oriented PHP • Debugging takes more time because of the complex object-hierarchy within the Magento core • Third party packages can still cause (wierd) problems Jisse Reitsma (www.jira.nl) @Dutch Magento Day 11