J4 Issue ?
avatar avjoomla
avjoomla
7 Nov 2017

Steps to reproduce the issue

On Joomla! 4.0 dev
open administrator/components/com_content/forms/article.xml
add second editor field

<field
				name="articletext2"
				type="editor"
				label="COM_CONTENT_FIELD_ARTICLETEXT_LABEL"
				filter="JComponentHelper::filterText"
				buttons="true"
		/>

open administrator/components/com_content/tmpl/article/edit.php
add code to display the additional field after

<fieldset class="adminform">
					<?php echo $this->form->getInput('articletext2'); ?>
                </fieldset>

for example after

<fieldset class="adminform">
					<?php echo $this->form->getInput('articletext'); ?>
				</fieldset>

Go to administration of the website, create a new article

Expected result

the second editor field looks exactly like the first

Actual result

Under the second editor field you can find an erratic string
Joomla\CMS\Object\CMSObjectJoomla\CMS\Object\CMSObjectJoomla\CMS\Object\CMSObjectJoomla\CMS\Object\CMSObjectJoomla\CMS\Object\CMSObjectJoomla\CMS\Object\CMSObjectJoomla\CMS\Object\CMSObject

Status

Category *
Editor

Featured
No
Access

Language

Tags

Select Some Options
Version Note
This issue

System information (as much as possible)

Php 7.1.7 on local Xampp on windows 7
Joomla! 4.0.0-dev Development [ Amani ] 31-March-2017 23:59 GMT
(Hopefully the latest version. I downloaded this morning from Github and no matter which options I choose for the Joomla! Update component, I already get the message that I have the latest version).

Additional comments

I'm pretty sure, that the problem is related to the editor buttons, which are created as objects of class Joomla\CMS\Object\CMSObjectJoomla. It looks to me, that the erratic string has as many repetitions of this class as the first editor has buttons. When I add a third or forth editor, the string grows even longer.

avatar avjoomla avjoomla - open - 7 Nov 2017
avatar joomla-cms-bot joomla-cms-bot - change - 7 Nov 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Nov 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Nov 2017
Category Plugins
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Nov 2017
Title
Using multiple editors with editor-xtd buttons on a single page outputs erratic string on Joomla! 4.0 dev
[4.0] Using multiple editors with editor-xtd buttons on a single page outputs erratic string
avatar joomla-cms-bot joomla-cms-bot - edited - 7 Nov 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 9 Nov 2017
Status New Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Nov 2017

@mbabker should this be added to Projects?


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Dec 2017
Status Information Required Discussion
avatar OctavianC
OctavianC - comment - 30 Jan 2018

Seems related to my MR #19454
Changing this line:
https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Editor/Editor.php#L313
To

$plugin = clone \JPluginHelper::getPlugin('editors', $this->_name);

Might solve this.

avatar avjoomla
avjoomla - comment - 30 Jan 2018

Hi,
sadly it does not.
Regards,
Aicha

avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar mavrosxristoforos
mavrosxristoforos - comment - 29 Mar 2018

I can confirm this issue. The $results from this line https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Editor/Editor.php#L199 are correct the first time, including only a HTML string to show the editor, but each consecutive time they also contain a few objects (Joomla\CMS\Object\CMSObject) (7 in my case) that quite interestingly are some of the buttons of the editor: Module, Menu, Contact, Article, Image, Page Break and Read more...

There's a loop right after this line, that builds a string $return.
If that is changed to only return $results["result"][0] it does work, but I'm not sure that this is a proper solution...

avatar joeforjoomla
joeforjoomla - comment - 29 Mar 2018

Issue confirmed too...

avatar joomla-cms-bot joomla-cms-bot - unlabeled - 7 Jun 2018
avatar Quy
Quy - comment - 7 Jun 2018

Duplicate of #20679 ?


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Jun 2018
Status Discussion Information Required
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Jun 2018
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2018-06-07 10:03:27
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 7 Jun 2018
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 7 Jun 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 7 Jun 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 7 Jun 2018

closed in favor of #20679.


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

avatar astridx
astridx - comment - 24 Jun 2018

@franz-wohlkoenig I made a mistake. This issue is not solved with the PR to this issue #20679. Can you please reopen this issue again?

avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jun 2018
Status Closed New
Closed_Date 2018-06-07 10:03:27
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jun 2018
Closed_Date 0000-00-00 00:00:00
avatar joomla-cms-bot joomla-cms-bot - reopen - 25 Jun 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 25 Jun 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jun 2018
Status New Discussion
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Jun 2018

Reopened as stated above.

avatar brianteeman brianteeman - change - 2 Aug 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 2 Aug 2018
avatar brianteeman
brianteeman - comment - 14 Oct 2018

I can no longer replicate this issue - can only assume it has been resolved elsewhere

avatar brianteeman brianteeman - change - 14 Oct 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-10-14 22:52:41
Closed_By brianteeman
avatar brianteeman brianteeman - close - 14 Oct 2018

Add a Comment

Login with GitHub to post a comment