Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3253639
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
drupal-3253639
Commits
7e9c8411
Commit
7e9c8411
authored
8 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2705823
by Lendude, Crell: BulkForm reports incorrect count
(cherry picked from commit
971a73c6
)
parent
ad2227bf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/modules/node/src/Tests/Views/BulkFormAccessTest.php
+4
-0
4 additions, 0 deletions
core/modules/node/src/Tests/Views/BulkFormAccessTest.php
core/modules/system/src/Plugin/views/field/BulkForm.php
+0
-1
0 additions, 1 deletion
core/modules/system/src/Plugin/views/field/BulkForm.php
with
4 additions
and
1 deletion
core/modules/node/src/Tests/Views/BulkFormAccessTest.php
+
4
−
0
View file @
7e9c8411
...
...
@@ -116,6 +116,10 @@ public function testNodeEditAccess() {
'action'
=>
'node_unpublish_action'
,
);
$this
->
drupalPostForm
(
'test-node-bulk-form'
,
$edit
,
t
(
'Apply to selected items'
));
// Test that the action message isn't shown.
$this
->
assertNoRaw
(
SafeMarkup
::
format
(
'%action was applied to 1 item.'
,
[
'%action'
=>
'Unpublish content'
,
]));
// Re-load the node and check the status.
$node
=
Node
::
load
(
$node
->
id
());
$this
->
assertTrue
(
$node
->
isPublished
(),
'The node is still published.'
);
...
...
This diff is collapsed.
Click to expand it.
core/modules/system/src/Plugin/views/field/BulkForm.php
+
0
−
1
View file @
7e9c8411
...
...
@@ -380,7 +380,6 @@ public function viewsFormSubmit(&$form, FormStateInterface $form_state) {
else
{
// Don't display the message unless there are some elements affected and
// there is no confirmation form.
$count
=
count
(
array_filter
(
$form_state
->
getValue
(
$this
->
options
[
'id'
])));
if
(
$count
)
{
drupal_set_message
(
$this
->
formatPlural
(
$count
,
'%action was applied to @count item.'
,
'%action was applied to @count items.'
,
array
(
'%action'
=>
$action
->
label
(),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment