Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!587
Issue
#3210342
: EntityModerationForm redirect doesn't allow for moderation state changes in entity presave hooks
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#3210342
: EntityModerationForm redirect doesn't allow for moderation state changes in entity presave hooks
issue/drupal-3210342:3210342-entitymoderationform-redirect
into
9.2.x
Overview
0
Commits
8
Pipelines
0
Changes
4
Open
Michael Strelan
requested to merge
issue/drupal-3210342:3210342-entitymoderationform-redirect
into
9.2.x
3 years ago
Overview
0
Commits
8
Pipelines
0
Changes
4
Expand
0
0
Merge request reports
Compare
9.2.x
version 8
e16829cd
3 years ago
version 7
b6fe7d84
3 years ago
version 6
909ee2e7
3 years ago
version 5
b2d592e1
3 years ago
version 4
d15f0e19
3 years ago
version 3
d579ce42
3 years ago
version 2
c2d25d81
3 years ago
version 1
2a31376f
3 years ago
9.2.x (HEAD)
and
latest version
latest version
4f3283af
8 commits,
3 years ago
version 8
e16829cd
7 commits,
3 years ago
version 7
b6fe7d84
7 commits,
3 years ago
version 6
909ee2e7
6 commits,
3 years ago
version 5
b2d592e1
5 commits,
3 years ago
version 4
d15f0e19
4 commits,
3 years ago
version 3
d579ce42
3 commits,
3 years ago
version 2
c2d25d81
2 commits,
3 years ago
version 1
2a31376f
1 commit,
3 years ago
4 files
+
67
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
core/modules/content_moderation/src/Form/EntityModerationForm.php
+
1
−
1
Options
@@ -159,7 +159,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->
messenger
()
->
addStatus
(
$this
->
t
(
'The moderation state has been updated.'
));
$new_state
=
$this
->
moderationInfo
->
getWorkflowForEntity
(
$entity
)
->
getTypePlugin
()
->
getState
(
$
new_stat
e
);
$new_state
=
$this
->
moderationInfo
->
getWorkflowForEntity
(
$entity
)
->
getTypePlugin
()
->
getState
(
$
entity
->
moderation_state
->
valu
e
);
// The page we're on likely won't be visible if we just set the entity to
// the default state, as we hide that latest-revision tab if there is no
// pending revision. Redirect to the canonical URL instead, since that will
Loading