?
avatar franz-wohlkoenig
franz-wohlkoenig
30 Jul 2018

Steps to reproduce the issue

Open an Article or create a new one got:
screen shot 2018-07-30 at 09 05 33

System information

  • Nightly Build 4.0.0-alpha5-dev
  • Multilingual Sample Data (French, German DE, Persian)
  • Template: Cassiopeia
  • macOS Sierra, 10.13.6
  • Firefox 61 (64-bit)

CloudAccess.net

  • PHP 7.1.15
  • MySQLi 5.7.18-cll-lve
avatar franz-wohlkoenig franz-wohlkoenig - open - 30 Jul 2018
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jul 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Jul 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Jul 2018
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Jul 2018
Category com_content
avatar brianteeman
brianteeman - comment - 30 Jul 2018

Please enable debug mode and then post the resultant stack trace

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Jul 2018

screen shot 2018-07-30 at 09 17 57

Call stack
1 | () | JROOT/libraries/vendor/joomla/utilities/src/ArrayHelper.php:72
2 | Joomla\Utilities\ArrayHelper::toObject() | JROOT/libraries/src/MVC/Model/AdminModel.php:930
3 | Joomla\CMS\MVC\Model\AdminModel->getItem() | JROOT/administrator/components/com_content/Model/ArticleModel.php:394
4 | Joomla\Component\Content\Administrator\Model\ArticleModel->getItem() | JROOT/administrator/components/com_content/Model/ArticleModel.php:547
5 | Joomla\Component\Content\Administrator\Model\ArticleModel->loadFormData() | JROOT/libraries/src/MVC/Model/FormModel.php:272
6 | Joomla\CMS\MVC\Model\FormModel->loadForm() | JROOT/administrator/components/com_content/Model/ArticleModel.php:455
7 | Joomla\Component\Content\Administrator\Model\ArticleModel->getForm() | JROOT/libraries/src/MVC/View/AbstractView.php:146
8 | Joomla\CMS\MVC\View\AbstractView->get() | JROOT/administrator/components/com_content/View/Article/HtmlView.php:81
9 | Joomla\Component\Content\Administrator\View\Article\HtmlView->display() | JROOT/libraries/src/MVC/Controller/BaseController.php:679
10 | Joomla\CMS\MVC\Controller\BaseController->display() | JROOT/administrator/components/com_content/Controller/DisplayController.php:59
11 | Joomla\Component\Content\Administrator\Controller\DisplayController->display() | JROOT/libraries/src/MVC/Controller/BaseController.php:717
12 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT/libraries/src/Dispatcher/Dispatcher.php:162
13 | Joomla\CMS\Dispatcher\Dispatcher->dispatch() | JROOT/libraries/src/Component/ComponentHelper.php:354
14 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT/libraries/src/Application/AdministratorApplication.php:111
15 | Joomla\CMS\Application\AdministratorApplication->dispatch() | JROOT/libraries/src/Application/AdministratorApplication.php:154
16 | Joomla\CMS\Application\AdministratorApplication->doExecute() | JROOT/libraries/src/Application/CMSApplication.php:243
17 | Joomla\CMS\Application\CMSApplication->execute() | JROOT/administrator/includes/app.php:38
18 | require_once() | JROOT/administrator/index.php:36

avatar brianteeman
brianteeman - comment - 30 Jul 2018

Can you try changing this line

$item = ArrayHelper::toObject($properties, 'CMSObject');

to
$item = ArrayHelper::toObject($properties, 'JObject');

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Jul 2018

Chance Line as suggested works, Article is created/loaded as expected.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21299.

avatar roland-d
roland-d - comment - 30 Jul 2018

The CMSObject should be changed to Joomla\CMS\Object\CMSObject. @brianteeman you want to do the PR or shall I?

avatar brianteeman
brianteeman - comment - 30 Jul 2018

@roland-d can you do it please - not got time this morning

avatar laoneo
laoneo - comment - 30 Jul 2018

You can also write CMSObject::class.

avatar roland-d
roland-d - comment - 30 Jul 2018

@laoneo That doesn't work for me. Did you test this?

The PR I created uses the fully qualified name: #21300

I will close this as we have a PR.

avatar roland-d roland-d - change - 30 Jul 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-07-30 08:28:17
Closed_By roland-d
avatar roland-d roland-d - close - 30 Jul 2018
avatar neoacevedo
neoacevedo - comment - 18 Oct 2018

Is not CMSObject deprecated at 4.0?

avatar laoneo
laoneo - comment - 19 Oct 2018

It is, but we have so many dependencies that it is basically impossible to do it without a hard BC break.

Add a Comment

Login with GitHub to post a comment