Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#52295 new defect (bug)

The response is not a valid JSON response - URL permalink using the ? sign

Reported by: rshlo's profile rshlo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.6
Component: Permalinks Keywords:
Focuses: Cc:


Encountered a problem at a friend's blog so tried to recreate it on a test site.

  1. Installed vanilla WP_5.6-he_IL with no additional settings or changes on shared Dreamhost hosting with default settings - no cache, Cloudflare or any other settings. Server uses php 7.4
  2. Created a first post - everything works great.
  3. Changed the permalink to the simple permalink format e.g. /?=123, that was the default in older versions.
  4. Tried to create a new post with a URL inside the post and got the above mentioned error message.
  5. Changed to other permalink structures - no problem at all.

Change History (2)

#1 @rshlo
4 years ago

checking the debug log points to an error in
That is a function to

		$cache[ $media_type ] = (bool) preg_match( '/(^|\s|,)application\/([\w!#\$&-\^\.\+]+\+)?json(\+oembed)?($|\s|;|,)/i', $media_type );

So it seems that this regex check is failing on links with the ? sign in the url.

Last edited 3 years ago by sabernhardt (previous) (diff)

#2 @sabernhardt
3 years ago

  • Component changed from General to Permalinks
Note: See TracTickets for help on using tickets.