Changes between Initial Version and Version 2 of Ticket #54758
- Timestamp:
- 01/07/2022 09:11:15 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #54758
- Property Keywords has-patch has-unit-tests needs-testing added
-
Ticket #54758 – Description
initial v2 5 5 As an example, the WordPress.org homepage should be embeddable: 6 6 {{{ 7 $ curl -Is https://wordpress.org/embed/ https://en-au.wordpress.org/embed/ | grep -E '^(HTTP|location)' 8 HTTP/2 301 9 location: https://wordpress.org/ 7 $ curl -Is https://en-au.wordpress.org/embed/ | grep -E '^(HTTP|location)' 10 8 HTTP/2 301 11 9 location: https://en-au.wordpress.org/ … … 14 12 The non-pretty embeds do however work, unfortunately WordPress doesn't link to these when rewrites are enabled: 15 13 {{{ 16 $ curl -Is https://wordpress.org/?embed=1 https://en-au.wordpress.org/?embed=1 | grep -E '^(HTTP|location)' 17 HTTP/2 200 14 $ curl -Is https://en-au.wordpress.org/?embed=1 | grep -E '^(HTTP|location)' 18 15 HTTP/2 200 19 16 }}} … … 21 18 After the PR attached to this ticket: 22 19 {{{ 23 $ curl -ILs https://wordpress.org/embed/ https://en-au.wordpress.org/embed/ | grep -E '^(HTTP|location)' 24 HTTP/2 200 20 $ curl -ILs https://en-au.wordpress.org/embed/ | grep -E '^(HTTP|location)' 25 21 HTTP/2 200 26 22 }}} … … 28 24 The fix attached is a combination bugfix/enhancement, as I've fixed the bug by making canonical embed aware, so it redirects to the canonical embed location. 29 25 30 The PR isn't complete, as it appears to still fail on one of the test cases I added, and appears to have altered (Potentially fixed?) the behaviour of another canonical test.26 The PR isn't complete, as it appears to still fail on one of the test-cases I added, and appears to have altered (Potentially fixed?) the behaviour of another canonical test. 31 27 32 28 A more targeted fix would be to disable canonical when `is_embed()` is truthful.