SlideShare a Scribd company logo
1 of 26
Download to read offline
TOP 20 DRUPAL MISTAKES
NEWBIES MAKE
Iztok Smolič, Drupal Camp London, Mar 2013
Thursday, August 29, 13
WHO IS
• Web architect, Drupal site builder, themer
• Drupal consultant (iztoksmolic.com)
• Drupal studio owner (agiledrop.com)
• Local meetups organizer,
Drupal evangelist,
Drupal Slovenia Association
Thursday, August 29, 13
THE COUNTDOWN
Thursday, August 29, 13
20. NOT ATTENDING YOUR
NEAREST DRUPAL CAMPS
• I find hard to trust developers/themers that are not active in Drupal
community
• Find local user groups, attend meetups
• Attend camp and conferences world wide
• Engaging on groups.drupal.org or drupal.org/forum
• Just putting your self into your work I guess
Thursday, August 29, 13
19. TRYING TO BEND
DRUPAL TO BEHAVE LIKE...
• Can we make it work/look/behave like Joomla,
Wordpress, Typo3 etc.
Thursday, August 29, 13
18. BAD CONTENT
ARCHITECTURE DECISIONS
• Using too much content types
(e.g. is Article really so different from Public release? Maybe we can
use category to separate them?)
• Not using content types
(e.g. instead of listing staff as a table in a page’s body, better to build
the page with Views and list content type Staff member)
• Not using Taxonomy, Organic Groups, Entity Reference to link
together entities.
• Be consistent - have a concept that does not duplicate your code. No
real formula, just practice and experiences.
Thursday, August 29, 13
17. NOT KNOWING THE
FURNITURE
• Designers,
architects should
be aware of
common elements
• Check blog post
from Chapter
Three:
http://
tinyurl.com/
yape9rb
Thursday, August 29, 13
16. TARGETING TOO
SPECIFIC CLASSES AND IDS
• Drupal outputs a LOT of markup with specific HTML classes and ids. Knowing
which class is appropriate to target is the key.
• IDs are usually unique identifiers for blocks/nodes/views. Avoid using IDs in CSS.
• Views have classes with view name and display name separated. Can be used to
reuse CSS code.
• .items-list, .content, .view-content etc. are used all over your Drupal site, be
careful targeting those classes.
Thursday, August 29, 13
15. NOT FAMILIAR
WITH DEBUGGING
TOOLS
• When you would usually use
print_r() to get the content of a
array or object to your browser,
Drupal has Devel (http://
drupal.org/project/devel):
• dpm($variable) – prints content of
variable in human friendly way
• You can also store info to a log:
http://drupal.org/project/
object_log
• Can’t find the right template?
Use Devel Themer (http://
drupal.org/project/devel_themer)
Thursday, August 29, 13
14. ORPHANED MODULES
• Clean your environment, or even better, test modules on other
installations!
• Leaving old, unused modules can confuse you latter on, not to mention
how confused other developers can get.
Thursday, August 29, 13
13. FORGETTING ABOUT
BACK-END UX
• Drupal is criticized for having a bad user experience for end
users. Don’t blame Dries, its your fault!
• Drupal is a framework, back end should be part of developer’s
efforts when building a website.
Thursday, August 29, 13
12. NOT KEEPING TRACK
OF DRUPAL DEVELOPMENT
• Know when the next version of core/module is crucial
for god strategic decisions.
• Keep track of interesting / new modules:
• Lullabot Module Monday
• theweeklydrop.com
• http://drupal.org/project/modules
• twitter: @alldrupal
Thursday, August 29, 13
11. USING DEFAULT BLOCK
SYSTEM
• Use default blocks system only
if project is very very simple.
• A couple of alternatives were
made to improve block
system, I bet on the following
two:
• Context, which is block
system on steroids
• Panels, introduces new
block-like concept
Thursday, August 29, 13
10. CODING SPECIFIC PAGE
TEMPLATES FOR EACH SUB-PAGE
• Try to omit page--xxx.tpl.php templates. It duplicates the code,
and makes maintenance difficult.
• Try using Context Layout or Panels if variations of markup are
needed.
Panels have a
drag’n’drop
interface that can
replace coding
own page.tpl-s
Thursday, August 29, 13
9. NOT RESPECTING THE
CODING STANDARDS
• Different approaches and coding styles make code less
organized and makes the job for other developers more
difficult.
• two spaces indentation
• $var = foo($bar, $baz, $quux);
• $some_array = array('hello', 'world', 'foo' => 'bar');
• <?php print $title; ?>
• http://drupal.org/coding-standards
Thursday, August 29, 13
8. NOT USING DRUPAL API
• Drupal comes with some very handy functions, we
should use them
• l() and url() - in contrast of hardcoded relative
URL address can outputs aliased URL path
• base_path(), returns base URL of the Drupal
installation
• theme() functions
Thursday, August 29, 13
7. CHOOSING LESS OR
UNSUPPORTED MODULES• Check the usage/download counter, last update, open issues counter, all
that can give a idea about the module status.
• Read the description, in many cases authors let the people know that
module will be deprecated in favor of some other more comprehensive
module.
Thursday, August 29, 13
6. WRONG FOLDER
STRUCTURE
• If using single site installation (one Drupal core, one website) put:
• themes in /sites/default/themes
• modules from drupal.org in /sites/default/modules/contrib
• custom modules in /sites/default/modules/custom
• Do not put themes and modules in the folder on the root level.
Never.
You can use “all” folder instead of “default” – your call.
• More about this: http://drupal.org/node/120641
Thursday, August 29, 13
5. PUTTING LOGIC IN
TEMPLATE FILES
• SQL queries and logical operations don't belong in the template
layer.
• Basic logic code can be placed in the preprocess function in
template.php file.
• About process & preprocess: http://drupal.org/node/223430
Thursday, August 29, 13
4. FORGETTING
ABOUT YOUR
DRUPAL
WEBSITE
• Drupal needs love even
after you have finished
your website. Keeping
core and modules
updates keeps the
system safe and easier
to upgrade with new
features.
Real time example:
47 of 63 modules need update
Thursday, August 29, 13
3. CODING
• There is a 80% possibility that what you want to build can be
build with a combination of modules.
• Usual suspects:
• Queries: Views
• Bulk operating on content/users: views_bulk_operations
• Trigger based operations: Rules
• Advance structure, variants: Panels
• Advance field/multifield structure: Field collection
Thursday, August 29, 13
2. PUTTING CONTENT /
PHP CODE IN BLOCKS
• Default blocks allow user generated content, but
you can't set permissions for editing each blocks
• Bean, you can add fields to different blocks types,
which have separate permissions (like content
types do)
• Boxes, blocks with a unique machine names
Thursday, August 29, 13
1. HACKING CONTRIBUTED
AND CORE CODE
• If you decided to use a theme from core or from drupal.org,
there is no need to go and edit its code.
Make a sub-theme
• more about creating sub-theme: 
http://drupal.org/node/225125
Thursday, August 29, 13
1. HACKING CONTRIBUTED
AND CORE CODE
• Fixing code directly in the module files makes the
website impossible to update.
Instead Drupal provides hooks and preprocess
functions which can alter functionality/data without
breaking the original code.
• More about hooks:
http://api.drupal.org/api/drupal/includes!
module.inc/group/hooks/7
Thursday, August 29, 13
13. - 14. April 2013, Ljubljana, Slovenia
www.DrupalAlpeAdria.org
International event with 150
attendees.
25 sessions in English.
Affordable flights from London.
Nice time of year to visit Ljubljana.
Early birds price 15€ (t-shirt, lunch
follow: @dcAlpeAdria
Thursday, August 29, 13
Q / A
• Twitter: @iztok
• IRC: iztok
• Skype: iztok.smolic
• Email: iztok@agiledrop.com
Thursday, August 29, 13

More Related Content

What's hot

The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017Michael Miles
 
Beyond the Beginner - Path Ways to Advanced Drupal Levels & Businesses
Beyond the Beginner - Path Ways to Advanced Drupal Levels & BusinessesBeyond the Beginner - Path Ways to Advanced Drupal Levels & Businesses
Beyond the Beginner - Path Ways to Advanced Drupal Levels & Businesseseverlearner
 
Introduction to Drupal for Absolute Beginners
Introduction to Drupal for Absolute BeginnersIntroduction to Drupal for Absolute Beginners
Introduction to Drupal for Absolute Beginnerseverlearner
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentMediacurrent
 
Drupal 8 theming deep dive
Drupal 8 theming deep diveDrupal 8 theming deep dive
Drupal 8 theming deep diveRomain Jarraud
 
Drupal Now! - Introduction to Drupal
Drupal Now! - Introduction to DrupalDrupal Now! - Introduction to Drupal
Drupal Now! - Introduction to DrupalAlozie Nwosu
 
Introduction to Drupal
Introduction to DrupalIntroduction to Drupal
Introduction to Drupalsdmaxey
 
Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Ivan Zugec
 
From Drupal 7 to Drupal 8 - Drupal Intensive Course Overview
From Drupal 7 to Drupal 8 - Drupal Intensive Course OverviewFrom Drupal 7 to Drupal 8 - Drupal Intensive Course Overview
From Drupal 7 to Drupal 8 - Drupal Intensive Course OverviewItalo Mairo
 
Drupal Global Training Day by Drupal Mumbai 6th Sep - Extending Drupal
Drupal Global Training Day by Drupal Mumbai 6th Sep - Extending Drupal Drupal Global Training Day by Drupal Mumbai 6th Sep - Extending Drupal
Drupal Global Training Day by Drupal Mumbai 6th Sep - Extending Drupal DrupalMumbai
 
Introduction to drupal
Introduction to drupalIntroduction to drupal
Introduction to drupalPedro Cambra
 
Drupal Step-by-Step: How We Built Our Training Site, Part 2
Drupal Step-by-Step: How We Built Our Training Site, Part 2Drupal Step-by-Step: How We Built Our Training Site, Part 2
Drupal Step-by-Step: How We Built Our Training Site, Part 2Acquia
 
Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8Italo Mairo
 
Bootstrap base theme for Drupal 7
Bootstrap base theme for Drupal 7Bootstrap base theme for Drupal 7
Bootstrap base theme for Drupal 7Cedric Spillebeen
 
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 MinutesSpeedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 MinutesAcquia
 
Introduction to Drupal 7 - Basic Functionalities and Content management
Introduction to Drupal 7 - Basic Functionalities and Content managementIntroduction to Drupal 7 - Basic Functionalities and Content management
Introduction to Drupal 7 - Basic Functionalities and Content managementKalin Chernev
 

What's hot (20)

The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017
 
Beginners Guide to Drupal
Beginners Guide to DrupalBeginners Guide to Drupal
Beginners Guide to Drupal
 
Beyond the Beginner - Path Ways to Advanced Drupal Levels & Businesses
Beyond the Beginner - Path Ways to Advanced Drupal Levels & BusinessesBeyond the Beginner - Path Ways to Advanced Drupal Levels & Businesses
Beyond the Beginner - Path Ways to Advanced Drupal Levels & Businesses
 
Introduction to Drupal for Absolute Beginners
Introduction to Drupal for Absolute BeginnersIntroduction to Drupal for Absolute Beginners
Introduction to Drupal for Absolute Beginners
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven Development
 
Drupal 8 theming deep dive
Drupal 8 theming deep diveDrupal 8 theming deep dive
Drupal 8 theming deep dive
 
Drupal Now! - Introduction to Drupal
Drupal Now! - Introduction to DrupalDrupal Now! - Introduction to Drupal
Drupal Now! - Introduction to Drupal
 
Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
 
Introduction to Drupal
Introduction to DrupalIntroduction to Drupal
Introduction to Drupal
 
Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7
 
Drupal distribution
Drupal distributionDrupal distribution
Drupal distribution
 
From Drupal 7 to Drupal 8 - Drupal Intensive Course Overview
From Drupal 7 to Drupal 8 - Drupal Intensive Course OverviewFrom Drupal 7 to Drupal 8 - Drupal Intensive Course Overview
From Drupal 7 to Drupal 8 - Drupal Intensive Course Overview
 
Drupal Global Training Day by Drupal Mumbai 6th Sep - Extending Drupal
Drupal Global Training Day by Drupal Mumbai 6th Sep - Extending Drupal Drupal Global Training Day by Drupal Mumbai 6th Sep - Extending Drupal
Drupal Global Training Day by Drupal Mumbai 6th Sep - Extending Drupal
 
Introduction to drupal
Introduction to drupalIntroduction to drupal
Introduction to drupal
 
Drupal Resources
Drupal ResourcesDrupal Resources
Drupal Resources
 
Drupal Step-by-Step: How We Built Our Training Site, Part 2
Drupal Step-by-Step: How We Built Our Training Site, Part 2Drupal Step-by-Step: How We Built Our Training Site, Part 2
Drupal Step-by-Step: How We Built Our Training Site, Part 2
 
Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8
 
Bootstrap base theme for Drupal 7
Bootstrap base theme for Drupal 7Bootstrap base theme for Drupal 7
Bootstrap base theme for Drupal 7
 
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 MinutesSpeedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
 
Introduction to Drupal 7 - Basic Functionalities and Content management
Introduction to Drupal 7 - Basic Functionalities and Content managementIntroduction to Drupal 7 - Basic Functionalities and Content management
Introduction to Drupal 7 - Basic Functionalities and Content management
 

Viewers also liked

Drupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsDrupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsIztok Smolic
 
Drupal - Blocks vs Context vs Panels
Drupal - Blocks vs Context vs PanelsDrupal - Blocks vs Context vs Panels
Drupal - Blocks vs Context vs PanelsDavid Burns
 
Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8Iztok Smolic
 
Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)Sergiu Savva
 
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...Mediacurrent
 

Viewers also liked (6)

Drupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsDrupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 months
 
Drupal - Blocks vs Context vs Panels
Drupal - Blocks vs Context vs PanelsDrupal - Blocks vs Context vs Panels
Drupal - Blocks vs Context vs Panels
 
Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8
 
Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)
 
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Similar to Top 20 Drupal Mistakes newbies make

Introduction into Drupal site building
Introduction into Drupal site buildingIntroduction into Drupal site building
Introduction into Drupal site buildingIztok Smolic
 
Upgrades and migrations
Upgrades and migrationsUpgrades and migrations
Upgrades and migrationsDavid Lanier
 
Off the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your OrganizationOff the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your OrganizationRick Vugteveen
 
Ready. Set. Drupal! An Intro to Drupal 8, Part 2
Ready. Set. Drupal! An Intro to Drupal 8, Part 2Ready. Set. Drupal! An Intro to Drupal 8, Part 2
Ready. Set. Drupal! An Intro to Drupal 8, Part 2Acquia
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 moduletedbow
 
Rapid site production with Drupal
Rapid site production with DrupalRapid site production with Drupal
Rapid site production with DrupalRob Sawyer
 
Drupal Aware Design: Good Techniques for Better Themes
Drupal Aware Design: Good Techniques for Better ThemesDrupal Aware Design: Good Techniques for Better Themes
Drupal Aware Design: Good Techniques for Better Themesnyccamp
 
Making The Drupal Pill Easier To Swallow
Making The Drupal Pill Easier To SwallowMaking The Drupal Pill Easier To Swallow
Making The Drupal Pill Easier To SwallowPhilip Norton
 
Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!Adelle Frank
 
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...Phase2
 
Getting Started with Drupal - Handouts
Getting Started with Drupal - HandoutsGetting Started with Drupal - Handouts
Getting Started with Drupal - HandoutsRachel Vacek
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an OverviewMatt Weaver
 
Drupal module development
Drupal module developmentDrupal module development
Drupal module developmentRachit Gupta
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Paul McKibben
 
Open drupal DrupalCamp Gent 2018
Open drupal DrupalCamp Gent 2018Open drupal DrupalCamp Gent 2018
Open drupal DrupalCamp Gent 2018LimoenGroen
 
Ts drupal6 module development v0.2
Ts   drupal6 module development v0.2Ts   drupal6 module development v0.2
Ts drupal6 module development v0.2Confiz
 

Similar to Top 20 Drupal Mistakes newbies make (20)

Introduction into Drupal site building
Introduction into Drupal site buildingIntroduction into Drupal site building
Introduction into Drupal site building
 
Upgrades and migrations
Upgrades and migrationsUpgrades and migrations
Upgrades and migrations
 
Off the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your OrganizationOff the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your Organization
 
Ready. Set. Drupal! An Intro to Drupal 8, Part 2
Ready. Set. Drupal! An Intro to Drupal 8, Part 2Ready. Set. Drupal! An Intro to Drupal 8, Part 2
Ready. Set. Drupal! An Intro to Drupal 8, Part 2
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 module
 
D7 as D8
D7 as D8D7 as D8
D7 as D8
 
Rapid site production with Drupal
Rapid site production with DrupalRapid site production with Drupal
Rapid site production with Drupal
 
Drupal Aware Design: Good Techniques for Better Themes
Drupal Aware Design: Good Techniques for Better ThemesDrupal Aware Design: Good Techniques for Better Themes
Drupal Aware Design: Good Techniques for Better Themes
 
Making The Drupal Pill Easier To Swallow
Making The Drupal Pill Easier To SwallowMaking The Drupal Pill Easier To Swallow
Making The Drupal Pill Easier To Swallow
 
Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!
 
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
 
Getting Started with Drupal - Handouts
Getting Started with Drupal - HandoutsGetting Started with Drupal - Handouts
Getting Started with Drupal - Handouts
 
Forensic Theming - DrupalCon London
Forensic Theming - DrupalCon LondonForensic Theming - DrupalCon London
Forensic Theming - DrupalCon London
 
Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
 
Drupal module development
Drupal module developmentDrupal module development
Drupal module development
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
 
Open drupal DrupalCamp Gent 2018
Open drupal DrupalCamp Gent 2018Open drupal DrupalCamp Gent 2018
Open drupal DrupalCamp Gent 2018
 
Ts drupal6 module development v0.2
Ts   drupal6 module development v0.2Ts   drupal6 module development v0.2
Ts drupal6 module development v0.2
 

Recently uploaded

IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingMAGNIntelligence
 
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud DataEric D. Schabell
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveIES VE
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1DianaGray10
 
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTxtailishbaloch
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarThousandEyes
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Libraryshyamraj55
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2DianaGray10
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptxHansamali Gamage
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Muhammad Tiham Siddiqui
 
Flow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameFlow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameKapil Thakar
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)codyslingerland1
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosErol GIRAUDY
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfTejal81
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applicationsnooralam814309
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch TuesdayIvanti
 

Recently uploaded (20)

SheDev 2024
SheDev 2024SheDev 2024
SheDev 2024
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced Computing
 
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1
 
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? Webinar
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Library
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)
 
Flow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameFlow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First Frame
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenarios
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applications
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch Tuesday
 

Top 20 Drupal Mistakes newbies make

  • 1. TOP 20 DRUPAL MISTAKES NEWBIES MAKE Iztok Smolič, Drupal Camp London, Mar 2013 Thursday, August 29, 13
  • 2. WHO IS • Web architect, Drupal site builder, themer • Drupal consultant (iztoksmolic.com) • Drupal studio owner (agiledrop.com) • Local meetups organizer, Drupal evangelist, Drupal Slovenia Association Thursday, August 29, 13
  • 4. 20. NOT ATTENDING YOUR NEAREST DRUPAL CAMPS • I find hard to trust developers/themers that are not active in Drupal community • Find local user groups, attend meetups • Attend camp and conferences world wide • Engaging on groups.drupal.org or drupal.org/forum • Just putting your self into your work I guess Thursday, August 29, 13
  • 5. 19. TRYING TO BEND DRUPAL TO BEHAVE LIKE... • Can we make it work/look/behave like Joomla, Wordpress, Typo3 etc. Thursday, August 29, 13
  • 6. 18. BAD CONTENT ARCHITECTURE DECISIONS • Using too much content types (e.g. is Article really so different from Public release? Maybe we can use category to separate them?) • Not using content types (e.g. instead of listing staff as a table in a page’s body, better to build the page with Views and list content type Staff member) • Not using Taxonomy, Organic Groups, Entity Reference to link together entities. • Be consistent - have a concept that does not duplicate your code. No real formula, just practice and experiences. Thursday, August 29, 13
  • 7. 17. NOT KNOWING THE FURNITURE • Designers, architects should be aware of common elements • Check blog post from Chapter Three: http:// tinyurl.com/ yape9rb Thursday, August 29, 13
  • 8. 16. TARGETING TOO SPECIFIC CLASSES AND IDS • Drupal outputs a LOT of markup with specific HTML classes and ids. Knowing which class is appropriate to target is the key. • IDs are usually unique identifiers for blocks/nodes/views. Avoid using IDs in CSS. • Views have classes with view name and display name separated. Can be used to reuse CSS code. • .items-list, .content, .view-content etc. are used all over your Drupal site, be careful targeting those classes. Thursday, August 29, 13
  • 9. 15. NOT FAMILIAR WITH DEBUGGING TOOLS • When you would usually use print_r() to get the content of a array or object to your browser, Drupal has Devel (http:// drupal.org/project/devel): • dpm($variable) – prints content of variable in human friendly way • You can also store info to a log: http://drupal.org/project/ object_log • Can’t find the right template? Use Devel Themer (http:// drupal.org/project/devel_themer) Thursday, August 29, 13
  • 10. 14. ORPHANED MODULES • Clean your environment, or even better, test modules on other installations! • Leaving old, unused modules can confuse you latter on, not to mention how confused other developers can get. Thursday, August 29, 13
  • 11. 13. FORGETTING ABOUT BACK-END UX • Drupal is criticized for having a bad user experience for end users. Don’t blame Dries, its your fault! • Drupal is a framework, back end should be part of developer’s efforts when building a website. Thursday, August 29, 13
  • 12. 12. NOT KEEPING TRACK OF DRUPAL DEVELOPMENT • Know when the next version of core/module is crucial for god strategic decisions. • Keep track of interesting / new modules: • Lullabot Module Monday • theweeklydrop.com • http://drupal.org/project/modules • twitter: @alldrupal Thursday, August 29, 13
  • 13. 11. USING DEFAULT BLOCK SYSTEM • Use default blocks system only if project is very very simple. • A couple of alternatives were made to improve block system, I bet on the following two: • Context, which is block system on steroids • Panels, introduces new block-like concept Thursday, August 29, 13
  • 14. 10. CODING SPECIFIC PAGE TEMPLATES FOR EACH SUB-PAGE • Try to omit page--xxx.tpl.php templates. It duplicates the code, and makes maintenance difficult. • Try using Context Layout or Panels if variations of markup are needed. Panels have a drag’n’drop interface that can replace coding own page.tpl-s Thursday, August 29, 13
  • 15. 9. NOT RESPECTING THE CODING STANDARDS • Different approaches and coding styles make code less organized and makes the job for other developers more difficult. • two spaces indentation • $var = foo($bar, $baz, $quux); • $some_array = array('hello', 'world', 'foo' => 'bar'); • <?php print $title; ?> • http://drupal.org/coding-standards Thursday, August 29, 13
  • 16. 8. NOT USING DRUPAL API • Drupal comes with some very handy functions, we should use them • l() and url() - in contrast of hardcoded relative URL address can outputs aliased URL path • base_path(), returns base URL of the Drupal installation • theme() functions Thursday, August 29, 13
  • 17. 7. CHOOSING LESS OR UNSUPPORTED MODULES• Check the usage/download counter, last update, open issues counter, all that can give a idea about the module status. • Read the description, in many cases authors let the people know that module will be deprecated in favor of some other more comprehensive module. Thursday, August 29, 13
  • 18. 6. WRONG FOLDER STRUCTURE • If using single site installation (one Drupal core, one website) put: • themes in /sites/default/themes • modules from drupal.org in /sites/default/modules/contrib • custom modules in /sites/default/modules/custom • Do not put themes and modules in the folder on the root level. Never. You can use “all” folder instead of “default” – your call. • More about this: http://drupal.org/node/120641 Thursday, August 29, 13
  • 19. 5. PUTTING LOGIC IN TEMPLATE FILES • SQL queries and logical operations don't belong in the template layer. • Basic logic code can be placed in the preprocess function in template.php file. • About process & preprocess: http://drupal.org/node/223430 Thursday, August 29, 13
  • 20. 4. FORGETTING ABOUT YOUR DRUPAL WEBSITE • Drupal needs love even after you have finished your website. Keeping core and modules updates keeps the system safe and easier to upgrade with new features. Real time example: 47 of 63 modules need update Thursday, August 29, 13
  • 21. 3. CODING • There is a 80% possibility that what you want to build can be build with a combination of modules. • Usual suspects: • Queries: Views • Bulk operating on content/users: views_bulk_operations • Trigger based operations: Rules • Advance structure, variants: Panels • Advance field/multifield structure: Field collection Thursday, August 29, 13
  • 22. 2. PUTTING CONTENT / PHP CODE IN BLOCKS • Default blocks allow user generated content, but you can't set permissions for editing each blocks • Bean, you can add fields to different blocks types, which have separate permissions (like content types do) • Boxes, blocks with a unique machine names Thursday, August 29, 13
  • 23. 1. HACKING CONTRIBUTED AND CORE CODE • If you decided to use a theme from core or from drupal.org, there is no need to go and edit its code. Make a sub-theme • more about creating sub-theme:  http://drupal.org/node/225125 Thursday, August 29, 13
  • 24. 1. HACKING CONTRIBUTED AND CORE CODE • Fixing code directly in the module files makes the website impossible to update. Instead Drupal provides hooks and preprocess functions which can alter functionality/data without breaking the original code. • More about hooks: http://api.drupal.org/api/drupal/includes! module.inc/group/hooks/7 Thursday, August 29, 13
  • 25. 13. - 14. April 2013, Ljubljana, Slovenia www.DrupalAlpeAdria.org International event with 150 attendees. 25 sessions in English. Affordable flights from London. Nice time of year to visit Ljubljana. Early birds price 15€ (t-shirt, lunch follow: @dcAlpeAdria Thursday, August 29, 13
  • 26. Q / A • Twitter: @iztok • IRC: iztok • Skype: iztok.smolic • Email: iztok@agiledrop.com Thursday, August 29, 13