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
the second editor field looks exactly like the first
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
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).
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.
Labels |
Added:
?
|
Category | ⇒ | Plugins |
Title |
|
Status | New | ⇒ | Information Required |
Status | Information Required | ⇒ | Discussion |
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.
Hi,
sadly it does not.
Regards,
Aicha
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...
Issue confirmed too...
Duplicate of #20679 ?
Status | Discussion | ⇒ | Information Required |
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-06-07 10:03:27 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/18519
closed in favor of #20679.
@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?
Status | Closed | ⇒ | New |
Closed_Date | 2018-06-07 10:03:27 | ⇒ | |
Closed_By | joomla-cms-bot | ⇒ |
Closed_Date | 0000-00-00 00:00:00 | ⇒ |
Set to "open" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/18519
Status | New | ⇒ | Discussion |
Reopened as stated above.
Labels |
Added:
J4 Issue
|
I can no longer replicate this issue - can only assume it has been resolved elsewhere
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-10-14 22:52:41 |
Closed_By | ⇒ | brianteeman |
@mbabker should this be added to Projects?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18519.