Skip to content
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

Fatal error on plugin activation #222

Closed
sulemanhelp opened this issue Feb 23, 2021 · 11 comments
Closed

Fatal error on plugin activation #222

sulemanhelp opened this issue Feb 23, 2021 · 11 comments
Labels
bug Something isn't working Needs to be reproduced status: awaiting author response Additional information has been requested from the author

Comments

@sulemanhelp
Copy link

Plugin could not be activated because it triggered a fatal error.

Warning: require({pathto}\wp-content\plugins\wp-graphql-acf\vendor\composer/../phpstan/phpstan/bootstrap.php): failed to open stream: No such file or directory in {pathto}\wp-content\plugins\wp-graphql-acf\vendor\composer\autoload_real.php on line 69

Fatal error: require(): Failed opening required '{pathto}\wp-content\plugins\wp-graphql-acf\vendor\composer/../phpstan/phpstan/bootstrap.php' (include_path='{pathto}\php\PEAR') in {pathto}\wp-content\plugins\wp-graphql-acf\vendor\composer\autoload_real.php on line 69

@Cedillin
Copy link

Getting the same error with both ACF + WPGraphQL activated

Tested via composer and same issue

@juanv87
Copy link

juanv87 commented Feb 23, 2021

I am also having the same error when activating the plugin

@sulemanhelp
Copy link
Author

@juanv87 you can use code from this commit 1969768

https://github.com/wp-graphql/wp-graphql-acf/archive/19697681d01b0acafeeac256ca3bd5a68747d73a.zip

only most recent commit is causing this issue.

@juanv87
Copy link

juanv87 commented Feb 23, 2021

Thank you very much, it works perfectly! Greetings!

@RobRotell
Copy link

RobRotell commented Feb 24, 2021

Just noting that running composer install in the plugin's directory will install the missing dependencies and you should be good to go.

@jasonbahl
Copy link
Contributor

Are you installing from the develop branch? I'd recommend installing from the master branch or use the latest release. The develop branch is intended for ongoing work that may not be ready for release quite yet.

@jasonbahl jasonbahl added status: awaiting author response Additional information has been requested from the author and removed 🚀 Actionable labels Mar 5, 2021
@sulemanhelp
Copy link
Author

sulemanhelp commented Mar 6, 2021

@jasonbahl It was from master branch. for some reason autoload was trying to include phpstan. it should be for developer mode right?

In latest master branch, I am not sure if it is still replicable as of now I have not checked it again.

@jasonbahl jasonbahl added bug Something isn't working Needs to be reproduced and removed status: awaiting author response Additional information has been requested from the author labels Mar 26, 2021
@jasonbahl
Copy link
Contributor

Attempt to reproduce

  • I just setup a vanilla WordPress install.
  • I installed WPGraphQL and ACF from the WordPress.org repo.
  • I then came to this repo, downloaded the .zip from the master branch
  • I uploaded the zip to my WordPress install from the plugins page
  • I activated the plugin
  • I was able to add ACF field groups and set them to show in GraphQL
  • I did not get a fatal error

Can someone provide step-by-step instructions on how to reproduce these fatal errors, as I'm not able to reproduce.

@jasonbahl jasonbahl added the status: awaiting author response Additional information has been requested from the author label Mar 26, 2021
@no-liver
Copy link

Having the same issue:

  • downloaded the repo .zip
  • uploaded to my server Wordpress install
  • on activation I get: "/plugins/wp-graphql-acf-develop/vendor/composer/autoload_real.php on line 25"

Using @sulemanhelp version worked so it seems an issue with the latest version.

@ngongoll
Copy link

@jasonbahl change the default branch to master. I think most of the people using it without looking at the current branch. i can confirm develop branch is not working.

@jasonbahl
Copy link
Contributor

👋🏻 There as some gitignored files in the vendor directory that were causing some issues.

The latest develop, latest master and latest release should be working fine now.

I'm going to close this as testing shows it's resolved and I have confirmation from users in the WPGraphQL Slack.

If anyone is still experiencing this issue with latest develop, master or a release, open another issue, reference this one, and provide steps to reproduce and we can look into it further.


@ngongoll changing the default branch introduces other issues. We went through this on the main WPGraphQL repo as well, and it had it's own tradeoffs.

Ultimately this plugin will be on the WordPress.org repo in the not-too-distant future, and that and composer will become the recommended distribution channels, and Github will be focused more on development and contributions, and less on distribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs to be reproduced status: awaiting author response Additional information has been requested from the author
Projects
None yet
Development

No branches or pull requests

7 participants