[wp-trac] [WordPress Trac] #19918: Attachments are viewable from any permalink that matches their slug

WordPress Trac noreply at wordpress.org
Thu Dec 3 18:33:07 UTC 2015


#19918: Attachments are viewable from any permalink that matches their slug
--------------------------+-----------------------------
 Reporter:  prorock       |       Owner:  wonderboymusic
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.4
Component:  Permalinks    |     Version:  3.2
 Severity:  normal        |  Resolution:  fixed
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------

Comment (by tellyworth):

 These two recent commits triggered a circular redirect in some themes on
 wp.com. Those themes filter `attachment_link` to add a fragment `#main`,
 and that interacts with the new code to redirect back to the same url.

 For an example, see `suburbia_enhanced_image_navigation` in https://wpcom-
 themes.svn.automattic.com/suburbia/functions.php.

 I checked with our theme team, and they think it's reasonable behaviour
 for a theme to do that. It's also likely that other, non-Automattic themes
 do something similar.

 I'm not really sure what the solution is, or even if there could be a
 third factor interacting, but I did confirm that reverting those two
 commits stops the circular redirect from happening.

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


More information about the wp-trac mailing list