Skip to content

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

Merged
brandonkelly merged 1 commit intocraftcms:5.xfrom
jodeba:5.x
Feb 19, 2025
Merged

fix Getting unknown property: craft\console\Request::actionSegments from queue jobs#16724
brandonkelly merged 1 commit intocraftcms:5.xfrom
jodeba:5.x

Conversation

@jodeba
Copy link
Copy Markdown
Contributor

@jodeba jodeba commented Feb 19, 2025

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
Copy Markdown
Member

Thank you!

@brandonkelly
Copy link
Copy Markdown
Member

Craft 5.6.8 is out with this fix. Thanks again.

@jodeba
Copy link
Copy Markdown
Contributor Author

jodeba commented Feb 20, 2025

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