Hey @daymobrew,
I have never tested this with multisite. I will be working on a couple of other things this week, but will add this in hopefully in the next couple of weeks
@daymobrew I know I’m a little late on this, but a version just released that may have fixed this issue.
Thanks.
I saw the changelog for 3.2.0 mention the site_url. I’ll give it a try and get back to you.
It didn’t work because of too many slashes in the REST url.
I got a 404 for the query:
https://www.example.com/block-demos/wp-json///find-my-blocks/blocks
Note the 3 forward slashes after wp-json.
The localized settings have site_url:
“site_url”:”https:\/\/www.example.com\/blocks-demos\/wp-json\/”
I removed some of the slashes in the js code. Here is the diff of what worked for me:
--- find-my-blocks.orig.js 2021-03-22 17:34:04.000000000 +0000
+++ find-my-blocks.js 2021-03-24 10:18:44.000870300 +0000
@@ -34537,10 +34537,10 @@
setBlocks = _react_1$useState2[1];
react_1.useLayoutEffect(function () {
- var fetchUrl = "/find-my-blocks/blocks";
+ var fetchUrl = "find-my-blocks/blocks";
if (find_my_blocks_globals.site_url) {
- fetchUrl = "".concat(find_my_blocks_globals.site_url, "/").concat(fetchUrl);
+ fetchUrl = "".concat(find_my_blocks_globals.site_url, fetchUrl);
}
fetch(fetchUrl).then(function (res) {
Hey @daymobrew
I have updated this in 3.3.2
. Can you please try again 🤞
3.3.2 works on my multisite installation. Brilliant. Thanks.