User tests: Successful: Unsuccessful:
The new TinyMCE in Joomla 3.5 has a serious issue.
When an editor button uses a name that is also used by TinyMCE's own buttons, it doesn't get placed at all.
For instance, a button using the title "Fun", "Form" or "Tools" will not show.
A button using the name "Container" will even cause a javascript error.
Also it isn't possible to place multiple buttons with the same title.
For instance, placing 2 buttons with the title 'My Button' will only place the first.
This PR fixes the issue, by simply prepending the name (used in javascript only) with button-
and the count number of the button.
This makes the buttons unique.
Test by changing the title ($button->text
) of for instance the core Read More button to "Fun".
You can do that via the language overrides or directly in the php code of:
plugins/editors-xtd/readmore/readmore.php
$button->text = 'Fun';
The titles that cause issues:
AbsoluteLayout, AddOnManager, Arr, Binding, BlobCache, BookmarkManager, BoxUtils, Button, ButtonGroup, CaretBookmark, CaretCandidate, CaretContainer, CaretPosition, CaretUtils, CaretWalker, Checkbox, Class, ClassList, ClientRect, Collection, Color, ColorBox, ColorButton, ColorPicker, ComboBox, Compat, Container, Control, ControlSelection, Conversions, Delay, Dimensions, DomParser, DomQuery, DOMUtils, DomUtils, DragDropOverrides, DragHelper, Editor, EditorCommands, EditorManager, EditorObservable, EditorUpload, ElementPath, ElementUtils, EnterKey, Entities, Env, EventDispatcher, EventUtils, ExtendingChar, Factory, FakeCaret, FieldSet, FilePicker, FitLayout, FlexLayout, FloatPanel, FlowLayout, FocusManager, ForceBlocks, Form, FormatControls, Formatter, FormItem, Fun, GridLayout, I18n, Iframe, ImageScanner, JSON, JSONP, JSONRequest, KeyboardNavigation, Label, Layout, LegacyInput, LineUtils, LineWalker, ListBox, LocalStorage, Menu, MenuBar, MenuButton, MenuItem, MessageBox, Mode, Movable, Node, NodeChange, NodePath, NodeType, Notification, NotificationManager, Observable, ObservableObject, Panel, PanelButton, Path, Preview, Progress, Promise, Quirks, Radio, Range, RangeUtils, Rect, ReflowQueue, Resizable, ResizeHandle, SaxParser, Schema, ScriptLoader, Scrollable, SelectBox, Selection, SelectionOverrides, Selector, Serializer, Serializer, Shortcuts, Sizzle, Slider, Spacer, SplitButton, StackLayout, Styles, StyleSheetLoader, TabPanel, TextBox, Throbber, Toolbar, Tools, Tooltip, TreeWalker, TridentSelection, UndoManager, Uploader, URI, VK, Widget, Window, WindowManager, Writer, XHR, Zwsp
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
I have tested this item successfully on b541e7c
Works good here.
PS: The seccond button get added to the toolbar but both buttons (with the same name) have the same function but it should not as it is just the description text that are the same :)
After the patch all works good also with the same description text.
Thanks @nonumber
Milestone |
Added: |
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-28 20:01:11 |
Closed_By | ⇒ | wilsonge |
Merged on review
Looks good thanks @nonumber i will test if i got back to my computer this evening