-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigation Blocks not working with GeneratePress theme #28644
Comments
@imintenn I couldn't reproduce an issue: Perhaps you have some other plugins active that might be causing an issue. When an empty navigation block is first added it makes an HTTP request to fetch details of pages on the site, so it might be a plugin blocking that request. If you're comfortable using the browser dev tools, the network tab could have some revealing details. One thing that could be improved is that the block could better handle errors in HTTP requests, ideally showing a visible error notification, but still allowing users to add pages. |
Daniel,
Thank you for the prompt reply. I see that you are able to make this work.
I am not a developer, so not very good with the dev tools. Since I
can't publish the page (stuck), when I preview the page it is blank.
I guess it could be another plugin. I can test this on my staging site
to see what happens.
Appreciate the help.
…On 2/1/2021 7:00 PM, Daniel Richards wrote:
@imintenn <https://github.com/imintenn> I couldn't reproduce an issue:
Feb-02-2021 08-53-51
<https://user-images.githubusercontent.com/677833/106536861-32ce0780-6534-11eb-8e52-e8a36d34ef92.gif>
Perhaps you have some other plugins active that might be causing an
issue. When an empty navigation block is first added it makes an HTTP
request to fetch details of pages on the site, so it might be a plugin
blocking that request. If you're comfortable using the browser dev
tools, the network tab could have some revealing details.
One thing that could be improved is that the block could better handle
errors in HTTP requests, ideally showing a visible error notification,
but still allowing users to add pages.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28644 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASWBXY37WHVC62DNKIXGTETS45FC7ANCNFSM4W5TH3RA>.
|
@imintenn Let us know how the testing goes, hopefully we'll manage to work out what the problem is. |
I'm experiencing the exact same thing with GeneratePress theme. I googled gutenberg navigation block "spinning" and I found this page. I can't think of anything that I'm running that would affect http requests, but this at least gives me somewhere to start. Thanks! |
Hmm. this is the error that's showing when I inspect the page. GET https://website.com/wp-json/wp/v2/pages?parent=0&order=asc&orderby=id&per_page=100&context=edit&_locale=user 500 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}} I have absolutely no idea of what I'm looking at, but it makes me think that GeneratePress Elements editor doesn't have the access to see the list of menus. Makes me think that we need to bring this up with GeneratePress, rather than Gutenberg. Unless somebody here has an epiphany! |
This is interesting. I'd say imintenn and I are not experiencing the same problem. I can create a navigation menu block in a page with no problem. I cannot create a navigation menu block in a Generate Press Element Block (Appearance / Elements / New Block). I'm opening a ticket on GeneratePress support since I'm now convinced that my situation is some kind of permission problem. |
This looks to be nice analysis of the problem. I was inserting the
Gutenberg navigation block inside a GeneratePress container with two
columns. My plan was to create a header inside the container with the
left column having the logo and the right column containing a horizontal
navigation block.
I look forward tot what you hear from GP.
…On 3/10/2021 9:38 PM, SenorThree wrote:
This is interesting. I'd say *imintenn* and I are not experiencing the
same problem. I can create a navigation menu block in a page with no
problem. I cannot create a navigation menu block in a Generate Press
Element Block (Appearance / Elements / New Block).
I'm opening a ticket on GeneratePress support since I'm now convinced
that my situation is some kind of permission problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28644 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASWBXY2BLH6V7MZ6ETHKM7LTDAUKHANCNFSM4W5TH3RA>.
|
Are you admin level users, or some other level? |
Not sure who you are asking. I am admin level user.
…On 3/10/2021 9:47 PM, Daniel Richards wrote:
Are you admin level users, or some other level?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28644 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASWBXYZOICMZD6R252RO6QDTDA4LRANCNFSM4W5TH3RA>.
|
How about you, @SenorThree? |
Yes, admin. |
I've opened a ticket with GeneratePress, so if anybody stumbles across this ticket and is experiencing what I'm experiencing, they may find more information here: In the GeneratePress forum, I've linked back to this ticket, so hopefully if imintenn and/or I get answers, we can help future sufferers of this issue. |
Seems unusual from what I can tell. The error is basically saying that you don't have permissions to edit pages. If there are other plugins you have active for controlling access rights, then that could be related. The block code should handle this better so that the block can still be used (it might be a legitimate permissions problem for some users). So I still think this issue could be kept open as a bug. |
Since I'm editing a GeneratePress Elements Block, I could see how "asking get permission to edit pages" might get forgotten, since I'm "just" creating a block that the theme will pull in when it renders the (in this case) footer, and not actually editing a page. I can't think of any plugin that I would be running that would be controlling access rights. @imintenn, were you able to use the inspector to see what was failing for you? |
Okay, now it's getting weird. I wanted to recreate what @imintenn was doing, 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 @imintenn is experiencing. |
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 can confirm that nobody from GeneratePress forum has made any changes (They got caught by my CloudFlare firewall rules) I can't explain why it seems that everything is working now. @imintenn, maybe you want to try again... |
@SenorThree I did try to use the inspector, but did not really understand it. I did not go through the process of deactivating plugins, and decided to use the standard header provided by GeneratePress. |
@SenorThree I tried to enter the horizontal menu in the column block again, and same result for me. Spinning disk that never stops. I can't publish the page. I have found the only way to stop is to delete the navigation block or leave the page without saving. This is how the block looks - white box, the gray disc at the left spins. |
Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks. |
I do not have time to test this problem. I have decided to deactivate the Gutenberg plugin since the navigation block does not work in my application. Hopefully this resolves in a later version. |
From looking at the ticket linked, a Cloudflare firewall issue was suggested as a potential issue. In any case for now I'm going to close this one, but if new information arises or if anyone is able to confirm or provide reproducible steps, don't hesitate to comment and we'll reopen. |
Description
Horizontal navigation block was inserted into a page using Gutenberg editor. This is using GeneratePress theme. After the navigation block is inserted, nothing happens except a spinning wheel is in the field, and this never stops.
Step-by-step reproduction instructions
Expected behaviour
Actual behaviour
Screenshots or screen recording (optional)
Code snippet (optional)
WordPress information
Device information
The text was updated successfully, but these errors were encountered: