Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#39672 closed defect (bug) (worksforme)

REST API: Backbone URLs don't work correctly without pretty permalinks

Reported by: rmccue Owned by: adamsilverstein
Milestone: Priority: normal
Severity: normal Version:
Component: REST API Keywords: reporter-feedback
Focuses: javascript Cc:


Looks like permalinks are built incorrectly when using ugly URLs (base is http://example.com/?rest_route=/)

Change History (5)

#1 @adamsilverstein
4 years ago

  • Keywords reporter-feedback added
  • Owner set to adamsilverstein
  • Status changed from new to reviewing

@rmccue Thanks for the bug report. As far as I can tell, the client works correctly without pretty permalinks, can you give some more details and describe the steps to reproduce?

Here is what I did to test:

  • Reset permalinks to 'plain'
  • sessionStorage.clear()
  • no other changes, reload page with wp-api dependency added

Testing api with the console, the client loads the schema and parses correctly. I fetch posts successfully:


Create a post draft:

Last edited 4 years ago by adamsilverstein (previous) (diff)

#2 @adamsilverstein
4 years ago

  • Keywords close added

@rmccue can you verify this is an issue, in my testing the client works correctly without pretty permalinks. Any steps to reproduce?

#3 @rmccue
3 years ago

Potentially this was because I already had the schema cached in sessionStorage, then changed the permalink scheme. Haven't reproduced yet, so cannot say for certain.

#4 @adamsilverstein
3 years ago

Ok, I'll leave this ticket open for now, if you can't reproduce or see recur, please close.

#5 @rmccue
3 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from reviewing to closed

Let's close this out, I haven't noticed it again so likely a caching issue.

Note: See TracTickets for help on using tickets.