Difference between revisions of "Potential backward compatibility issues in Joomla 1.7 and Joomla Platform 11.2"

From Joomla! Documentation

(Add References)
m (added Category:Migration using HotCat)
(31 intermediate revisions by 12 users not shown)
Line 1: Line 1:
= Platform =  
+
{{RightTOC}}This documents track potential backward compatibility issues for Joomla 1.7 and Joomla Platform 11.1 which will be included in Joomla 1.7. Listed are issues which potentially breaks extensions and newly deprecated APIs.
 +
 
 +
Please help making this document complete.
 +
 
 +
The base of this comparison is Joomla 1.6.
 +
 
 +
= Platform {{JVer|11.1}} =
 +
*JPATH_PLATFORM is now used instead of JPATH_LIBRARIES (JPATH_LIBRARIES will continue to be supported for version 1.7)
 +
 
 +
== JDatabaseQuery ==
 +
 
 +
JDatabaseQuery is now abstract due of the work done to support new database engines (Windows Azure and Microsoft SQL Server). This means you '''must''' use <code>$db->getQuery(true);</code> to instantiate a query as is the '''correct''' practice in Joomla 1.6.
 +
 
 +
== JDatabase ==
 +
 
 +
The getConnectors method formerly supported a file called driver.php that it searched for in a folder with the same name as the database, such as /mydatabasename/driver.php. This seems never to have actually been used in the core. If you have a driver with that structure simply rename the file with the name of the database (mydatabasename.php) and place it in the libraries/database/database folder. The files and class names for database support that are currently in that folder can be used as models for this.
  
 
== JDocument ==
 
== JDocument ==
Line 9: Line 24:
 
=== JDocumentRendererMessage ===
 
=== JDocumentRendererMessage ===
 
*A div element with the ID "system-message-container" is always rendered, whether there are messages or not. This ID should not be used in any extension or template.<ref>[https://github.com/joomla/joomla-platform/commit/bade3acf0f5ea588be92cb24d4237228c043a3c7 Modify JDocumentRendererMessage to always render &lt;div id="system-message-container">&lt;/div>. This makes it possible to render messages via JavaScript. (GitHub)]</ref>
 
*A div element with the ID "system-message-container" is always rendered, whether there are messages or not. This ID should not be used in any extension or template.<ref>[https://github.com/joomla/joomla-platform/commit/bade3acf0f5ea588be92cb24d4237228c043a3c7 Modify JDocumentRendererMessage to always render &lt;div id="system-message-container">&lt;/div>. This makes it possible to render messages via JavaScript. (GitHub)]</ref>
 +
 +
== JError & JException ==
 +
JError and JException have been deprecated with Joomla Platform 11.1.  Please see [[Exceptions and Logging in Joomla 1.7 and Joomla Platform 11.1]] for more information.<ref>[https://github.com/joomla/joomla-platform/commit/912c09814fb45f23df8cc1ec8bfa26d92c342525 Deprecate JException (GitHub)]</ref><ref>[https://github.com/joomla/joomla-platform/commit/aacdb90df74c00c0849e6e4694bc6e033ad0fa8c#libraries/joomla/error/error.php Deprecate JError (GitHub)]</ref>
 +
 +
== JLoader ==
 +
*JLoader can't load files multiple times anymore.<ref>[https://github.com/joomla/joomla-platform/commit/bfef02de71db7aa5cb46ffdff92778fd6f14f621 Use include_once instead of include in JLoader (GitHub)]</ref>
 +
 +
== JLog ==
 +
* JLog has shifted to joomla.log.log from joomla.error.log and features support for multiple loggers.
 +
 +
== JModuleHelper ==
 +
*JModuleHelper::getModule can now match a module either with the name (usually mod_something) or module (usually something without the mod_ prefix) which means that parameters will be used if there is an instance of the module. If a faux name was being used to generate a module without parameters that will no longer work.
  
 
== JURI ==
 
== JURI ==
 
*The unused parameter $akey has been removed from JURI::buildQuery().<ref>[https://github.com/joomla/joomla-platform/commit/14ebbbd702c2d79098057647fcc4603157896509 Remove an unused paramet in JURI::buildQuery(). (GitHub)]</ref>
 
*The unused parameter $akey has been removed from JURI::buildQuery().<ref>[https://github.com/joomla/joomla-platform/commit/14ebbbd702c2d79098057647fcc4603157896509 Remove an unused paramet in JURI::buildQuery(). (GitHub)]</ref>
  
= CMS =
+
== JUpdater ==
 +
*JUpdater:: arrayUnique() has been deprecated Use JArrayHelper::arrayUnique() instead. Note that the later is static.<ref>[https://github.com/joomla/joomla-platform/commit/354a7653ca81acc1b12a3b1c1e6188e078bd9451 Move JUpdater:arrayUnique() to JArrayHelper::arrayUnique(). Keep JUpdater:arrayUnique() as an alias an deprecate it. (GitHub)]</ref>
  
 +
== JavaScript ==
 +
*MooTools Core has been updated to version 1.3.2, MooTools More to 1.3.2.1. Due to a change in JSON handling a slight change in behavior can occur. More details can be found on the [https://github.com/mootools/mootools-core/wiki/Update-from-1.2-to-1.3 MooTools Wiki].<ref> Update Mootools to version 1.3.2 ([http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=25082 Issue]) ([http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&path=%2F&view=rev&revision=21357 Revision]) ([https://github.com/joomla/joomla-platform/commit/2bf2ba5c7cbba19fae78b06da4fe8ddc8bce4063 GitHub])</ref>
 +
* checkAll() has been deprecated, use Joomla.checkAll() instead. Note that Joomla.checkAll() doesn't include some legacy functionality.<ref>[https://github.com/joomla/joomla-platform/commit/d9ec6d3e15344727dc7453c4cce9137b634e8b2c Namespace the checkAll() function. (GitHub)]</ref>
  
= Refernces =
+
= CMS {{JVer|1.7}} =
 +
== General Coding Principles ==
 +
Within the new Joomla release cycle, developers need to be conscious of more frequent changes to version numbers. If you are doing hard checks against, for example, a version number exactly equal to "1.6" then as we move to 1.7, those checks may fail with unexpected results.  You should ensure that version checks appropriately allow for future increments like 1.7, 1.8, 2.0, 3.0, and so on.
 +
 
 +
== TinyMCE ==
 +
*TinyMCE has been updated to the 3.4 series requiring new language files and potentially breaking TinyMCE plug-ins.<ref>Update TinyMCE to version 3.4.2 ([http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=25313  Issue]) ([http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&path=%2F&view=rev&revision=21449  Revision])</ref>  As of 1.7 RC1, version 3.4.3.2 is distributed.<ref>Update TinyMCE to version 3.4.3.2 ([http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=26349  Issue]) ([http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&path=%2F&view=rev&revision=21783  Revision])</ref>
 +
 
 +
== JavaScript ==
 +
*MooTools Core and MooTools More will not always be loaded in the backend as it was in the past. Extensions have to specifically include it using <code>JHtml::_('behavior.framework');</code> for Core and adding the 'true' option for More.<ref>Don't always load Mootools (More) in the backend ([http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=26084  Issue]) ([http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&path=%2F&view=rev&revision=21523  Revision])</ref>
 +
 
 +
== Templates ==
 +
*The link to "View Site" is no longer included in mod_status. Administrator templates have to add it themselves.<ref name=ADMmodules>Unused admin modules ([http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=26174  Issue]) ([http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&path=%2F&view=rev&revision=21721  Revision])</ref>
 +
 
 +
== Modules ==
 +
*mod_online and mod_status have been removed<ref name=ADMmodules/>
 +
 
 +
=== mod_menu ===
 +
*mod_menu uses a class instead of an id attribute for the itemid.<ref> mod_menu can create invalid id attribute HTML ([http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=24629  Issue]) ([http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&path=%2F&view=rev&revision=21572  Revision])</ref>
 +
 
 +
== Moved Files ==
 +
 
 +
The file /libraries/version.php has been moved from the platform to the CMS, specifically to /includes/version.php. If direct access to this file is needed jimport will need to be adjusted but it also can be access by loading framework.php
 +
 
 +
require_once JPATH_BASE.'/includes/framework.php'
 +
or by using JLoader.
 +
 
 +
= References =
 
<references />
 
<references />
 +
 +
[[Category:Version 1.7 FAQ]]
 +
[[Category:Compatibility]]
 +
[[Category:Development]]
 +
[[Category:Platform]]
 +
[[Category:Migration]]

Revision as of 12:06, 28 May 2013

This documents track potential backward compatibility issues for Joomla 1.7 and Joomla Platform 11.1 which will be included in Joomla 1.7. Listed are issues which potentially breaks extensions and newly deprecated APIs.

Please help making this document complete.

The base of this comparison is Joomla 1.6.

Platform Joomla 11.1[edit]

  • JPATH_PLATFORM is now used instead of JPATH_LIBRARIES (JPATH_LIBRARIES will continue to be supported for version 1.7)

JDatabaseQuery[edit]

JDatabaseQuery is now abstract due of the work done to support new database engines (Windows Azure and Microsoft SQL Server). This means you must use $db->getQuery(true); to instantiate a query as is the correct practice in Joomla 1.6.

JDatabase[edit]

The getConnectors method formerly supported a file called driver.php that it searched for in a folder with the same name as the database, such as /mydatabasename/driver.php. This seems never to have actually been used in the core. If you have a driver with that structure simply rename the file with the name of the database (mydatabasename.php) and place it in the libraries/database/database folder. The files and class names for database support that are currently in that folder can be used as models for this.

JDocument[edit]

  • getHeadData(), setHeadData() and mergeHeadData() are from now on only present in JDocumentHTML. They have been removed from JDocument and JDocumentXML.[1]

JDocumentHTML[edit]

  • JDocumentHTML::$_links has changed to a multidimensional array. Also the rendering of the link elements has been moved from JDocumentHTML to JDocumentRenderHead.[2]

JDocumentRendererMessage[edit]

  • A div element with the ID "system-message-container" is always rendered, whether there are messages or not. This ID should not be used in any extension or template.[3]

JError & JException[edit]

JError and JException have been deprecated with Joomla Platform 11.1. Please see Exceptions and Logging in Joomla 1.7 and Joomla Platform 11.1 for more information.[4][5]

JLoader[edit]

  • JLoader can't load files multiple times anymore.[6]

JLog[edit]

  • JLog has shifted to joomla.log.log from joomla.error.log and features support for multiple loggers.

JModuleHelper[edit]

  • JModuleHelper::getModule can now match a module either with the name (usually mod_something) or module (usually something without the mod_ prefix) which means that parameters will be used if there is an instance of the module. If a faux name was being used to generate a module without parameters that will no longer work.

JURI[edit]

  • The unused parameter $akey has been removed from JURI::buildQuery().[7]

JUpdater[edit]

  • JUpdater:: arrayUnique() has been deprecated Use JArrayHelper::arrayUnique() instead. Note that the later is static.[8]

JavaScript[edit]

  • MooTools Core has been updated to version 1.3.2, MooTools More to 1.3.2.1. Due to a change in JSON handling a slight change in behavior can occur. More details can be found on the MooTools Wiki.[9]
  • checkAll() has been deprecated, use Joomla.checkAll() instead. Note that Joomla.checkAll() doesn't include some legacy functionality.[10]

CMS Joomla 1.7[edit]

General Coding Principles[edit]

Within the new Joomla release cycle, developers need to be conscious of more frequent changes to version numbers. If you are doing hard checks against, for example, a version number exactly equal to "1.6" then as we move to 1.7, those checks may fail with unexpected results. You should ensure that version checks appropriately allow for future increments like 1.7, 1.8, 2.0, 3.0, and so on.

TinyMCE[edit]

  • TinyMCE has been updated to the 3.4 series requiring new language files and potentially breaking TinyMCE plug-ins.[11] As of 1.7 RC1, version 3.4.3.2 is distributed.[12]

JavaScript[edit]

  • MooTools Core and MooTools More will not always be loaded in the backend as it was in the past. Extensions have to specifically include it using JHtml::_('behavior.framework'); for Core and adding the 'true' option for More.[13]

Templates[edit]

  • The link to "View Site" is no longer included in mod_status. Administrator templates have to add it themselves.[14]

Modules[edit]

  • mod_online and mod_status have been removed[14]

mod_menu[edit]

  • mod_menu uses a class instead of an id attribute for the itemid.[15]

Moved Files[edit]

The file /libraries/version.php has been moved from the platform to the CMS, specifically to /includes/version.php. If direct access to this file is needed jimport will need to be adjusted but it also can be access by loading framework.php

require_once JPATH_BASE.'/includes/framework.php'

or by using JLoader.

References[edit]