- Issue created by @jurgenhaas
- 🇩🇪Germany jurgenhaas Gottmadingen
The problem was that none of the consumer entities was defined as default before. No idea, if the default is something new?
What resolved the issue is the following SQL statement in my case:
update consumer_field_data set is_default=1 where id=2;
- 🇸🇮Slovenia nkoporec Slovenia
I'm also seeing this issue if there are no consumers (empty list of entities), this occurred after we updated from 1.17 to 1.18.... did not debug it further but my fix was to simply downgrade it for now back to 1.17.
- Assigned to eojthebrave
- 🇺🇸United States eojthebrave Minneapolis, MN
It looks like this is caused by code that was added in 🐛 Cacheability issue when using _consumer_id query in JsonApi responses. Needs work . And that if there are no consumer entities, or none marked as default, then this method \Drupal\consumers\EventSubscriber\ConsumerVaryEventSubscriber::onRespond has an unhandled exception. And we need to catch that exception and just not set a Vary header if there are no consumers in the request.
I'll work on getting a fix for this ASAP.
- Merge request !16Issue #3463248 by eojthebrave: Drupal\consumers\MissingConsumer: Unable to... → (Merged) created by eojthebrave
-
eojthebrave →
committed edeec422 on 8.x-1.x
Issue #3463248 by eojthebrave: Drupal\consumers\MissingConsumer: Unable...
-
eojthebrave →
committed edeec422 on 8.x-1.x
- Issue was unassigned.
- Status changed to Fixed
4 months ago 4:39pm 23 July 2024 - 🇺🇸United States eojthebrave Minneapolis, MN
I've just merged in an update that handles setting the Vary header in the scenario where there are either no consumer entities, or no consumer defined as the default and none present in the request header. I also added what are essentially smoke tests to make sure we don't re-introduce this same problem again in the future.
I'll tag a new 8.x-1.19 release shortly.
@jurgenhaas, and @nkoporec if you could test this new release out and let me know if it resolves the issues you're encountering that would be great.
- 🇩🇪Germany jurgenhaas Gottmadingen
Thanks @eojthebrave for addressing this so quickly. It's difficult to test as I've resolved the issue with the approach from #2.
Just wondering, are you not granting issue credits for reporting and analysing issues?
- 🇺🇸United States eojthebrave Minneapolis, MN
Oops. Forgot about that. Added the credit, and thanks for the reminder.
Automatically closed - issue fixed for 2 weeks with no activity.