Skip to content
This repository was archived by the owner on Nov 6, 2022. It is now read-only.
This repository was archived by the owner on Nov 6, 2022. It is now read-only.

Block failing to render in editor #436

Open

Description

@BenHarris

When attempting to render a block in the editor, the following error is displayed when the request size is greater than the web servers' limit (LimitRequestLine on Apache, defaulting to 8190):

image

I hit the issue when building a team block with a repeater, where each of the 10 team members has some metadata and a bio.

It seems to me that the best solution would be to switch to using POST rather than GET.

Activity

  1. kienstra commented on Sep 23, 2019

    @kienstra
    Collaborator

    Thanks for bringing this up!

    Hi @BenHarris,
    Thanks for opening this. Could you please help with some questions?

    1. Does that 'Error loading block' display appear only in the 'preview' display of the block, like:

    example-preview-of-block

    1. Does the 'control' display still work:

    appear-here

    1. Is the error occurring when making a POST request in your environment?

    In my environment, it looks like it makes a GET request for the 'preview' display (ServerSideRender):
    get-request-here

    Let me see if there's a way around this, though there probably won't be a quick fix. It uses ServerSideRender from Gutenberg.

    As you might have seen, there have been issues when a block has a lot of content, like in #254.

  2. BenHarris commented on Sep 23, 2019

    @BenHarris
    Author

    Hey @kienstra,

    1. Yes
    2. Yes
    3. Not quite sure what you mean

    Sorry, didn't see that issue. It is the same problem, only I found the root cause!

  3. kienstra commented on Sep 23, 2019

    @kienstra
    Collaborator

    Hi @BenHarris,
    Thanks, that helps!

    It seems to me that the best solution would be to switch to using POST rather than GET.

    Thanks, where do you see that it's making a POST request? Locally, it looks like it's making a GET request, though I could be wrong:

    get-request-here

  4. kienstra commented on Sep 23, 2019

    @kienstra
    Collaborator

    Ah, sorry. You're saying it should switch to use POST instead of GET.

  5. kienstra commented on Sep 23, 2019

    @kienstra
    Collaborator

    I'll see if that might help. It would involve reimplementing ServerSideRender, so I'm not sure about it.

  6. kienstra commented on Sep 24, 2019

    @kienstra
    Collaborator

    @lukecarbis pointed out that this Gutenberg issue is related: WordPress/gutenberg#16396

  7. lukecarbis commented on Sep 28, 2019

    @lukecarbis
    Member

    Closing in favour of WordPress/gutenberg#16396.

  8. kienstra commented on Jan 6, 2020

    @kienstra
    Collaborator

    Another user just reported this in Slack.

    We might look at forking ServerSideRender, and registering a POST endpoint for it, as suggested in WordPress/gutenberg#16396 (comment)

  9. lukecarbis commented on Jan 30, 2020

    @lukecarbis
    Member

    Reopening since this is an active bug that isn't resolved.

  10. kienstra commented on Jan 30, 2020

    @kienstra
    Collaborator

    Yeah, this keeps coming up.

    As mentioned in WordPress/gutenberg#16396 (comment), one solution might be making a Core patch and a Gutenberg PR. But I don't think those are likely to be merged, as WordPress doesn't recommend ServerSideRender.

    We could fork ServerSideRender, and register a POST endpoint for it, as suggested in WordPress/gutenberg#16396 (comment). But then there would be 2 endpoints registered for each post, one through the register_block_type() call, and the POST endpoint that we add.

    This might have scaling issues, and would probably be overkill for most users.

  11. Foine commented on Feb 13, 2020

    @Foine

    I don't know if it helps, but I do not have that issue with the 1.4.1 version of block lab.

    So I stick with that version beacause all of my blocks aren't displaying with version 1.5 and above.

  12. kienstra commented on Feb 13, 2020

    @kienstra
    Collaborator

    Hi @Foine,
    Thanks for bringing that up.

    Hm, it's strange that the issue didn't appear in 1.4.1. Do you remember what the console error was when that error appeared?

  13. kienstra commented on Apr 4, 2020

    @kienstra
    Collaborator

    Hi @BenHarris,

    Sorry this has taken so long, and hope you're doing well.

    If you're still interested, could you please test a fix for the issue?

    #524 (comment)

    Thanks, and have a great weekend.

  14. BenHarris commented on Apr 6, 2020

    @BenHarris
    Author

    Hi @kienstra,

    No problem at all!

    Have just tested and it worked as expected 👍 great work!

  15. kienstra commented on Apr 6, 2020

    @kienstra
    Collaborator

    Thanks, @BenHarris! That helps a lot having you test it, glad that it works.

    It'll probably be in our next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions