Skip to content

fix Getting unknown property: craft\console\Request::actionSegments from queue jobs #16724

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

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

JodebaDigitalPulse
Copy link
Contributor

Description

actionSegments are only available when Craft::$app->getRequest()->isSiteRequest

So this fixes an error that occurs when:

  • code is executed in a queue job
  • a draft Entry was created from the drafts service
  • serialized array is passed as a value to the matrix field
  • you want to save the element (draft)

For example from this line:
https://github.com/digitalpulsebe/craft-multi-translator/blob/faa15ae8cff04d0bef92e07d0194c233ea0096d6/src/services/TranslateService.php#L81

Related issues

digitalpulsebe/craft-multi-translator#40

@brandonkelly
Copy link
Member

Thank you!

@brandonkelly
Copy link
Member

Craft 5.6.8 is out with this fix. Thanks again.

@JodebaDigitalPulse
Copy link
Contributor Author

Thank you for the quick response!

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

Successfully merging this pull request may close these issues.

2 participants