Opened 4 years ago
Closed 4 years ago
#9840 closed defect (bug) (fixed)
buttons on 4th line don't get added if 3rd line is empty
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.8 |
| Component: | TinyMCE | Version: | 2.8 |
| Severity: | normal | Keywords: | has-patch tested commit |
| Cc: |
Description
I'm not entirely sure this is due to WP or TinyMCE, but:
add_filter('mce_buttons_3', 'my_editor_button'); // adds the button
add_filter('mce_buttons_4', 'my_editor_button'); // ignores the button
I'm pretty sure we can work around this if it is TinyMCE-related -- patch I've in mind coming up in a bit if it works.
Attachments (2)
Change History (12)
Denis-de-Bernardy — 4 years ago
- Keywords has-patch tested commit added
- Owner changed from azaozz to Denis-de-Bernardy
- Status changed from new to accepted
any odds we can get this committed? it's a trivial patch that, like quite a few in the commit candidates, is just standing there, and actually fixes a bug?
- Owner changed from Denis-de-Bernardy to azaozz
- Status changed from accepted to assigned
This is a very rare bug and it's possible to be handled on the plugin level. Perhaps can check if buttons3 is empty when buttons4 is not and switch them. Not sure that it needs two extra loops there.
they're mostly free loops, both from a memory standpoint and a from performance standpoint. tiny arrays, 4 items each.
please close if you don't plan to fix it in 2.8, so I know where to stand with the two plugins of mine that need to deal with it.
Perhaps can test when row 2 or 3 is empty and move the next one up. Still not fully convinced we need this but hopefully it will reduce some support requests.
well, the bullet-proof solution is the one I uploaded, but yours works too and is sane from a statistical standpoint. I'll be happy either way, provided it's managed by WP. ;-)
Rows 1 and 2 are used by default so plugins would normally use row 3 for many extra buttons. Haven't seen plugin that adds buttons to row 4 but since it might happen and is not handled in the js, adding a check for rows 3 and 4 only.
comment:10
azaozz — 4 years ago
- Resolution set to fixed
- Status changed from assigned to closed

patch does the following: