WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 4 months ago

#41021 closed defect (bug) (fixed)

Text widget does not show Title field or TinyMCE editor

Reported by: aholstrya Owned by: westonruter
Milestone: 4.8.1 Priority: normal
Severity: normal Version: 4.8
Component: Widgets Keywords: reporter-feedback has-patch commit fixed-major
Focuses: Cc:

Description

Hello,
Further to the update towards the version of WP 4.8 I had a concern(marigold) with the widgets text which do not seem to support(bear) the function(office) " flex "...
Can you tell it to me more?
I am handed on to the version 4.7.5 and my widgets works again correctly
(Saddened for the translation Reverso, I do not speak English...)
I join(contact) you an image of widgets text (version 4.8) in version blocking.
Have a good day.
J-P Bourdet

Attachments (3)

widget-text.jpg (60.4 KB) - added by aholstrya 5 months ago.
blocked version of widget text
40951.0.diff (2.6 KB) - added by westonruter 5 months ago.
40951.1.diff (3.1 KB) - added by westonruter 5 months ago.
Add missing $number param

Download all attachments as: .zip

Change History (28)

@aholstrya
5 months ago

blocked version of widget text

#1 @westonruter
5 months ago

  • Keywords reporter-feedback added
  • Summary changed from Incompatibility ? to Text widget does not show Title field or TinyMCE editor

@aholstrya Welcome. We'll need more information. It seems like the problem is that the title field and the TinyMCE editor aren't showing in the widget. What plugins do you have active?

#2 follow-up: @aholstrya
5 months ago

Bonjour (hello !),

At first thank you for your answer

mes plugins :
Extensions en place :
Advanced Database Cleaner (2.0.0)
Akismet Anti-Spam (3.3.2)
Contact Form 7 (4.8)
Cookie Notice (1.2.38)
Disable Google Fonts (1.3)
Email Templates (1.2)
Enhanced Media Library (2.4.4)
Forum_wordpress_fr (4.1)
Hupso Share Buttons for Twitter, Facebook & Google+ (4.1.2), Imagify (1.6.4)
MaxButtons (6.19.1)
Really Simple SSL (2.5.16)
Responsive Lightbox (1.7.1)
Simple Page Ordering (2.2.4)
TinyMCE Advanced (4.5.6), To Top (1.5.3)
WooCommerce (3.0.8)
Yoast SEO (4.9)

The problem is not clean, with a basic theme, it works, with a theme child of the basic theme, it also works, but with my theme (child of Storefront) widgets works with the version 4.7.5 of WorPress but not with the version 4.8 ...

It could be an incompatibility with the function(office) " flex ", because it is having to add this function(office) in my style.css that I noticed the problem.
However I had not verified my widgets texts before making these modifications and cannot tell you if they worked correctly with the version 4.8 before my changes...

Hoping that this information will be useful for you, I hope that I could solve my problem and make the update towards carefree WP 4.8.
Thank you for your interest.
@aholstrya

#3 follow-up: @westonruter
5 months ago

@aholstrya if you disable all plugins, does the Text widget work?

Also, do the media widgets work? Try the Video, Audio, and Image widgets.

If you can then try re-activating each plugin one-by-one and check if the Text widget stops working, that will help identify if there is a specific plugin incompatibility.

Merci !

@westonruter
5 months ago

#4 follow-up: @westonruter
5 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.8.1

I got a separate report for a plugin incompatibility that had the same effect of the controls not appearing for the Text and media widgets, via @salvatorebalzano:

the problem is customize-widgets-plus plugin is not compatible with the way the new text widget gets registered. ( same applies for the new Media widgets )
https://github.com/xwp/wp-customize-widgets-plus/blob/master/php/class-optimized-widget-registration.php#L124-L125
and
https://github.com/xwp/wp-customize-widgets-plus/blob/master/php/class-optimized-widget-registration.php#L272-L273

new Text Widget uses _register() method to load TinyMCE editor and that method never gets called in customize-widget-plus

Ironically the incompatibility is with a plugin I wrote myself. 😞

I have a patch in 40951.0.diff with a proposed fix. Can you test?

#5 in reply to: ↑ 3 @aholstrya
5 months ago

Replying to westonruter:

@aholstrya if you disable all plugins, does the Text widget work?

Also, do the media widgets work? Try the Video, Audio, and Image widgets.

If you can then try re-activating each plugin one-by-one and check if the Text widget stops working, that will help identify if there is a specific plugin incompatibility.

Merci !

Hello,

none of the new widget works (sound, video, image, text).

Extensions were activated or were deactivated, the problem remains the same : Impossible to open widgets to settle them

#6 in reply to: ↑ 4 @aholstrya
5 months ago

Replying to westonruter:

I got a separate report for a plugin incompatibility that had the same effect of the controls not appearing for the Text and media widgets, via @salvatorebalzano:

the problem is customize-widgets-plus plugin is not compatible with the way the new text widget gets registered. ( same applies for the new Media widgets )
https://github.com/xwp/wp-customize-widgets-plus/blob/master/php/class-optimized-widget-registration.php#L124-L125
and
https://github.com/xwp/wp-customize-widgets-plus/blob/master/php/class-optimized-widget-registration.php#L272-L273

new Text Widget uses _register() method to load TinyMCE editor and that method never gets called in customize-widget-plus

Ironically the incompatibility is with a plugin I wrote myself.

I have a patch in 40951.0.diff with a proposed fix. Can you test?

@westonruter

I tested this solution, but no change...

#7 follow-up: @westonruter
5 months ago

@aholstrya are there JS errors shown in the web console?

#8 in reply to: ↑ 7 @aholstrya
5 months ago

Replying to westonruter:

@aholstrya are there JS errors shown in the web console?

@westonruter

Sorry but I do not know how I could supply you this information.

#9 follow-up: @westonruter
5 months ago

@aholstrya are you at WordCamp Europe by chance? It will be hard to identify the problem without seeing your installation myself.

Otherwise, you could give me access by sending me a private message on Slack.

#10 in reply to: ↑ 9 @aholstrya
5 months ago

Replying to westonruter:

@aholstrya are you at WordCamp Europe by chance? It will be hard to identify the problem without seeing your installation myself.

Otherwise, you could give me access by sending me a private message on Slack.

No I would not be in WordCamp, but I can actually give you an access to the site.
How do I have to make? Sorry but I don't know Slack

@westonruter
5 months ago

Add missing $number param

#11 @aholstrya
5 months ago

Hello, I stayed with the new parameter (number), but it changes nothing the problem...
If you wish always how tell I to send you, in private, an access on the site.
Have a good day.

#12 follow-up: @westonruter
5 months ago

@aholstrya Thanks for testing. You can sign up for Slack via the instructions here: https://make.wordpress.org/chat/

Otherwise we could use email.

#13 in reply to: ↑ 12 @aholstrya
5 months ago

Replying to westonruter:

@aholstrya Thanks for testing. You can sign up for Slack via the instructions here: https://make.wordpress.org/chat/

Otherwise we could use email.

Hello Sir..
OK for email...
In fact I know Slack, idiot whom I am, I joined it by means of the support(medium) of French-speaking WordPress but, having said that, I do not know how it works then let us leave rather on the basis of the email that I know!
And, otherwise, how find you the translations Reverso?

#14 follow-up: @westonruter
5 months ago

@aholstrya I don't see you in WordPress Slack. Please email me at trac-wp-core-41021@xwp.co.

#15 in reply to: ↑ 14 @aholstrya
5 months ago

Replying to westonruter:

@aholstrya I don't see you in WordPress Slack. Please email me at trac-wp-core-41021@xwp.co.

@westonruter : OK it's done

#16 @westonruter
5 months ago

Unfortunately I was unable to access @aholstrya's install, so I'll need someone else to be able to reproduce the issue and share access.

Nevertheless, 40951.1.diff does fix the issue as I've been able to reproduce myself, fixing compatibility with a plugin. @obenland thoughts on the patch?

#17 @obenland
5 months ago

Heh, just the other day I was thinking how neat it would be if we had something like lodash's once() or jQuery's one() for hooks :)

What's the reason for moving it to _register_one()?

#18 @westonruter
5 months ago

@obenland basically the reason is that _register is a caller of _register_one, where the latter does the real work. As seen in the Customize Widgets Plus plugin above, it's the _register_one method that will invariably be called whereas _register could get bypassed.

This ticket was mentioned in Slack in #core-customize by obenland. View the logs.


5 months ago

#20 in reply to: ↑ 2 @westonruter
5 months ago

Replying to aholstrya:

Extensions en place

I tried installing and activating all of the plugins, and I also activated the Storefront theme, and I still cannot reproduce the issue. The Text widget shows the title field and the editor as expected.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


4 months ago

#22 @westonruter
4 months ago

  • Keywords commit added
  • Owner set to westonruter
  • Status changed from new to accepted

I'll go ahead and commit this, even though it may not fix the specific issue originally reported. It fixes an issue that I was able to reproduce that had the same symptoms.

#23 @westonruter
4 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 41028:

Widgets: Enqueue assets needed by media and text widgets in their _register_one() methods.

The WP_Widget::_register_one() method is more guaranteed to be called as opposed to its wrapper WP_Widget::_register() which plugins may bypass for performance reasons.

Amends [40631], [40640].
See #35243, #32417.
Fixes #41021.

#24 @westonruter
4 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for 4.8.1.

#25 @westonruter
4 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 41052:

Widgets: Enqueue assets needed by media and text widgets in their _register_one() methods.

The WP_Widget::_register_one() method is more guaranteed to be called as opposed to its wrapper WP_Widget::_register() which plugins may bypass for performance reasons.

Merges [41028] to the 4.8 branch.
Amends [40631], [40640].
See #35243, #32417.
Fixes #41021 for 4.8.1.

Note: See TracTickets for help on using tickets.