Make WordPress Core

Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#59229 closed enhancement (fixed)

Add new post/page: admin notice when JS is off can't install plugin by single click

Reported by: bosskhj's profile bosskhj Owned by: joedolson's profile joedolson
Milestone: 6.4 Priority: low
Severity: normal Version:
Component: Editor Keywords: has-patch has-testing-info commit
Focuses: accessibility Cc:

Description

In the block editor add a new post/page showing admin notice when JS is off something like this:

"The block editor requires JavaScript. Please enable JavaScript in your browser settings, or try the Classic Editor plugin."

But it will be easy for everyone if this "Classic Editor" button directly install the plugin from the admin notice when JS is off to add a new post/page.

I have added screenshots for easy-to-understand.

Attachments (8)

Block Editor add new post-page - admin notice when JS is off.png (183.5 KB) - added by bosskhj 15 months ago.
Block Editor add new post and page - admin notice when JS is off
Block Editor add new post and page - admin notice when JS is off - after clicked Classic Editor plugin.png (217.4 KB) - added by bosskhj 15 months ago.
Block Editor add new post and page - admin notice when JS is off - after clicked Classic Editor plugin
59229.diff (2.1 KB) - added by huzaifaalmesbah 15 months ago.
by using this patch we can solved this issue, also it will show a button for install classic editor and active plugin.
after apply patch classic editor install direct.2.png (225.7 KB) - added by huzaifaalmesbah 15 months ago.
if already exist plugin on plugin directory.png (224.5 KB) - added by huzaifaalmesbah 15 months ago.
59229.1.diff (2.1 KB) - added by huzaifaalmesbah 15 months ago.
update coding standards
edit-form-blocks.php.patch (2.0 KB) - added by sajjad67 15 months ago.
Fixed Few Coding Standards
59229.patch (2.0 KB) - added by sajjad67 15 months ago.
Fixed Few Coding Standards

Download all attachments as: .zip

Change History (22)

@bosskhj
15 months ago

Block Editor add new post and page - admin notice when JS is off

@bosskhj
15 months ago

Block Editor add new post and page - admin notice when JS is off - after clicked Classic Editor plugin

#1 @bosskhj
15 months ago

  • Keywords needs-screenshots added

#2 @bosskhj
15 months ago

  • Keywords has-screenshots added; needs-screenshots removed

#3 @audrasjb
15 months ago

  • Keywords needs-patch added; has-screenshots removed
  • Priority changed from normal to low
  • Type changed from feature request to enhancement

Thanks for the ticket and welcome to WordPress Core Trac,

As the block editor is the default way to edit WordPress posts and pages, I'm marking this as low priority.

Concerning a potential patch, I guess the most relevant link would be wp-admin/plugin-install.php?s=classic-editor&tab=search&type=term?

@huzaifaalmesbah
15 months ago

by using this patch we can solved this issue, also it will show a button for install classic editor and active plugin.

@huzaifaalmesbah
15 months ago

update coding standards

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


15 months ago

#5 @oglekler
15 months ago

  • Keywords has-patch needs-testing added; needs-patch removed

@sajjad67
15 months ago

Fixed Few Coding Standards

@sajjad67
15 months ago

Fixed Few Coding Standards

#6 @sajjad67
15 months ago

  • Keywords has-testing-info added; needs-testing removed

Test Report

This report validates that the indicated patch addresses the issue.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/59229/59229.patch

Environment

  • OS: Windows 10 Pro 19045.3448
  • Web Server: Apache
  • PHP: 8.1.0
  • WordPress: 6.4-alpha-56267-src
  • Browser: Chrome 116.0.5845.189
  • Theme: Twenty Twenty-Three
  • Active Plugins:
    • Classic Editor 1.6.3
    • WordPress Beta Tester 3.5.4

Expected behavior: When JavaScript is not enabled in the user browser & user trying to Add A New Post, it should allow the user to install/activate the Classic Editor plugin directly from that page.

Results

  • ✅ The patch works perfectly allowing the user to install/activate the Classic Editor plugin directly from that page with single click.

#7 @joedolson
15 months ago

  • Milestone changed from Awaiting Review to 6.4
  • Owner set to joedolson
  • Status changed from new to accepted

For consistency, I'm going to take care of this alongside #58738.

This ticket was mentioned in PR #5275 on WordPress/wordpress-develop by @joedolson.


15 months ago
#8

Update patch 59229.patch for code standards and text consistency with the block widget messages.

Trac ticket: https://core.trac.wordpress.org/ticket/59229

#9 @joedolson
15 months ago

  • Keywords commit added

#10 @joedolson
15 months ago

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

In 56672:

Editor: Improve no JS message for block editor.

Show the user a link to install the classic editor if they do not have JavaScript available and the plugin is not already installed.

Props bosskhj, audrasjb, huzaifaalmesbah, sajjad67, joedolson, costdev.
Fixes #59229.

#11 @mukesh27
15 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

@joedolson That new variable should be added in filter block_editor_no_javascript_message? Is that missed?

This ticket was mentioned in PR #5291 on WordPress/wordpress-develop by @mukesh27.


15 months ago
#12

In changeset 56672 the arge is missing. In this PR it will add that missing args.

Trac ticket: https://core.trac.wordpress.org/ticket/59229

#13 @afercia
15 months ago

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

In 56675:

Editor: Add missing parameter to the block_editor_no_javascript_message filter after [56672].
Props mukesh27.

Fixes #59229.

Note: See TracTickets for help on using tickets.