Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Ten pitfalls for framework developers

The ten mistakes developers from Symfony, Laravel, Django, Rails and similar frameworks make most often in their first Exponential project, each with the symptom, the cause and the fix - from unescaped template output…

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/web-framework-developers/pitfalls-for-framework-developers.md

On this page

Ten pitfalls for framework developers

This page is for developers in their first weeks with Exponential. Each pitfall comes from a habit that is right in another framework and wrong here.

Contents

  1. Printing without wash
  2. A new class is "not found"
  3. A setting does not take effect
  4. A template change does not show
  5. State leaks between requests
  6. Writing SQL into content tables
  7. A table for what should be content
  8. Checking permissions only in templates
  9. Forgetting the siteaccess on the command line
  10. Comparisons with symbols

1. Printing without wash

Symptom: text with < or & breaks the page, or a script runs. Cause: templates do not escape automatically. Fix: {$value|wash} on everything from users or the database (The view layer).

2. A new class is "not found"

Cause: classes are found through generated class maps, not by PSR-4 for extension classes. Fix: php bin/php/ezpgenerateautoloads.php -e, then deploy; --kernel for kernel classes (Autoloads and class naming).

3. A setting does not take effect

Causes: the INI cache; or the value is overridden by a later layer, for example an extension's global settings win over settings/siteaccess/. Fix: ./console exp:ini where <file>/<block>/<key> <siteaccess>, then php bin/php/ezcache.php --clear-tag=ini (Configuration).

4. A template change does not show

Causes: the view cache, a cache block, or the override cache for a new template file. Fix: clear template-override after adding a template file, clear content and template-block when cached output is stale; exp:velocity deploy does all of it in order (Caching).

5. State leaks between requests

Symptom: one user sees another user's data, or a listener runs twice, only under Velocity. Cause: persistent workers keep static properties and attached listeners. Fix: no per-request state in statics; register listeners in settings (Servers and deployment).

6. Writing SQL into content tables

Symptom: a change does not appear, or appears without history, search or cache updates. Cause: content tables are not your tables. Fix: eZContentFunctions or the operations, which run workflows and clear caches (The content model).

7. A table for what should be content

Symptom: you are building an admin screen, a revisions table and a translations table. Fix: make it a content class and get all three (ORM).

8. Checking permissions only in templates

Cause: hiding a link is not access control. Fix: name the function in the view's functions, check object access in the view, filter lists in the query (Authorization).

9. Forgetting the siteaccess on the command line

Symptom: a command or cron part cannot find your module, setting or job type. Cause: your extension is active only in a siteaccess. Fix: -s <siteaccess> (Command line).

10. Comparisons with symbols

Symptom: an {if} behaves randomly and the log shows a parser error. Cause: the template language has no infix operators. Fix: gt, lt, eq, ne, and, or (No infix comparison).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x