Chapter: Migrating from jelix 1.0 to jelix 1.1
| « Install on a production server | ^ Installation |
− Table of content
When you migrate from an old version of jelix to a newer one, you always must do these tasks:
- replace the
lib/directory by the one provided in the new version. - don't forget to move your own libraries from the old
lib/directory to the new one - remove all the files in the
temp/yourapp/directory - update your code as specified hereafter.
Due to the number of API changes between 1.0.x and 1.1.x, the easy solution is to create a new application from scratch an manually import each part of the old application into the new application.
Updating from jelix 1.1beta1 ¶
jForms: the behavior of thegetModifiedControls()method has changed. Now, to know which controls are modified, you should call a new method,initModifiedControlsList()to start the tracking of modified controls (after the initialisation of a form for example).- Improvement on the method
setFetchMode()of the classjDbResultSet, and the constants to indicate as first parameters are changed. You must use constants ofjDbConnectioninstead of those ofjDbResultSet:jDbConnection::FETCH_CLASS.
Because of misspelling methods and properties, there were methods and properties renamed since 1.1beta1 :
- plugin auth/auth : option profil -> profile
jDb::getProfil()->jDb::getProfile()jDb::testProfil()->jDb::testProfile()jAclDb::getProfil()->jAclDb::getProfile()jAcl2Db::getProfil()->jAcl2Db::getProfile()jDbConnection::$profil->jDbConnection::$profilejControllerDaoCrud::$dbProfil->jControllerDaoCrud::$dbProfile
You should then rename these methods and properties in your own code if you used them.
Updating from jelix 1.0.x ¶
General settings ¶
- most of
JELIX_LIB_*constants have been removed. OnlyJELIX_LIB_PATH,JELIX_LIB_CORE_PATHandJELIX_LIB_UTILS_PATHstill exist. So remove this deleted constants from your code, and replace them by the use ofJELIX_LIB_PATHorJELIX_LIB_UTILS_PATH. - remove also
JELIX_PLUGINS_PATHandJELIX_MODULE_PATHconstants.
Customized responses ¶
In your customized response objects like responses/myHtmlResponse.class.php:
- rename the
_commonProcess()method todoAfterActions() - replace <php>require_once (JELIX_LIB_RESPONSE_PATH.'jResponseHtml.class.php');</php> by <php>require_once (JELIX_LIB_CORE_PATH.'response/jResponseHtml.class.php');</php>
Configuration ¶
In the defaultconfig.ini.php file and other specific configuration files of entry points, rename the [plugins] section to [coordplugins].
jForms forms ¶
- in the templates, the
{form}and{formfull}plugins have their list of parameters updated. So change them. - The name of the root tag of the jForms files is now uniform and is then called "form". Rename the
<forms>tags into<form>. - The javascript API of jForms has been slightly updated : if you use it (but it is rare), you have to update your scripts.
- The API of the
jFormBaseobject has been slightly updated at the level of methodssetReadOnly() - The id of the generated html form tags has changed (#423) and also the the ids of the controls to avoid collisions and "guess" it more easily. Modify your CSS file or your own javascript files to use this new ids.
Other API ¶
- The
jDateTime::durationTo()does not accept ajDateTimeobject as parameter anymore, but ajDurationobject. - Improvement on the method
setFetchMode()of the classjDbResultSet, and the constants to indicate as first parameters are changed. You must use constants ofjDbConnectioninstead of those ofjDbResultSet:jDbConnection::FETCH_CLASS.
Because of misspelling methods and properties, some methods and properties have been renamed:
- template plugin formdatasfull renamed to formdatafull
- template plugin formdatas renamed to formdata
jFormsBase::getDatas()->getAllData()jFormsDatasource::getDatas()->getData()jFormsDatasource::$datas->$datajFormsDataContainer::$datas->$datajResponseJson::$datas->$datajResponseRdf::$datas->$datajControllerDaoCrud::_checkDatas()->_checkData()- plugin auth/auth : profil -> profile
jDb::getProfil()->jDb::getProfile()jDb::testProfil()->jDb::testProfile()jAclDb::getProfil()->jAclDb::getProfile()jAcl2Db::getProfil()->jAcl2Db::getProfile()jDbConnection::$profil->jDbConnection::$profilejControllerDaoCrud::$dbProfil->jControllerDaoCrud::$dbProfile
Updating from Jelix 1.0 alpha or 1.0 beta ¶
- The old syntax of the action selectors (with a "_" instead of a ":") is no more supported. You have to change your old selectors.
- Follow other migrate instructions in changelog of each 1.0 beta version and 1.0 , and then follow instruction above.

