Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m1r1k’s picture

Status: Active » Needs review
FileSize
4.31 KB

Here is the patch

m1r1k’s picture

Status: Needs review » Needs work

The last submitted patch, comment-remove-global-user-from-comment-module-2061899-2.patch, failed testing.

yanniboi’s picture

+++ b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php
@@ -225,7 +225,7 @@ public static function preCreate(EntityStorageControllerInterface $storage_contr
+    $user = \Drupal::request()->attributes->get('_account');

This is where the BCDecorator Test fails.

After debugging I fount the '_account' is not among the attributes (only parameters is available..). Not sure how to fix it, but I thought I'd post what I've found.

yanniboi’s picture

Looks like the ENTITY CRUD HOOKS test fails for the same reason.

andypost’s picture

+++ b/core/modules/comment/comment.module
@@ -1323,7 +1323,7 @@ function comment_load($cid, $reset = FALSE) {
 function comment_num_new($nid, $timestamp = 0) {
-  global $user;
+  $user = Drupal::request()->attributes->get('_account');

Probably this one should use Drupal::currentUser()

m1r1k’s picture

andypost’s picture

Status: Needs work » Needs review
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NodeNewComments.php
@@ -93,7 +93,7 @@ public function query() {
+    $user = \Drupal::currentUser();

only questionable because better to inject this service

Status: Needs review » Needs work

The last submitted patch, comment-remove-global-user-from-comment-module-2061899-7.patch, failed testing.

m1r1k’s picture

joelpittet’s picture

Assigned: m1r1k » Unassigned
Issue tags: -CodeSprintCIS
FileSize
2.64 KB

Re-rolled #7

Status: Needs review » Needs work

The last submitted patch, 2061899-11-global-user-comment-reroll.patch, failed testing.

joelpittet’s picture

curious about @m1r1k said in #10 so I applied both of those patches to #11 to see what testbot does.

This is a test only. Use #11 for the basis of any future patches/rerolls.

joelpittet’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2061899-13-global-user-comment.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review
FileSize
1.59 KB
6.84 KB

Changed for this: #2053489: Standardize on \Drupal throughout core
Probably will still break.

Status: Needs review » Needs work

The last submitted patch, 2061899-16-global-user-comment.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review
FileSize
3.7 KB
1.59 KB

I think I got some extra stuff in the last so I undid that content_translation stuff and shuffled some stuff around a bit to see if I can get some better results.

joelpittet’s picture

better interdiff.

Status: Needs review » Needs work

The last submitted patch, 2061899-19-global-user-comment.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review
joelpittet’s picture

Status: Needs review » Needs work

The last submitted patch, 2061899-19-global-user-comment.patch, failed testing.

joelpittet’s picture

18 and 19 are identical but there are two more fails:S I retested both and same diff.

joelpittet’s picture

Status: Needs work » Needs review
joelpittet’s picture

Status: Needs review » Needs work

The last submitted patch, 19: 2061899-19-global-user-comment.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 19: 2061899-19-global-user-comment.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 19: 2061899-19-global-user-comment.patch, failed testing.

joelpittet’s picture

Issue summary: View changes
Status: Needs work » Needs review
Parent issue: » #2047951: [META] Remove calls to deprecated global $user and $GLOBALS['user']
FileSize
4.66 KB

Re-roll

areke’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

This doesn't apply anymore; it needs to be re-rolled again.

joelpittet’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
4.69 KB

Re-rolled again.

ryantremblay’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Passes test bot.

areke’s picture

Status: Needs review » Reviewed & tested by the community

RTBC'd again.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.