Skip to content

Bug: Faust uploads missing block files with blockset command #1633

Closed

Description

@JEverhart383

When running blockset against a WP Engine hosted WP install, only the block.json file appears to sync. A user reported this in this thread from Discord, and I was able to reproduce using my own site here: https://faustintl.wpengine.com/

Everything appears to look like it should in .faust directory, but accessing wp-uploads/faust/blocks only lists the block.json file, and the block is not available in the editor.

Screenshot_2023-11-07_at_9 51 56_AM Screenshot_2023-11-07_at_9 52 35_AM

The same steps in Local appear to do what I expect, and I can sync and use the block:
Screenshot_2023-11-07_at_10 10 16_AM

Applicable Versions

WordPress: 6.3.1
Faust WordPress Plugin: 1.1.0
WPGraphQL: 1.18.0
@faustwp/core: 1.2.0
@faustwp/cli: 1.2.0

  • WordPress version:

Steps To Reproduce

  1. Follow the instructions outlined in this guide: https://faustjs.org/tutorial/react-components-to-gutenberg-blocks

  2. Sync blocks to a remote WP install on WP Engine using blockset

  3. Access wp-uploads via FTP to see missing files

Link to code example:

https://github.com/JEverhart383/faust-intl/tree/feature/blockset

The current behavior

Block sync against a remote WP Engine install fails

The expected behavior

I should be able to use the block the same way I do on Local

Activity

  1. added
    [Type] Bug
    on Nov 7, 2023
  2. theodesp commented on Nov 8, 2023

    @theodesp
    Member

    Pinging @josephfusco so that we can take a look. It may be related to WP Engine security rules.

  3. theodesp commented on Nov 8, 2023

    @theodesp
    Member

    It might be a possible firewall rule since when I run the blockset command I get this response:

    "faust blockset" failed with the following error: Error: Network error: Error parsing response from WordPress.
        at uploadToWordPress (file:///Users/theo.despoudis/Workspace/atlas-blueprint-blueset/node_modules/@faustwp/cli/dist/blockset.js:104:19)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async blockset (file:///Users/theo.despoudis/Workspace/atlas-blueprint-blueset/node_modules/@faustwp/cli/dist/blockset.js:149:9)
        at async file:///Users/theo.despoudis/Workspace/atlas-blueprint-blueset/node_modules/@faustwp/cli/dist/index.js:74:13

    This is with no public route redirects setting on.

    I can see the blockset endpoint being accessed with 200 in the WP Engine Access logs

    Screenshot 2023-11-08 at 12 00 02
  4. theodesp commented on Nov 9, 2023

    @theodesp
    Member

    @JEverhart383 We have identified the issue and we are working on a solution.

  5. josephfusco commented on Nov 15, 2023

    @josephfusco
    Member

    I have a PR open with a proposed fix

    Also wanted to note that the block-support example project seems to be having issues.
    Screenshot 2023-11-14 at 11 36 53 AM

  6. josephfusco commented on Nov 17, 2023

    @josephfusco
    Member

    Ready for another review! :)
    #1656

  7. moved this from 🆕 Incoming to ✅ Closed in Headless OSSon Dec 19, 2023
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

    [Type] Bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions