Giter Site home page Giter Site logo

Comments (7)

theodesp avatar theodesp commented on May 31, 2024 2

Hey @johnboylesingfield. If you want to use the plugin like that, maybe you can just clone the repo and run composer install as part of your CI/CD steps instead. The zip file you mentioned before only bundles specific files and folders and not the whole repo so it's not suitable for rebuilding from source.

from wp-graphql-content-blocks.

mindctrl avatar mindctrl commented on May 31, 2024

@johnboylesingfield when you say you're using "production ready files", what do you mean? Can you share how you're consuming this repo exactly? I'm curious if you're running composer install during the process to create the composer autoload files?

from wp-graphql-content-blocks.

johnboylesingfield avatar johnboylesingfield commented on May 31, 2024

Oh, sorry, I meant I downloaded the latest .zip version of the plugin as mentionned in the Readme file.

Here is what I did in more details:

  • Downloaded the above file
  • Created a submodule repo and added it to my main project using git submodule add
  • Push changes to trigger my GitHub Actions deploy to production
  • Activate the plugin in WP dashboard
  • Go to WPGraphQL IDE (not working, forever loading screen):

There is no composer.json file in this zip bundle, so I can't run composer install.

PS: The described method works well for all other plugins I have, including WPGraphQL.

from wp-graphql-content-blocks.

johnboylesingfield avatar johnboylesingfield commented on May 31, 2024

Interestingly, I tried just drag & dropping the unzipped bundle in a clean install using Local by Flywheel, and it works well.

Desactivating all other plugins I have in production does not solve the issue as well.

I'm really not sure what's going on.

from wp-graphql-content-blocks.

mindctrl avatar mindctrl commented on May 31, 2024

@johnboylesingfield thanks for the extra info. What you're describing should be doable, but seems like something is going wrong somewhere. Are you able to get any debug.log messages from WP when it gets stuck on the loading screen?

from wp-graphql-content-blocks.

mindctrl avatar mindctrl commented on May 31, 2024

@johnboylesingfield can you confirm the release zips for the other plugins are working correctly? There's an open issue internally for wp-graphql, wp-graphql-acf, and wp-graphql-smart-cache for fixing the zip files attached to GitHub releases here. They're unzipping without the parent folder name (with unzip in CLI. macOS creates folder name automatically, as does WP when uploaded via wp-admin), so if you're using your CI/CD pipeline to manually unzip one of those other three plugins alongside this one, that could be an issue.

from wp-graphql-content-blocks.

johnboylesingfield avatar johnboylesingfield commented on May 31, 2024

@mindctrl I can confirm the other plugins are working correctly. The plugins are not zipped when they are shipped in the pipeline. I unzip them, create a repo and then use that repo as a submodule. The end result is a Wordpress app deployed in a Docker Container.

Here are the WP logs:

[01-Aug-2023 19:37:18 UTC] PHP Warning:  include(/var/www/html/wp-content/plugins/wp-graphql-content-blocks/vendor/composer/../../includes/utilities/WPHelpers.php): Failed to open stream: No such file or directory in /var/www/html/wp-content/plugins/wp-graphql-acf/vendor/composer/ClassLoader.php on line 476
[01-Aug-2023 19:37:18 UTC] PHP Warning:  include(): Failed opening '/var/www/html/wp-content/plugins/wp-graphql-content-blocks/vendor/composer/../../includes/utilities/WPHelpers.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/wp-content/plugins/wp-graphql-acf/vendor/composer/ClassLoader.php on line 476
[01-Aug-2023 19:37:18 UTC] PHP Fatal error:  Uncaught Error: Class "WPGraphQL\ContentBlocks\Utilities\WPHelpers" not found in /var/www/html/wp-content/plugins/wp-graphql-content-blocks/includes/Registry/Registry.php:157
Stack trace:
#0 /var/www/html/wp-content/plugins/wp-graphql-content-blocks/includes/Registry/Registry.php(71): WPGraphQL\ContentBlocks\Registry\Registry->register_interface_types()
#1 /var/www/html/wp-content/plugins/wp-graphql-content-blocks/includes/WPGraphQLContentBlocks.php(180): WPGraphQL\ContentBlocks\Registry\Registry->init()
#2 /var/www/html/wp-includes/class-wp-hook.php(308): WPGraphQLContentBlocks->init_block_editor_registry(Object(WPGraphQL\Registry\TypeRegistry))
#3 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
#4 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /var/www/html/wp-content/plugins/wp-graphql/src/Registry/TypeRegistry.php(602): do_action('graphql_registe...', Object(WPGraphQL\Registry\TypeRegistry))
#6 /var/www/html/wp-includes/class-wp-hook.php(308): WPGraphQL\Registry\TypeRegistry->init_type_registry(Object(WPGraphQL\Registry\TypeRegistry))
#7 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
#8 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#9 /var/www/html/wp-content/plugins/wp-graphql/src/Registry/TypeRegistry.php(265): do_action('init_graphql_ty...', Object(WPGraphQL\Registry\TypeRegistry))
#10 /var/www/html/wp-content/plugins/wp-graphql/src/Registry/SchemaRegistry.php(38): WPGraphQL\Registry\TypeRegistry->init()
#11 /var/www/html/wp-content/plugins/wp-graphql/src/WPGraphQL.php(781): WPGraphQL\Registry\SchemaRegistry->get_schema()
#12 /var/www/html/wp-content/plugins/wp-graphql/src/Request.php(158): WPGraphQL::get_schema()
#13 /var/www/html/wp-content/plugins/wp-graphql/src/Router.php(479): WPGraphQL\Request->__construct()
#14 /var/www/html/wp-content/plugins/wp-graphql/src/Router.php(275): WPGraphQL\Router::process_http_request()
#15 /var/www/html/wp-includes/class-wp-hook.php(308): WPGraphQL\Router::resolve_http_request(Object(WP))
#16 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#17 /var/www/html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
#18 /var/www/html/wp-includes/class-wp.php(399): do_action_ref_array('parse_request', Array)
#19 /var/www/html/wp-includes/class-wp.php(780): WP->parse_request('')
#20 /var/www/html/wp-includes/functions.php(1334): WP->main('')
#21 /var/www/html/wp-blog-header.php(16): wp()
#22 /var/www/html/index.php(17): require('/var/www/html/w...')
#23 {main}
  thrown in /var/www/html/wp-content/plugins/wp-graphql-content-blocks/includes/Registry/Registry.php on line 157

I also just tried the same thing in another (empty) WordPress site with the same deploy process. The problem remains, which points me that it is not specific to one site config.

fyi, this is the template I wrote to deploy WordPress sites on the server: https://github.com/nt2/next-wordpress-docker

Thanks for the help, it's really appreciated.

from wp-graphql-content-blocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.