Site logo

Archived topic

Navigation Blocks not working with GeneratePress Elements Blocks

4 replies · Started by Bill Forsyth III on March 10, 2021

Viewing posts 1–5 of 5

Horizontal navigation block was inserted into an Element Block (footer) using Gutenberg editor. Using GeneratePress theme and GP Premium plugin. After the navigation block is inserted, nothing happens except a spinning wheel in the field, and this never stops.

I can create a navigation menu block in a page with no problem.

this is the error that's showing when I inspect the page when attempting to insert a navigation menu block into an Element Block.

GET https://website.com/wp-json/wp/v2/pages?parent=0&order=asc&orderby=id&per_page=100&context=edit&_locale=user 500
index.js?ver=46a7b96014667a4db8446b25a6b89781:1 Uncaught (in promise) Response {type: "basic", url: "https://website.com/wp-json/wp/v2/pages?paren…orderby=id&per_page=100&context=edit&_locale=user", redirected: false, status: 500, ok: false, …}

If I follow the URL, I'm seeing this error:

{"code":"rest_forbidden_context","message":"Sorry, you are not allowed to edit posts in this post type.","data":{"status":401}}

It makes me think that GeneratePress Elements editor doesn't have the access to see the list of menus.

For Reference, it appears that somebody is having a similar, but different situation here:
https://github.com/WordPress/gutenberg/issues/28644
They can't insert a navigation menu into a page, but I can. My issue is with inserting a navigation menu in a page.

Okay, now it's getting weird. I wanted to recreate what the other user on github was experiencing, in case it was the Container or Grid that was causing the problem. Now I can't create a navigation block in a page either.

At one point, it seemed like one of the navigation menu blocks that I had attempted to create had timed out and showed 3 gray boxes where the menu options should go. I did some voodoo ritual with loading / saving / not saving / refreshing / something, and it let me select the menu on that page that it moments earlier would not go past the spinning wheel. I tried recreating that voodoo ritual to no avail.

On the off chance that there was some kind of artifact issue from creating a functioning navigation block on my first test page, I tried adding a navigation block to a completely different page, and all I get is the spinning block.

So maybe my issue is the same as what the other user is experiencing.

Hi there,

I've tried accessing the site to check but I'm getting this error:
https://share.getcloudapp.com/E0u9Q1em

Can you open up the site so we could have a closer look? Let us know.

Hi Elvin,
Sorry, that's my cloudflare firewall rules getting a little too aggressive.

Now it's getting weirder. I was going to start experimenting with disabling caching, but before I changed anything, I wanted to clean up all of the pages and Element Blocks I was experimenting on.

All of a sudden, I can create any navigation menu block that I want to. I've added 3 of them to my Elements Footer Block.

I was able to add a navigation menu block in a page. I was able to add a navigation menu block in a container in a page. I was able to add a navigation menu block in a container in a grid in a page.

I'm sorry, I hate to be that guy who has had his problems miraculously solved, because it makes it seem suspiciously like operator error.

I can't explain it, and I haven't made any changes to anything on the site since I posted about half an hour ago.

That's quite strange.

I’m sorry, I hate to be that guy who has had his problems miraculously solved, because it makes it seem suspiciously like operator error.

Don't worry about it. It happens a lot. :)

I can’t explain it, and I haven’t made any changes to anything on the site since I posted about half an hour ago.

Check your error logs. It'll help a lot to get input from your site's host. :)
https://docs.generatepress.com/article/debugging-tips/

This archived topic is closed to new replies.