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

Upgraded to 3.6 and graph QL query is broken in production mode, but not dev mode. #7452

Closed
sunscreem opened this issue Jan 27, 2021 · 17 comments
Labels

Comments

@sunscreem
Copy link

sunscreem commented Jan 27, 2021

Description

After upgrading from 3.5 to 3.6.0.1 my graphQL query is broken.
The problem exists in both the front end and in the dashboard GraphiQL.

I can reproduce in local, staging and live environments.

When the site is in dev mode it works perfectly:

image

When in production mode this is the error I get:

image

Nothing comes up in the logs.

I've tried clearing storage, all caches, checking all migrations are run.

I'm not sure how to proceed from here.

Additional info

  • Craft version: 3.6.0.1
  • PHP version: 7.4.12 and 7.4.13 (local, live) [edited to show correct version nos]
  • Database driver & version: MySQL 8.0.22
  • Plugins & versions: n/a
@sunscreem sunscreem added the bug label Jan 27, 2021
@brandonkelly
Copy link
Member

Craft 3.6 requires PHP 7.2.5 or later. Can you please ensure you’re running at least that? (Ideally 7.4.x though.)

@sunscreem
Copy link
Author

Yeah @brandonkelly - sorry - typo on my part. Both 7.4.12 and 7.4.13.

@brandonkelly
Copy link
Member

Alright, can you please send a database backup, your Composer files, and the raw text of that GraphQL query over to support@craftcms.com so we can look into it?

@sunscreem
Copy link
Author

Thanks - done :)

@bencroker
Copy link
Contributor

@sunscreem It looks like the newsCategories field might not exist or be set up correctly in production.

@andris-sevcenko
Copy link
Contributor

I was unable to reproduce the error you're encountering with the files you sent over.

However, I just improved GraphQL error logging. To pull this improvement in your environment, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "dev-develop#67682d5a2d9e7f76ee0a14e477b81323c6ebf82d as 3.6.1",
  "...": "..."
}

Then run composer update.

Now, running the query should log the exception responsible for the error to your log files.

@sunscreem
Copy link
Author

Thanks @bencroker. I'll come back to you.

@andris-sevcenko
Copy link
Contributor

@sunscreem okay, got it to reproduce locally, too. I'll let you know!

@andris-sevcenko
Copy link
Contributor

Just traced it down to a behavior change in the underlying GraphQL package we use and pushed a fix for it.

To get the fix early, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "dev-develop#b6fe803404058126bb506689d7ef46db8809a57c as 3.6.1",
  "...": "..."
}

Then run composer update.

@sunscreem
Copy link
Author

Hey @andris-sevcenko. That's working now :)

https://taurx.com/media-news

@andris-sevcenko
Copy link
Contributor

Glad to hear it!

@brandonkelly
Copy link
Member

Craft 3.6.2 is out now with that fix.

@thinkflo
Copy link

thinkflo commented Oct 1, 2021

Any chance there is a regression? I seem to be experiencing this behaviour on CraftCMS 3.7.14

spicywebau/craft-embedded-assets#157

@andris-sevcenko
Copy link
Contributor

@thinkflo The error message you posted on the other issue doesn't seem to match any of the error messages from earlier instances. What makes you think it's the same error?

@thinkflo
Copy link

thinkflo commented Oct 1, 2021

@andris-sevcenko You are right. I linked the wrong closed issue. I meant this one.

nystudio107/craft-seomatic#487

@andris-sevcenko
Copy link
Contributor

@thinkflo are you using Gatsby? Can you post a stacktrace for this error?

@thinkflo
Copy link

thinkflo commented Oct 4, 2021

@andris-sevcenko Thanks for following up. I've been digging into this more and currently believe it is a plugin issue and not a Craft issue. There seems to be some case-sensitivity related problems on top of others now that I've been scratching the surface. I opened a ticket with the plugin creator and hopefully they can have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants