Version 4.0 Beta FAQ
From Joomla! Documentation
Ces FAQ sont spécifiques à la version Joomla ! 4.0 Beta 1. Seuls les problèmes spécifiques à cette version seront répertoriés ici, ainsi que les résolutions suggérées. Veuillez ajouter des informations à cette ressource. Le Bug Squad de Joomla ! surveillera cette page pour s'assurer que tous les nouveaux bogues sont ajoutés au tracker et résolus. Continuez à utiliser les Forums Joomla ! pour les demandes d'assistance' car cette page n'est pas un substitut à la publication de messages, mais plutôt un emplacement commun pour la communauté afin de rassembler les problèmes communs de la version.
Membres de la Bug Squad, veuillez utiliser le formulaire de droite pour la création rapide d'une page FAQ. Essayez de ne pas renseigner la version Joomla! de maintenance dans le titre car l'anomalie peut affecter plus d'une version.
This Joomla 4 FAQ for extensions developers is a draft, and we are still collecting the questions. TDB questions are “To Be Defined”.
A huge Thank You to our volunteers! This is the current Joomla 4 Beta: https://github.com/joomla/joomla-cms/releases/tag/4.0.0-beta
Main Questions
Where is the documentation for migrating from Joomla 3.10.x to Joomla 4?
The Update Working Group is working on documentation as we speak. It’s not ready yet. To get an idea of the process, it will be very similar to the migration process from 2.5 to 3.x. See Why Migrate for details.
Which are the Potential backward compatibility issues in Joomla 4?
This article is the official reference of Potential backward compatibility issues in Joomla 4: https://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_4
On top of the Potential backward compatibility issues, the biggest change is the new templates based on Bootstrap 4 and other modern front-end tools.
What is Joomla 3.10 compatibility layer?
Joomla 3.10 and Joomla 4 will come with a compatibility layer to easy the transition to Joomla 4. The compatibility layer will be removed on Joomla 5.
For instance, the J-Classes are aliases to the new namespaced classes. JRegistry
=> \Joomla\Registry\Registry
.
What is the Joomla 3.10.x and the Update Checker?
The Update Checker is an extension that will be included on Joomla 3.10 to confirm if:
- The hosting meets the minimum requirements of Joomla 4.x, and
- The installed extensions that use the Update Server have versions compatible with Joomla 4.
For more information:
- https://magazine.joomla.org/all-issues/may-2020/joomla-3-10-and-the-update-checker
- https://extensions.joomla.org/support/knowledgebase/submission-requirements/joomla-update-system-requirement/
- https://docs.joomla.org/Help39:Extensions_Extension_Manager_Update
Does Joomla 4 have a compatibility layer for Bootstrap 2.3?
No. All extensions must drop the use of Bootstrap 2.3 in the migration to Joomla 4.
About the Front-end development
Are extensions encouraged to be Framework Agnostic?
That would be ideal but supporting the core backend template, and core front-end template should be a good start. As for the front-end, it would be similar to now.
What have changed on the front-end? Bootstrap? jQuery?
Joomla 4 comes by default with Bootstrap 4 and plain JavaScript scripts. Joomla 4 includes jQuery for backwards compatibility and BS4 compatibility. jQuery is not used at Joomla 4 core level.
Is it defined that Joomla 5 will come with Bootstrap 5?
No. There are no plans about the Framework to be used in Joomla 5 yet.
How does the core team build the front-end files? What has changed?
TBD
About The Database Changes
Will Joomla be “NULL date defaults” going forward everywhere?
Yes. This is what is defined in Potential backward compatibility issues in Joomla 4.
Strict mode has been enabled. The following flags are now active by default in Joomla 4 and you may have to update your database queries accordingly. This will help us with future MySQL version upgrades and also aligns more closely with Postgres to enable easier compatibility with queries in both languages.
'STRICT_TRANS_TABLES',
'ERROR_FOR_DIVISION_BY_ZERO',
'NO_AUTO_CREATE_USER',
'NO_ENGINE_SUBSTITUTION',
Will the Joomla 3 to Joomla 4 Updater convert all of the core tables to use “NULL date defaults”?
The Joomla 4 Updater will handle the change of “NULL date defaults” to the new schema. Please, note that the way of how NULL values are managed changes.
These are the upcoming changes:
- The 0000-Null conversion
- The Null-Mandatory field type conversion, fields that are null on J3 and now they are Mandatory.
For instance, check the following table of field changes:
J3 Table | J3 Field name | J3 Field type | => | J4 Table | J4 Field name | J4 Field type |
---|---|---|---|---|---|---|
User | registerDate | datetime No 0000-00-00 00:00:00 | => | User | registerDate | datetime No None |
User | lastvisitDate | datetime No 0000-00-00 00:00:00 | => | User | lastvisitDate | datetime Yes NULL |
Content | created | datetime No 0000-00-00 00:00:00 | => | Content | created | datetime No None |
Content | modified | datetime No 0000-00-00 00:00:00 | => | User | registerDate | modified datetime No None |
Please, check the following PR for the Weblinks extension: Fix default value for datetime columns and make some nullable to adapt to CMS 4.0-dev and remove sqlsrv
Will older extensions that still use the “0000-00-00 date defaults” will break?
It depends.
The core upgrade is going to convert only the core tables; and the core upgrade isn’t going to convert schema or content for tables which belong to 3rd-party extensions.
The 3rd-party extension upgrade for Joomla 4 can convert the tables to NULL dates. The extensions will continue to work if using the api for writing into core tables in the right way.
Will the Update Checker check all tables for invalid date defaults?
No, the Update Checker checks the hosting support for Joomla 4 and the availability of extensions for Joomla 4. It will not check individually the tables, only the availability of extensions versions for Joomla 4. Indirectly, the result will be the same.
About PHP Namespaces and Autoloaders
Is the namespacing of extensions mandatory or recommended on Joomla 4?
Namespaced extensions will probably not work in Joomla 3.10 - so you will need to use the non-namespaced extensions if you wish to support Joomla 3.10 and Joomla 4 in the same version.
Using namespaces however is recommended for Joomla 4 native extensions. The use of namespaces will be mandatory for Joomla 5 if you wish to use the core MVC classes.
Can we use still use the current J classes and J helpers in Joomla 4? For instance, JText
Yes. Please, take into account that the J-Classes will be removed on Joomla 5.
Is mandatory the use of namespaces in Joomla 4?
No
Can an extension without namespaces run on Joomla 4?
Yes
Is Joomla 4 organized by PSR4 autoloading?
Yes, the core extensions have a new src
folder following the PSR4 namespace organization. However, the autoloader is not driven by a composer.json
file.
Ref: PSR-4: Autoloader
Do the legacy autoloaders (jimport
and JLoader
) work in Joomla 4?
Yes
Is Joomla 4 compatible with Composer and Packagist libraries?
Yes, an extension can be developed with Composer libraries, using PSR0, PSR2 or PSR4. Take into account that name and versions collisions can occur between extensions, so techniques to avoid conflicts must be implemented.
What is going to be deprecated on Joomla 5?
Please, check the list of classes that will be deprecated in libraries/classmap.php
.
How many autoloaders are active in Joomla 4 by default?
TDB
About the extension development
Is there a new recommended extension directory organization?
Yes, this is the new extension organization:
- forms
- helpers
- src
- Controller
- Dispatcher
- Helper
- Model
- Service
- View
- tmpl
Can an extension follow the Joomla 3 extension organization?
Yes
What are the official reference extensions for Joomla 4?
Is there a new priority of view overrides?
TBD. Reference: https://docs.joomla.org/Understanding_Output_Overrides
What are the services and providers in Joomla 4?
TBD
Does Joomla 4 have Container?
TDB
Does Joomla 4 have Dependency Injection?
TDB
About the security features
What is Joomla 4.0 Content Security Policy (CSP)’s?
Tobias talked about Content Security Policy (CSP) yesterday at JAB 2020. We’ll link the video
How to securely use the Joomla secret
TBD