[wp-trac] [WordPress Trac] #59866: Attachment pages are only disabled for users that are logged in

WordPress Trac noreply at wordpress.org
Thu Nov 9 14:31:02 UTC 2023


#59866: Attachment pages are only disabled for users that are logged in
-------------------------------------+---------------------
 Reporter:  joppuyo                  |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  6.4.2
Component:  Media                    |     Version:  6.4
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------

Comment (by joppuyo):

 In the [https://make.wordpress.org/core/2023/10/16/changes-to-attachment-
 pages/ blog post] announcing this feature there's the following quote:

 > As of WordPress 6.4, attachment pages for new WordPress installations
 are fully disabled.
 >
 > Until WordPress 6.4 was released, WordPress created attachment pages by
 default for every attachment uploaded. On the vast majority of sites,
 these attachment pages don’t add any meaningful information. They do,
 however, exist, get indexed by search engines, and sometimes even rank in
 search results, leading to bad results for users and site owners.

 I thought "fully disabling" attachment pages would mean that if I visit
 the page it would show a 404 status code. The current redirection
 behaviour feels like a workaround and it still reserves slugs from pages
 based on the file name (something that [https://wordpress.org/plugins
 /disable-media-pages/ my plugin] addresses). Also the redirect does not
 work if you are an anonymous user. The attachments still pollute the
 permalink structure too.

 So instead of "fully disabling" the attachment pages current functionality
 could be described as "redirects attachment pages to the file if you are
 logged in" which feels a bit half baked.

 Even Yoast SEO does a better job by doing the redirection both for logged-
 in and logged out users.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59866#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list