Make WordPress Core

Opened 7 months ago

Last modified 3 months ago

#56886 new enhancement

Admin facing add site screen missing search engine visibility field

Reported by: imath's profile imath Owned by:
Milestone: 6.3 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-patch changes-requested
Focuses: multisite Cc:

Description

When a user wants to add a new site on Multisite configs, they can use the site privacy radio buttons, see screenshot below:

/wp-signup.php

https://cldup.com/0bMdIrVLRE.png

But when a super admin wants to add a new site, they have no way to choose this setting during site creation, they need to create a "public" site, then go into the Reading settings to eventually switch to hidden to search engines. In this particular case, a super admin has less power than a regular user :)

/wp-admin/network/site-new.php

https://cldup.com/Tg7E2F-bwR.png

The attached patch is adding these missing site privacy radio buttons to let a super admin decide whether a new site should be "public" or not.

patched /wp-admin/network/site-new.php

https://cldup.com/hiFEfNw3_V.png

Attachments (1)

56886.patch (1.8 KB) - added by imath 7 months ago.

Download all attachments as: .zip

Change History (12)

@imath
7 months ago

#1 @SergeyBiryukov
7 months ago

  • Milestone changed from Awaiting Review to 6.2

#2 @abidhasan112
4 months ago

Test Report

This report validates that the indicated patch addresses the issue.

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

Environment

  • OS: macOS 13.0
  • Web Server: Nginx
  • PHP: 8.1.9
  • WordPress: 6.2-alpha-55080
  • Browser: Chrome 108.0.5359.124
  • Theme: Twenty Twenty-Three
  • Active Plugins: No plugins activated

Actual Results

  • ✅ Issue resolved with patch.

Additional Notes

I have tested the patch and it seems to be the radio buttons appeared as expected. But I'm not sure about the functionality about the search engine. How can I test it in the search engine, please let me know.

Supplemental Artifacts

Before:
https://i.ibb.co/GWhpTQt/Markup-2023-01-17-at-15-57-51.png

After:
https://i.ibb.co/Xj9hstn/Markup-2023-01-17-at-16-16-03.png

#3 follow-up: @peterwilsoncc
4 months ago

If there is an E2E test suite that runs in multiste mode, it would be great if some tests could be added to ensure Allow search engines to index this site appears on the relevant page.

@ironprogrammer do you know if such a test suite exits?

This ticket was mentioned in Slack in #core-test by robinwpdeveloper. View the logs.


4 months ago

#6 @costdev
4 months ago

  • Keywords changes-requested added

The patch needs some updates.

  • The markup has changed for this field. See the current markup on the install page. This includes hooks.
  • The patch seems to be processing all of the $blog['meta'], which goes outside the scope of this ticket.
  • intval() should be replaced with (int).
  • wp_unslash() shouldn't be necessary here. It's being converted to an integer.
Last edited 4 months ago by costdev (previous) (diff)

#7 in reply to: ↑ 3 @ironprogrammer
4 months ago

Replying to peterwilsoncc:

If there is an E2E test suite that runs in multiste mode, it would be great if some tests could be added to ensure Allow search engines to index this site appears on the relevant page.

@ironprogrammer do you know if such a test suite exits?

I don't believe there are any multisite E2E tests. A great idea though 😅

If this option is added to the multisite admin, could it be worded/designed to have better parity with the single site admin?

https://cldup.com/ICmdRpctXK.png

I realize the current patch is based on what is currently displayed to users on wp-signup.php, but "Discourage search engines from indexing this site" more accurately reflects this option. It would also simplify the interface if this was a checkbox, rather than radios.

#8 @desrosj
4 months ago

  • Summary changed from Although users can set a new site's visibility for search engines, the super admin can't :) to Admin facing add site screen missing search engine visibility field
  • Version trunk deleted

I think I'd argue that this is an enhancement and not a bug, but I don't feel strongly enough to change the type without others agreeing.

Even though the admin screen shows less to super admins than the front end form, I'm wondering if this was intentional. If I had to guess, I would say that these forms are both intentionally short. But if that conversation did occur, it was likely a really long time ago.

Regardless, it does make sense to me for both locations to match what is available.

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


3 months ago

#10 @costdev
3 months ago

  • Milestone changed from 6.2 to 6.3
  • Type changed from defect (bug) to enhancement

This ticket was discussed during the bug scrub. There was agreement by myself, @hellofromTonya and @johnbillion that this is an enhancement, and should be moved to 6.3.

#11 @johnbillion
3 months ago

As discussed in the bug scrub, this is more of an enhancement than a bug so I'm bumping it to 6.3. I agree that adding this field to the screen mostly makes sense, but I wouldn't want to add too many fields as that's what the settings screens are for.

Note: See TracTickets for help on using tickets.