JFACTORY-GETEDITOR-001
JFactory::getEditor()
Factory::getEditor()
Factory no longer vends the editor. Editor::getInstance() does.
JFactory::getEditor() → Editor::getInstance()
What you will see
- Call to undefined method Factory::getEditor
Symptoms people search
editor field blank / fatal in admin
Replace this code
Swap JFactory::getEditor() for Editor::getInstance().
Joomla 3
Remove or stop calling this
$editor = JFactory::getEditor();
echo $editor->display('desc', $html, '100%', '300', '60', '20');Joomla 4 / 6
Use this instead
use Joomla\CMS\Editor\Editor;
$editor = Editor::getInstance($app->get('editor'));How to fix it
- 1Replace getEditor() with Editor::getInstance().
Also known as
JFactory::getEditor()
Related issues
- Joomla 3 → 4Joomla API
JRequest::getVar() and the whole JRequest API
JRequest::getVar() → $app->getInput()->get('id')
- Joomla 3 → 4Joomla API
JError / JException
JError::raiseError() → throw new RuntimeException() / try-catch
- Joomla 3 → 4Joomla API
isAdmin() / isSite()
$app->isAdmin() → $app->isClient('administrator') / isClient('site')
- Joomla 3 → 4Joomla API
Factory::getUri()
JFactory::getUri() → Uri::getInstance()
- Joomla 3 → 4Joomla API
Factory::getXml() / JXMLElement
JFactory::getXML() → SimpleXMLElement
- Joomla 3 → 4Joomla API
JHtmlBatch
JHtmlBatch → Layouts joomla.html.batch.*