Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#61854 closed defect (bug) (worksforme)

WordPress Post/Page navigation breaks when HTTP3 enabled.

Reported by: atulhost Owned by:
Priority: normal Milestone:
Component: General Version: 6.6.1
Severity: normal Keywords:
Cc: Focuses: administration

Description

Hello beautiful and handsome WordPress contributors. I would like to introduce a bug which I recently discovered when I was switching my all-client's site to HTTP/3 which is out of draft in Nginx web server.

I recently made a switch to HTTP/3 and let it enable for testing if everything works or not.

Soon I realized when I tried to edit some week-old content that navigation is broken.

When I click on next page it breaks to something like this: ​https://wp-admin/edit.php?paged=2

When I inspected in browser it ends up like this: ​https:///wp-admin/edit.php?paged=2

Here is console error from browser:

Uncaught DOMException: Failed to execute 'replaceState' on 'History': A history state object with URL 'https://wp-admin/edit.php' cannot be created in a document with origin 'https://www.atulhost.com' and URL 'https://www.atulhost.com/wp-admin/edit.php'.
    at https://www.atulhost.com/wp-admin/edit.php:59:19
(anonymous)	@	edit.php:59

When I click on that error line the output is:

        <link id="wp-admin-canonical" rel="canonical" href="https:///wp-admin/edit.php"/>
        <script>
            if (window.history.replaceState) {
                window.history.replaceState(null, null, document.getElementById('wp-admin-canonical').href + window.location.hash);
            }
        </script>

I tried reviewing my all configs of nginx and last changes I made, and I came to a conclusion that it breaks whenever I enable HTTP/3. I made my HTTP/3 code public here: ​https://www.atulhost.com/enable-http3-in-nginx

When I switch back to HTTP/2 it works fine.

Change History (3)

#1 follow-up: @siliconforks
2 years ago

Probably caused by this issue: ​https://github.com/php/php-src/issues/13021

#2 in reply to: ↑ 1 @atulhost
2 years ago

  • Resolution → worksforme
  • Status new → closed

Replying to siliconforks:

Probably caused by this issue: ​https://github.com/php/php-src/issues/13021

Thanks for the reference, now I understood what was the issue and found a fix for it now.

#3 @peterwilsoncc
2 years ago

  • Milestone Awaiting Review
  • Severity critical → normal
Note: See TracTickets for help on using tickets.