Actions

J3.x

Difference between revisions of "CLI Applications Broken"

From Joomla! Documentation

m (rearrange headings)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
Because of changes made to JTable,  CLI and other stand alone applications that use JTable break in Joomla 3.1.3 and later.
 
Because of changes made to JTable,  CLI and other stand alone applications that use JTable break in Joomla 3.1.3 and later.
 +
 +
==Versions affected==
 +
{{refers_to|3.1.3,3.1.4,3.1.5}}
 +
 +
==What is the cause==
 
This is because you now must also load the legacy and cms libraries in order to work with JTable.
 
This is because you now must also load the legacy and cms libraries in order to work with JTable.
  
 +
==How to fix==
 
Adding this code to your application should fix the issue.
 
Adding this code to your application should fix the issue.
  
Line 11: Line 17:
 
JLoader::registerPrefix('J', JPATH_PLATFORM . '/legacy');
 
JLoader::registerPrefix('J', JPATH_PLATFORM . '/legacy');
 
JLoader::Register('J', JPATH_PLATFORM . '/cms');
 
JLoader::Register('J', JPATH_PLATFORM . '/cms');
 
 
</source>
 
</source>
 +
 
You may also need to load some other classes [http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=31663 Hot fix].
 
You may also need to load some other classes [http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=31663 Hot fix].
  
 
The hotfix at this location can also be applied if you do not want to or cannot modify your application.  
 
The hotfix at this location can also be applied if you do not want to or cannot modify your application.  
  
 +
<noinclude>
 +
[[Category:Version 3.1.3 FAQ]]
 
[[Category:Version 3.1.4 FAQ]]
 
[[Category:Version 3.1.4 FAQ]]
 
[[Category:Version 3.1.5 FAQ]]
 
[[Category:Version 3.1.5 FAQ]]
 +
</noinclude>

Latest revision as of 19:22, 11 August 2013

Because of changes made to JTable, CLI and other stand alone applications that use JTable break in Joomla 3.1.3 and later.

Versions affected

Info non-talk.png
General Information

This pertains only to Joomla! version(s):- 3.1.3  3.1.4  3.1.5


What is the cause

This is because you now must also load the legacy and cms libraries in order to work with JTable.

How to fix

Adding this code to your application should fix the issue.

jimport('joomla.observer.mapper');
jimport('cms.helper.tags');
jimport('cms.table.corecontent');
// Categories is in legacy for CMS 3 so we have to check there.
JLoader::registerPrefix('J', JPATH_PLATFORM . '/legacy');
        JLoader::Register('J', JPATH_PLATFORM . '/cms');

You may also need to load some other classes Hot fix.

The hotfix at this location can also be applied if you do not want to or cannot modify your application.