Automattic / Automattic/blocks-everywhere

Content block assumes API URL

Open
#82 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
94
Forks
21
PR merge metrics
No merged PRs in 30d

Description

The content block makes request to the REST API to get topic details. However, this assumes the path:

`https://${ blog }/wp-json/wp/v2/topic?slug=${ encodeURIComponent( slug ) }`

It's possible the path is different. For example, if the site is installed in a subdirectory or doesn't have https enabled.

If we use `@wordpress/api-fetch` then it already knows the REST API URL.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the content block code that constructs the REST API request and read how the topic details are fetched. Check the available @wordpress/api-fetch usage, then verify the request works when the site uses a subdirectory or does not use HTTPS; done means the block no longer assumes the hard-coded API path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wordpress
Domain
api, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.