Download & Extend

Helper issue for "Comment field"

Project:Drupal core
Version:8.x-dev
Component:comment.module
Category:task
Priority:normal
Assigned:andypost
Status:needs work

Issue Summary

Ignore this one for reviews, this is just to post new periodic patches for the conversion of comment to field
Original issue #731724: Decouple comment.module from node by turning comment settings into a field

Related issues:
#1900132: [Meta] Comment as field
#1901110: Improve the UX for comment bundle pages and comment field settings
#1029708: History table for any entity

#1919002: Upgrade to D8 broken when D7 has more then one language enabled
#1922034: UpgradePathTestBase does not detect "An unrecoverable error has occurred" install errors.

Comments

#1

AttachmentSizeStatusTest resultOperations
1.patch377.15 KBIdleFAILED: [[SimpleTest]]: [MySQL] 48,499 pass(es), 395 fail(s), and 370 exception(s).View details | Re-test

#2

Assigned to:Anonymous» andypost
Status:active» needs review

#3

Fixed some tests

AttachmentSizeStatusTest resultOperations
3.patch378.29 KBIdleFAILED: [[SimpleTest]]: [MySQL] 48,553 pass(es), 319 fail(s), and 373 exception(s).View details | Re-test

#5

Status:needs review» needs work

The last submitted patch, 3.patch, failed testing.

#6

Status:needs work» needs review

Another fixes

AttachmentSizeStatusTest resultOperations
5.patch378.29 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,028 pass(es), 145 fail(s), and 205 exception(s).View details | Re-test

#7

Status:needs review» needs work

The last submitted patch, 5.patch, failed testing.

#8

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
7.patch377.81 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,147 pass(es), 151 fail(s), and 198 exception(s).View details | Re-test

#9

Status:needs review» needs work

The last submitted patch, 7.patch, failed testing.

#10

Status:needs work» needs review

Main branch tests

AttachmentSizeStatusTest resultOperations
8.patch368.85 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,108 pass(es), 5 fail(s), and 5 exception(s).View details | Re-test

#11

Status:needs review» needs work

The last submitted patch, 8.patch, failed testing.

#12

Status:needs work» needs review

Another round to move settings to widget

AttachmentSizeStatusTest resultOperations
comment-widget.patch377.3 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,133 pass(es), 182 fail(s), and 39 exception(s).View details | Re-test

#13

Status:needs review» needs work

The last submitted patch, comment-widget.patch, failed testing.

#14

Status:needs work» needs review

Fixed some tests, just moved other settings to widget in tests

<?php
-    $this->setCommentSettings('comment_default_mode', COMMENT_MODE_THREADED, 'Comment paging changed.');
+   
$this->setWidgetSettings('default_mode', COMMENT_MODE_THREADED, 'Comment paging changed.');
?>

can't reproduce upgrade tests failures locally so probably depends on php version

AttachmentSizeStatusTest resultOperations
interdiff.txt5.18 KBIgnored: Check issue status.NoneNone
comment-widget.patch378.95 KBIdleFAILED: [[SimpleTest]]: [MySQL] 49,990 pass(es), 173 fail(s), and 42 exception(s).View details | Re-test

#15

Status:needs review» needs work

The last submitted patch, comment-widget.patch, failed testing.

#16

Status:needs work» needs review

Testing of sandbox code

AttachmentSizeStatusTest resultOperations
16-sandbox.patch364.99 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,550 pass(es), 3 fail(s), and 6 exception(s).View details | Re-test

#17

Status:needs review» needs work

The last submitted patch, 16-sandbox.patch, failed testing.

#18

Filed #1916556-1: Random test failures - The string cannot be saved with current sandbox code, but patch passed the tests

#19

Status:needs work» needs review

Commited schema changes for proper length of keys

AttachmentSizeStatusTest resultOperations
comment-dd4ca06.patch365.5 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,908 pass(es), 1 fail(s), and 2 exception(s).View details | Re-test

#20

my patch with formatters. fixed formatter and re-roll for HEAD

AttachmentSizeStatusTest resultOperations
20.patch378.92 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,561 pass(es), 169 fail(s), and 38 exception(s).View details | Re-test

#21

Patch against sandbox - adds formatter and widget + upgrade path for entity display

AttachmentSizeStatusTest resultOperations
sandbox-staged.interdiff.txt32.54 KBIgnored: Check issue status.NoneNone
20.patch368.44 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,770 pass(es), 3 fail(s), and 3 exception(s).View details | Re-test

#22

Status:needs review» needs work

The last submitted patch, 20.patch, failed testing.

#23

Status:needs work» needs review

So probably this caused by my attempt to minimize a key size according #1852896: Throw an exception if a schema defines a key that would be over 1000 bytes in MySQL

AttachmentSizeStatusTest resultOperations
db.interdiff.txt2.46 KBIgnored: Check issue status.NoneNone
23.patch389.53 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,837 pass(es), 2 fail(s), and 4 exception(s).View details | Re-test
comment-formatter.patch392.47 KBIdlePASSED: [[SimpleTest]]: [MySQL] 50,814 pass(es).View details | Re-test

#24

Current sandbox after merge

AttachmentSizeStatusTest resultOperations
sandbox-upgrade-plugins.patch368.44 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,562 pass(es), 8 fail(s), and 8 exception(s).View details | Re-test

#25

Current sandbox code

AttachmentSizeStatusTest resultOperations
sandbox.patch368.44 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,569 pass(es), 7 fail(s), and 7 exception(s).View details | Re-test

#26

Status:needs review» needs work

The last submitted patch, sandbox.patch, failed testing.

#27

Status:needs work» needs review

Used a way like user_update_8011()

AttachmentSizeStatusTest resultOperations
interdiff-27.txt1.86 KBIgnored: Check issue status.NoneNone
comment-upgrade-config.patch368.89 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,755 pass(es), 2 fail(s), and 12 exception(s).View details | Re-test

#28

Status:needs review» needs work

The last submitted patch, comment-upgrade-config.patch, failed testing.

#29

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
interdiff-29.txt2.56 KBIgnored: Check issue status.NoneNone
comment-upgrade-config-29.patch369.08 KBIdlePASSED: [[SimpleTest]]: [MySQL] 50,857 pass(es).View details | Re-test

#30

Next round should be:
- fix views (required for RTBC)

- Move instance settings to formatter settings
- get rid of hook_entity_view()

+++ b/core/modules/comment/comment.installundefined
@@ -330,6 +330,16 @@ function comment_field_schema($field) {
/**
+ * Implements hook_update_dependencies().
+ */
+function comment_update_dependencies() {
+  $dependencies['comment'][8006] = array(
+    'field' => 8002,
+  );
+  return $dependencies;

Not sure it's needed

#31

Let's try

AttachmentSizeStatusTest resultOperations
comment-31.patch368.89 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,692 pass(es), 4 fail(s), and 8 exception(s).View details | Re-test

#32

Status:needs review» needs work

The last submitted patch, comment-31.patch, failed testing.

#33

Status:needs work» needs review

- fix joins for the last_comment_name field/sort
- try to get field_view_field working with entityNG (possible not the best workaround)

AttachmentSizeStatusTest resultOperations
sandbox-33.patch371.73 KBIdlePASSED: [[SimpleTest]]: [MySQL] 50,794 pass(es).View details | Re-test

#34

New patch based on #33 with updates from Berdir's latest review in the main issue.

AttachmentSizeStatusTest resultOperations
731724-comment-decouple-326.patch370.04 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,632 pass(es), 13 fail(s), and 37 exception(s).View details | Re-test

#35

Status:needs review» needs work

The last submitted patch, 731724-comment-decouple-326.patch, failed testing.

#36

Status:needs work» needs review

Reverted back result of comment_field_name_load() used for field_ui to return a bundle name string

EDIT I'm working on changed upgrade path & tests to add comment fields only for node types that have comments open OR have at least one comment OR any node that have comments enabled

AttachmentSizeStatusTest resultOperations
731724-comment-decouple-327.interdiff.txt961 bytesIgnored: Check issue status.NoneNone
731724-comment-decouple-327.patch371.71 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,877 pass(es), 3 fail(s), and 4 exception(s).View details | Re-test

#37

Status:needs review» needs work

The last submitted patch, 731724-comment-decouple-327.patch, failed testing.

#38

Status:needs work» needs review

Started to optimize upgrade path, still needs some work to properly tests statistics and conversion of disabled nodes
Added "mark deleted" unused fields that could be attached to comment bundle

AttachmentSizeStatusTest resultOperations
upgrade.patch.txt13.44 KBIgnored: Check issue status.NoneNone

#39

Address #731724-327: Decouple comment.module from node by turning comment settings into a field

AttachmentSizeStatusTest resultOperations
39.interdiff.txt1.17 KBIgnored: Check issue status.NoneNone
39.patch371.9 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,834 pass(es), 3 fail(s), and 6 exception(s).View details | Re-test

#40

Status:needs review» needs work

The last submitted patch, 39.patch, failed testing.

#41

Status:needs work» needs review

changes for #731724-333: Decouple comment.module from node by turning comment settings into a field

AttachmentSizeStatusTest resultOperations
41-field-interdiff.txt30.57 KBIgnored: Check issue status.NoneNone
41.patch367.85 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,328 pass(es), 106 fail(s), and 69 exception(s).View details | Re-test

#42

current sandbox

AttachmentSizeStatusTest resultOperations
interdiff.txt35 KBIgnored: Check issue status.NoneNone
44.patch367.74 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,606 pass(es), 15 fail(s), and 31 exception(s).View details | Re-test

#43

Status:needs review» needs work

The last submitted patch, 44.patch, failed testing.

#44

Status:needs work» needs review

#42: 44.patch queued for re-testing.

#45

Status:needs review» needs work

The last submitted patch, 44.patch, failed testing.

#46

Status:needs work» needs review

Fixed remains of ER convertion

current diffstat
105 files changed, 3276 insertions(+), 1425 deletions(-)

AttachmentSizeStatusTest resultOperations
46.interdif.txt4.82 KBIgnored: Check issue status.NoneNone
46.patch362.84 KBIdlePASSED: [[SimpleTest]]: [MySQL] 51,166 pass(es).View details | Re-test

#47

Current sandbox.. minimized patch

105 files changed, 3243 insertions(+), 1416 deletions(-)

AttachmentSizeStatusTest resultOperations
731724-comment-decouple-338.patch360.03 KBIdleFAILED: [[SimpleTest]]: [MySQL] 50,190 pass(es), 17 fail(s), and 0 exception(s).View details | Re-test

#48

Status:needs review» needs work

The last submitted patch, 731724-comment-decouple-338.patch, failed testing.

#49

Status:needs work» needs review

and again

AttachmentSizeStatusTest resultOperations
sandbox.patch369.13 KBIdlePASSED: [[SimpleTest]]: [MySQL] 51,109 pass(es).View details | Re-test

#50

I bit of more clean-up in touched doc-blocks
Also testing "m" minimized (-M25%) git option

AttachmentSizeStatusTest resultOperations
731724-interdiff-339.txt2.35 KBIgnored: Check issue status.NoneNone
731724-comment-decouple-339m.patch360.03 KBIdleFAILED: [[SimpleTest]]: [MySQL] 51,141 pass(es), 1 fail(s), and 1 exception(s).View details | Re-test
731724-comment-decouple-339.patch369.13 KBIdleFAILED: [[SimpleTest]]: [MySQL] 51,113 pass(es), 1 fail(s), and 1 exception(s).View details | Re-test

#51

Status:needs review» needs work

The last submitted patch, 731724-comment-decouple-339.patch, failed testing.

#52

Status:needs work» needs review

let's re-test sandbox

AttachmentSizeStatusTest resultOperations
sandbox.patch360.03 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch sandbox_1.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

#53

Status:needs review» needs work

The last submitted patch, sandbox.patch, failed testing.

#54

Status:needs work» needs review

Fixes for #731724-348: Decouple comment.module from node by turning comment settings into a field

AttachmentSizeStatusTest resultOperations
sandbox-54.txt7.57 KBIgnored: Check issue status.NoneNone
sandbox-54.patch375.69 KBIdleFAILED: [[SimpleTest]]: [MySQL] 48,047 pass(es), 60 fail(s), and 21 exception(s).View details | Re-test

#55

Status:needs review» needs work

The last submitted patch, sandbox-54.patch, failed testing.

#56

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
sandbox-56.patch374.97 KBIdleFAILED: [[SimpleTest]]: [MySQL] 51,508 pass(es), 2 fail(s), and 4 exception(s).View details | Re-test

#57

Status:needs review» needs work

The last submitted patch, sandbox-56.patch, failed testing.

#58

Status:needs work» needs review

merged HEAD

AttachmentSizeStatusTest resultOperations
sandbox-58.patch371.51 KBIdleFAILED: [[SimpleTest]]: [MySQL] 51,723 pass(es), 2 fail(s), and 4 exception(s).View details | Re-test

#59

Status:needs review» needs work

The last submitted patch, sandbox-58.patch, failed testing.

#60

On testbot, I'm seeing an error page after attempting to apply updates on the failed tests (and it isn't detected by UpgradePathTestBase.php):

An unrecoverable error has occured.  You can find the error message below.  It is advised to copy it to the clipboard for reference.  Please continue to the error page

However, the error is not displayed, and progressing to the error page can't happen after the batch has completed. I'm going to try and add debug code to detect this scenario and hijack the test so that we can see what actual error is being triggered.

EDIT: Clicking through on the error page link is resulting in a SQL warning:

Base table or view not found: 1146 Table 'drupaltestbotmysql.simpletest942233cache_toolbar' doesn't exist: TRUNCATE {cache_toolbar} ; Array () Group: Drupal\Core\Database\DatabaseExceptionWrapper

The verbose output from clicking the error page link is empty (zero bytes).

EDIT2: Opened #1922034: UpgradePathTestBase does not detect "An unrecoverable error has occurred" install errors. for the UpgradePathTestBase error detection.

#61

Captured the string(s) tripping the StringStorageException in StringDatabaseStorage.php line 513:

'String:
Drupal\\locale\\SourceString Object
(
    [lid] =>
    [locations] => Array
        (
            [path] => Array
                (
                    [/checkout/core/update.php?op=selection&token=7l8rG8PMDucSjF-dhNN2W5jCKnKd3O-EitmLk314gjs&id=8&op=do_nojs] => 1
                )

        )

    [source] => Created required fields for each comment bundle
    [context] =>
    [version] => 8.0-dev
    [storage:protected] => Drupal\\locale\\StringDatabaseStorage Object
        (
            [connection:protected] => Drupal\\Core\\Database\\Driver\\mysql\\Connection Object
                (
                    [needsCleanup:protected] =>
                    [target:protected] => default
                    [key:protected] => default
                    [logger:protected] =>
                    [transactionLayers:protected] => Array
                        (
                        )

                    [driverClasses:protected] => Array
                        (
                            [Merge] => Drupal\\Core\\Database\\Driver\\mysql\\Merge
                            [Select] => Drupal\\Core\\Database\\Driver\\mysql\\Select
                            [Insert] => Drupal\\Core\\Database\\Driver\\mysql\\Insert
                            [Update] => Drupal\\Core\\Database\\Driver\\mysql\\Update
                            [Delete] => Drupal\\Core\\Database\\Driver\\mysql\\Delete
                            [Schema] => Drupal\\Core\\Database\\Driver\\mysql\\Schema
                        )

                    [statementClass:protected] => Drupal\\Core\\Database\\Statement
                    [transactionSupport:protected] => 1
                    [transactionalDDLSupport:protected] =>
                    [temporaryNameIndex:protected] => 0
                    [connectionOptions:protected] => Array
                        (
                            [database] => drupaltestbotmysql
                            [username] => drupaltestbot-my
                            [password] => AorwZB8hFWzB
                            [host] => localhost
                            [port] =>
                            [namespace] => Drupal\\Core\\Database\\Driver\\mysql
                            [driver] => mysql
                            [prefix] => Array
                                (
                                    [default] => simpletest384124
                                )

                        )

                    [schema:protected] => Drupal\\Core\\Database\\Driver\\mysql\\Schema Object
                        (
                            [connection:protected] => Drupal\\Core\\Database\\Driver\\mysql\\Connection Object
*RECURSION*
                            [placeholder:protected] => 0
                            [defaultSchema:protected] => public
                            [uniqueIdentifier:protected] => 51244e13bef2b3.58452716
                        )

                    [prefixes:protected] => Array
                        (
                            [default] => simpletest384124
                        )

                    [prefixSearch:protected] => Array
                        (
                            [0] => {
                            [1] => }
                        )

                    [prefixReplace:protected] => Array
                        (
                            [0] => simpletest384124
                            [1] =>
                        )

                )

            [options:protected] => Array
                (
                    [target] => default
                )

        )

)
'

'String:
Drupal\\locale\\SourceString Object
(
    [lid] =>
    [locations] => Array
        (
            [path] => Array
                (
                    [/checkout/core/update.php?op=selection&token=7l8rG8PMDucSjF-dhNN2W5jCKnKd3O-EitmLk314gjs&id=8&op=do_nojs] => 1
                )

        )

    [source] => %type: !message in %function (line %line of %file).
    [context] =>
    [version] => 8.0-dev
    [storage:protected] => Drupal\\locale\\StringDatabaseStorage Object
        (
            [connection:protected] => Drupal\\Core\\Database\\Driver\\mysql\\Connection Object
                (
                    [needsCleanup:protected] =>
                    [target:protected] => default
                    [key:protected] => default
                    [logger:protected] =>
                    [transactionLayers:protected] => Array
                        (
                        )

                    [driverClasses:protected] => Array
                        (
                            [Merge] => Drupal\\Core\\Database\\Driver\\mysql\\Merge
                            [Select] => Drupal\\Core\\Database\\Driver\\mysql\\Select
                            [Insert] => Drupal\\Core\\Database\\Driver\\mysql\\Insert
                            [Update] => Drupal\\Core\\Database\\Driver\\mysql\\Update
                            [Delete] => Drupal\\Core\\Database\\Driver\\mysql\\Delete
                            [Schema] => Drupal\\Core\\Database\\Driver\\mysql\\Schema
                        )

                    [statementClass:protected] => Drupal\\Core\\Database\\Statement
                    [transactionSupport:protected] => 1
                    [transactionalDDLSupport:protected] =>
                    [temporaryNameIndex:protected] => 0
                    [connectionOptions:protected] => Array
                        (
                            [database] => drupaltestbotmysql
                            [username] => drupaltestbot-my
                            [password] => AorwZB8hFWzB
                            [host] => localhost
                            [port] =>
                            [namespace] => Drupal\\Core\\Database\\Driver\\mysql
                            [driver] => mysql
                            [prefix] => Array
                                (
                                    [default] => simpletest384124
                                )

                        )

                    [schema:protected] => Drupal\\Core\\Database\\Driver\\mysql\\Schema Object
                        (
                            [connection:protected] => Drupal\\Core\\Database\\Driver\\mysql\\Connection Object
*RECURSION*
                            [placeholder:protected] => 0
                            [defaultSchema:protected] => public
                            [uniqueIdentifier:protected] => 51244e13bef2b3.58452716
                        )

                    [prefixes:protected] => Array
                        (
                            [default] => simpletest384124
                        )

                    [prefixSearch:protected] => Array
                        (
                            [0] => {
                            [1] => }
                        )

                    [prefixReplace:protected] => Array
                        (
                            [0] => simpletest384124
                            [1] =>
                        )

                )

            [options:protected] => Array
                (
                    [target] => default
                )

        )

)
'

#62

From that same function:
if (($table = $this->dbStringTable($string)) && ($fields = $this->dbStringValues($string, $table))) {

$table = locales_source
$fields = array()

Once the test completes, I don't see a locales_source table in the database ... though I'm not sure whether I should?

#63

Status:needs work» needs review

Let's test the patch with included hunk from #1922034: UpgradePathTestBase does not detect "An unrecoverable error has occurred" install errors.

I still sure that we affected by #1919002: Upgrade to D8 broken when D7 has more then one language enabled

AttachmentSizeStatusTest resultOperations
sandbox-63.patch372.48 KBIdleFAILED: [[SimpleTest]]: [MySQL] 51,650 pass(es), 3 fail(s), and 6 exception(s).View details | Re-test

#64

Let's see, seems data in upgrade broken

AttachmentSizeStatusTest resultOperations
sandbox-64.txt634 bytesIgnored: Check issue status.NoneNone
sandbox-64.patch372.13 KBIdleFAILED: [[SimpleTest]]: [MySQL] 51,595 pass(es), 4 fail(s), and 8 exception(s).View details | Re-test

#65

Status:needs review» needs work

The last submitted patch, sandbox-64.patch, failed testing.

#66

Status:needs work» needs review

Both patches

AttachmentSizeStatusTest resultOperations
sandbox-66.txt1.59 KBIgnored: Check issue status.NoneNone
sandbox-66.patch373.1 KBIdleFAILED: [[SimpleTest]]: [MySQL] 51,692 pass(es), 3 fail(s), and 6 exception(s).View details | Re-test

#67

Status:needs review» needs work

The last submitted patch, sandbox-66.patch, failed testing.

#68

Status:needs work» needs review

Let's see if get_t() removed

AttachmentSizeStatusTest resultOperations
sandbox-68.txt1.66 KBIgnored: Check issue status.NoneNone
sandbox-68.patch371.53 KBIdlePASSED: [[SimpleTest]]: [MySQL] 51,692 pass(es).View details | Re-test

#69

core/modules/node/templates/node.html.twig :
     {# We hide the comments and links now so that we can render them later. #}
-    {% hide(content.comments) %}
     {% hide(content.links) %}

The comment needs to be updated accordingly :-p. Same in node.tpl.php

#70

Great work here @andypost

#71

@yched thanx for pointing. Now let's see how this removal affects a tests :)

Re-open #1916556: Random test failures - The string cannot be saved with proper details

AttachmentSizeStatusTest resultOperations
sandbox-70pre.txt3.59 KBIgnored: Check issue status.NoneNone
sandbox-70pre.patch374.75 KBIdlePASSED: [[SimpleTest]]: [MySQL] 51,783 pass(es).View details | Re-test

#72

woot!
Moving over to main issue at @andpost's request

#73

Merged HEAD

AttachmentSizeStatusTest resultOperations
sandbox-73.txt1.79 KBIgnored: Check issue status.NoneNone
sandbox-73.patch366.26 KBIdlePASSED: [[SimpleTest]]: [MySQL] 52,643 pass(es).View details | Re-test

#74

few tests with #73
15 comments without tree
10 comments per page
second page for testing
cache disabled
ab third run for drupal warm-up

$ /d/php/apache/bin/ab -c5 -n1000 http://127.0.0.1:8887/drupal/node/1?page=1
This
is ApacheBench, Version 2.3 <$Revision: 1178079 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed
to The Apache Software Foundation, http://www.apache.org/
Benchmarking
127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.2
Server Hostname:        127.0.0.1
Server Port:            8887

Document Path:          /drupal/node/1?page=1
Document Length:        5534 bytes

Concurrency Level:      5
Time taken for tests:   233.031 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6078000 bytes
HTML transferred:       5534000 bytes
Requests per second:    4.29 [#/sec] (mean)
Time per request:       1165.156 [ms] (mean)
Time per request:       233.031 [ms] (mean, across all concurrent requests)
Transfer rate:          25.47 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.8      0      16
Processing:   828 1156 122.1   1125    1656
Waiting:      813 1127 120.8   1094    1625
Total:        828 1156 122.1   1125    1672

Percentage of the requests served within a certain time (ms)
  50%   1125
  66%   1203
  75%   1250
  80%   1266
  90%   1328
  95%   1375
  98%   1422
  99%   1484
100%   1672 (longest request)

without patch

$ /d/php/apache/bin/ab -c5 -n1000 http://127.0.0.1:8887/drupal/node/1?page=1
This
is ApacheBench, Version 2.3 <$Revision: 1178079 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed
to The Apache Software Foundation, http://www.apache.org/
Benchmarking
127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.2
Server Hostname:        127.0.0.1
Server Port:            8887

Document Path:          /drupal/node/1?page=1
Document Length:        5541 bytes

Concurrency Level:      5
Time taken for tests:   235.469 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      6085000 bytes
HTML transferred:       5541000 bytes
Requests per second:    4.25 [#/sec] (mean)
Time per request:       1177.344 [ms] (mean)
Time per request:       235.469 [ms] (mean, across all concurrent requests)
Transfer rate:          25.24 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.8      0      16
Processing:   891 1165 259.8   1125    5078
Waiting:      859 1134 228.6   1094    4938
Total:        891 1165 259.8   1125    5078

Percentage of the requests served within a certain time (ms)
  50%   1125
  66%   1203
  75%   1234
  80%   1266
  90%   1328
  95%   1391
  98%   1438
  99%   1469
100%   5078 (longest request)

looks like we have no performance regression

#75

See patch #1870036-4: Comment settings for content generated by devel is coming closed. to generate comments for nodes again.

To make tests:
1) install vanila core
2) use devel_generate to make nodes with comments
3) apply patch
4) run update.php

#76

@larowlan Please check this clean-up and commit if green. Also I think you can write better comment about Only first value

I think better to have default value in one place.

Also UI should be collapsed when same as default

AttachmentSizeStatusTest resultOperations
cleanup_default_value.patch6.74 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch cleanup_default_value.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test
sandbox-default.patch375.11 KBIdlePASSED: [[SimpleTest]]: [MySQL] 52,595 pass(es).View details | Re-test

#77

Initial patch for formatters

AttachmentSizeStatusTest resultOperations
formatters.txt42.43 KBIgnored: Check issue status.NoneNone
formatters.patch388.46 KBIdleFAILED: [[SimpleTest]]: [MySQL] 52,284 pass(es), 187 fail(s), and 47 exception(s).View details | Re-test

#78

Status:needs review» needs work

The last submitted patch, formatters.patch, failed testing.

#79

Status:needs work» needs review

small fixes

AttachmentSizeStatusTest resultOperations
formatters2.txt3.78 KBIgnored: Check issue status.NoneNone
formatters2.patch388.57 KBIdleFAILED: [[SimpleTest]]: [MySQL] 52,417 pass(es), 127 fail(s), and 10 exception(s).View details | Re-test

#80

Status:needs review» needs work

The last submitted patch, formatters2.patch, failed testing.

#81

Status:needs work» needs review

fix upgrade path. Links still need some work

AttachmentSizeStatusTest resultOperations
formatters3.txt578 bytesIgnored: Check issue status.NoneNone
formatters3.patch388.59 KBIdleFAILED: [[SimpleTest]]: [MySQL] 52,497 pass(es), 126 fail(s), and 1 exception(s).View details | Re-test

#82

Status:needs review» needs work

The last submitted patch, formatters3.patch, failed testing.

#83

Status:needs work» needs review

HEAD was broken

AttachmentSizeStatusTest resultOperations
formatters4.txt8.91 KBIgnored: Check issue status.NoneNone
formatters4.patch388.63 KBIdleFAILED: [[SimpleTest]]: [MySQL] 52,520 pass(es), 125 fail(s), and 0 exception(s).View details | Re-test

#84

Status:needs review» needs work

The last submitted patch, formatters4.patch, failed testing.

#85

Status:needs work» needs review

last one for today, should work except rdf and search

AttachmentSizeStatusTest resultOperations
formatters5.txt13.39 KBIgnored: Check issue status.NoneNone
formatters5.patch389.83 KBIdleFAILED: [[SimpleTest]]: [MySQL] 52,492 pass(es), 51 fail(s), and 0 exception(s).View details | Re-test

#86

Status:needs review» needs work

The last submitted patch, formatters5.patch, failed testing.

#87

Status:needs work» needs review

Addressed #731724-341: Decouple comment.module from node by turning comment settings into a field
Moving instance settings from nested 'comment' to first level

AttachmentSizeStatusTest resultOperations
rename-nested-interdiff.txt30.29 KBIgnored: Check issue status.NoneNone
rename-nested-interdiff.patch382.28 KBIdlePASSED: [[SimpleTest]]: [MySQL] 52,564 pass(es).View details | Re-test

#88

Some clean-up to minimize patch size

AttachmentSizeStatusTest resultOperations
comment-minimize.txt17.98 KBIgnored: Check issue status.NoneNone
comment-minimize.patch374.95 KBIdlePASSED: [[SimpleTest]]: [MySQL] 52,545 pass(es).View details | Re-test

#89

Another round on formatters

AttachmentSizeStatusTest resultOperations
formatters6.patch395.53 KBIdleFAILED: [[SimpleTest]]: [MySQL] 52,474 pass(es), 67 fail(s), and 0 exception(s).View details | Re-test

#90

Status:needs review» needs work

The last submitted patch, formatters6.patch, failed testing.

#91

Status:needs work» needs review

Reverted back comment_node_view() for rss, changed rdf and merged current sandbox

AttachmentSizeStatusTest resultOperations
formatters6.patch387.76 KBIdleFAILED: [[SimpleTest]]: [MySQL] 52,482 pass(es), 43 fail(s), and 0 exception(s).View details | Re-test

#92

Status:needs review» needs work

The last submitted patch, formatters6.patch, failed testing.

#93

Status:needs work» needs review

merging head

AttachmentSizeStatusTest resultOperations
sandbox.merge_.patch375.72 KBIdlePASSED: [[SimpleTest]]: [MySQL] 52,556 pass(es).View details | Re-test

#94

Status:needs review» needs work

+++ b/core/modules/comment/comment.installundefined
@@ -36,50 +38,52 @@ function comment_uninstall() {
+  $comment_fields = comment_get_comment_fields();
+  $entity_info = entity_get_info();

+++ b/core/modules/comment/comment.views.incundefined
@@ -322,6 +314,61 @@ function comment_views_data() {
+  // Provide a relationship for each entity type except comment.
+  foreach (entity_get_info() as $type => $entity_info) {

+++ b/core/modules/comment/comment.views.incundefined
@@ -372,18 +419,31 @@ function comment_views_data() {
+  // Provide a relationship for each entity type except comment.
+  foreach (entity_get_info() as $type => $entity_info) {

+++ b/core/modules/comment/comment.views.incundefined
@@ -495,57 +571,70 @@ function comment_views_data_alter(&$data) {
+  // Provide a integration for each entity type.
+  foreach (entity_get_info() as $entity_type => $entity_info) {
+    if (!isset($entity_info['base_table'])) {

+++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/argument/UserUid.phpundefined
@@ -57,16 +57,28 @@ function default_actions($which = NULL) {
+    if ($this->table != 'comment') {
+      $table_info = drupal_container()->get('views.views_data')->get($this->table);
+      $entity_info = entity_get_info($table_info['table']['entity type']);

entity_get_info() deprecated. Use drupal_container()->get('plugin.manager.entity')->getDefinitions()
http://drupal.org/node/1929006

All other looks good

#95

Status:needs work» needs review

Merges HEAD, fixes comment #731724-384: Decouple comment.module from node by turning comment settings into a field from @berdir and #94

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.385.interdiff.txt3.02 KBIgnored: Check issue status.NoneNone
decouple-comment-node-731724.385.patch368.55 KBIdleFAILED: [[SimpleTest]]: [MySQL] Drupal installation failed.View details | Re-test

#96

@andypost - patch at #95 based on sandbox HEAD - is that up to date? Size of patch has dropped.

#97

Status:needs review» needs work

The last submitted patch, decouple-comment-node-731724.385.patch, failed testing.

#98

Status:needs work» needs review

Somehow Annotation now lives in Component

AttachmentSizeStatusTest resultOperations
interdiff-98.txt1.88 KBIgnored: Check issue status.NoneNone
sandbox-98.patch375.93 KBIdlePASSED: [[SimpleTest]]: [MySQL] 52,817 pass(es).View details | Re-test

#99

Status:needs review» needs work

The last submitted patch, sandbox-98.patch, failed testing.

#100

Status:needs work» needs review

Locally the tests are passed
#98: sandbox-98.patch queued for re-testing.

#101

Green

#102

testing changes before commit

AttachmentSizeStatusTest resultOperations
sandbox-merge-102.patch366.93 KBIdleFAILED: [[SimpleTest]]: [MySQL] 52,871 pass(es), 24 fail(s), and 20 exception(s).View details | Re-test

#103

Status:needs review» needs work

The last submitted patch, sandbox-merge-102.patch, failed testing.

#104

Status:needs work» needs review

Pushed this commit, testing sandbox

AttachmentSizeStatusTest resultOperations
sandbox-merge-104.patch375.67 KBIdleFAILED: [[SimpleTest]]: [MySQL] 53,219 pass(es), 0 fail(s), and 10 exception(s).View details | Re-test

#105

Status:needs review» needs work

The last submitted patch, sandbox-merge-104.patch, failed testing.

#106

Status:needs work» needs review

Changed entity_get_info() to use Drupal::service() notation also removed some unused calls

Failed tests are caused by statically cached entity_info so comment_views_data() operates with wrong info.
So views_invalidate_cache() could be removed in DefaultViewRecentComments.php

interdiff http://pastebin.com/pa1jz0BW

AttachmentSizeStatusTest resultOperations
sandbox-merge-106.patch375.51 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch sandbox-merge-106.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

#107

Status:needs review» needs work

The last submitted patch, sandbox-merge-106.patch, failed testing.

#108

Status:needs work» needs review

Merge after #1818556: Convert nodes to the new Entity Field API

AttachmentSizeStatusTest resultOperations
sandbox-merge-108.patch375.44 KBIdleFAILED: [[SimpleTest]]: [MySQL] 53,453 pass(es), 3 fail(s), and 91 exception(s).View details | Re-test

#109

Status:needs review» needs work

The last submitted patch, sandbox-merge-108.patch, failed testing.

#110

Status:needs work» needs review

Fixed broken tests except views handlers

AttachmentSizeStatusTest resultOperations
sandbox-merge-110.patch379 KBIdleFAILED: [[SimpleTest]]: [MySQL] 53,301 pass(es), 0 fail(s), and 91 exception(s).View details | Re-test

#111

Status:needs review» needs work

The last submitted patch, sandbox-merge-110.patch, failed testing.

#112

Status:needs work» needs review

This fixes 'entity_id', 'entity_type' and 'field_name' but NodeNewComments still broken - views wont join statistics table

AttachmentSizeStatusTest resultOperations
comment-views.txt3.96 KBIgnored: Check issue status.NoneNone
comment-views.patch380.87 KBIdleFAILED: [[SimpleTest]]: [MySQL] 53,428 pass(es), 0 fail(s), and 91 exception(s).View details | Re-test

#113

Status:needs review» needs work

The last submitted patch, comment-views.patch, failed testing.

#114

Status:needs work» needs review

This adds \Drupal\views\ViewsDataCache::flush() to selectively clear \Drupal\views\ViewsDataCache->storage
Uses that to flush comment and comment_entity_statistics form storage after adding the fields.
Couldn't see any other way to do it with the existing class.
Also adds a check in field_view_field to make sure the field actually contains a value for non NG entities.

@andypost, this not yet committed to the sandbox

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.114.interdiff.txt6.21 KBIgnored: Check issue status.NoneNone
decouple-comment-node-731724.114.patch373.7 KBIdlePASSED: [[SimpleTest]]: [MySQL] 53,353 pass(es).View details | Re-test

#115

Committed patch at 114 to sandbox.
Changed the flush() method to delete() at request of @dawehner and also clears the cache entries at the same time (also at his suggestion).
This not yet committed to sandbox

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.115.interdiff.txt3.16 KBIgnored: Check issue status.NoneNone
decouple-comment-node-731724.helper.115.patch373.81 KBIdleFAILED: [[SimpleTest]]: [MySQL] 53,313 pass(es), 0 fail(s), and 5 exception(s).View details | Re-test

#116

Incorrect reference to $table in 115.

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.116.interdiff.txt604 bytesIgnored: Check issue status.NoneNone
decouple-comment-node-731724.helper.116.patch373.81 KBIdlePASSED: [[SimpleTest]]: [MySQL] 53,349 pass(es).View details | Re-test

#117

Awesome! @larowlan++

+++ b/core/modules/views/lib/Drupal/views/ViewsDataCache.php
@@ -256,4 +256,19 @@ public function destruct() {
+  /**
+   * Allows an entry in the storage to be removed.
+   *
+   * @param string $key
+   *   (Optional) The key to clear in the storage. Defaults to NULL.
+   */

Suppose this change should be filed as separate issue. As increased DX

#118

If we add a new method to the viewsDataCache we should certainly add a new test for that, so maybe we should as andypost said move this to a new issue.

In general this ViewsDataCache changes look pretty good.

#119

Patch at 116 pushed to sandbox, will file new issue for views changes

#121

Chasing HEAD

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.121.interdiff.txt2.31 KBIgnored: Check issue status.NoneNone
decouple-comment-node-731724.helper.121.patch373.45 KBIdlePASSED: [[SimpleTest]]: [MySQL] 53,298 pass(es).View details | Re-test

#122

Chasing HEAD

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.122.patch372.61 KBIdlePASSED: [[SimpleTest]]: [MySQL] 53,441 pass(es).View details | Re-test

#123

New patch with upgrade path

AttachmentSizeStatusTest resultOperations
upgrade-path.txt13.95 KBIgnored: Check issue status.NoneNone
731724-upgrade-path.patch387.9 KBIdleFAILED: [[SimpleTest]]: [MySQL] 53,895 pass(es), 23 fail(s), and 137 exception(s).View details | Re-test

#124

Status:needs review» needs work

The last submitted patch, 731724-upgrade-path.patch, failed testing.

#125

Status:needs work» needs review

Sanbox re-test

AttachmentSizeStatusTest resultOperations
sandbox-merge-125.patch379.96 KBIdleFAILED: [[SimpleTest]]: [MySQL] 54,328 pass(es), 0 fail(s), and 126 exception(s).View details | Re-test

#126

Status:needs review» needs work

The last submitted patch, sandbox-merge-125.patch, failed testing.

#127

Pushed changes according #1732730: [meta] Implement the new entity field API for all field types

AttachmentSizeStatusTest resultOperations
interdiff.txt1.64 KBIgnored: Check issue status.NoneNone
sandbox-merge-127.patch381.14 KBIdleFAILED: [[SimpleTest]]: [MySQL] Failed to run tests: failed to login to test site.View details | Re-test
731724-upgrade-path.patch389.08 KBIdleFAILED: [[SimpleTest]]: [MySQL] Failed to run tests: failed to login to test site.View details | Re-test

#128

Status:needs work» needs review

Pushed follow-up commit for

/**
- * Defines the 'test_field' entity field item.
+ * Defines the 'comment_field' entity field item.
  */

#129

Status:needs review» needs work

The last submitted patch, 731724-upgrade-path.patch, failed testing.

#130

Status:needs work» needs review

And now in proper place

AttachmentSizeStatusTest resultOperations
731724-upgrade-path.patch389.06 KBIdleFAILED: [[SimpleTest]]: [MySQL] 53,781 pass(es), 26 fail(s), and 27 exception(s).View details | Re-test
sandbox-merge-130.patch381.12 KBIdleFAILED: [[SimpleTest]]: [MySQL] 54,263 pass(es), 2 fail(s), and 6 exception(s).View details | Re-test

#131

Status:needs review» needs work

The last submitted patch, sandbox-merge-130.patch, failed testing.

#132

Looks like comment_entity_load() is broken, so no comment_statistics attached and no Hidden option availiable

#133

Status:needs work» needs review

Here's a interdiff to be commited:
1) LANGUAGE should not be used in drupalCreateNode() for comment field
2) comment.maintain_entity_statistics is not converted to state
3) fix for come comment could be skipped

views relation for node broken again so views.view.comments_recent.yml is not working (suppose we need @dawehner here again)

AttachmentSizeStatusTest resultOperations
interdiff.txt4.96 KBIgnored: Check issue status.NoneNone
sandbox-133.patch381.31 KBIdleFAILED: [[SimpleTest]]: [MySQL] 54,304 pass(es), 1 fail(s), and 6 exception(s).View details | Re-test

#134

Does someone know why the interdiff fails?

AttachmentSizeStatusTest resultOperations
drupal-1907960-134.patch376.09 KBIdleFAILED: [[SimpleTest]]: [MySQL] 54,135 pass(es), 0 fail(s), and 7 exception(s).View details | Re-test

#135

http://privatepaste.com/b5e8547945 dawehner's changes are merged and commited http://privatepaste.com/2468b5ddc7
Also added check that entity has comment fields in comment_entity_load() and comment_entity_insert()

AttachmentSizeStatusTest resultOperations
sandbox-merge-M25-135.patch373.15 KBIdleFAILED: [[SimpleTest]]: [MySQL] 54,090 pass(es), 1 fail(s), and 4 exception(s).View details | Re-test

#136

Status:needs review» needs work

The last submitted patch, sandbox-merge-M25-135.patch, failed testing.

#137

#138

Status:needs work» needs review

Let's see how much broken for last merge

AttachmentSizeStatusTest resultOperations
sandbox-merge-138.patch372.63 KBIdleFAILED: [[SimpleTest]]: [MySQL] Drupal installation failed.View details | Re-test

#139

Status:needs review» needs work

The last submitted patch, sandbox-merge-138.patch, failed testing.

#140

Status:needs work» needs review

Fixes plugin -> pluginid issues

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.140.interdiff.txt2.58 KBIgnored: Check issue status.NoneNone
decouple-comment-node-731724.helper.140.patch374.32 KBIdleFAILED: [[SimpleTest]]: [MySQL] 54,312 pass(es), 44 fail(s), and 12 exception(s).View details | Re-test

#141

Status:needs review» needs work

The last submitted patch, decouple-comment-node-731724.helper.140.patch, failed testing.

#142

Status:needs work» needs review

Another merge

AttachmentSizeStatusTest resultOperations
sandbox-merge-142.patch373.09 KBIdleFAILED: [[SimpleTest]]: [MySQL] 54,495 pass(es), 44 fail(s), and 10 exception(s).View details | Re-test

#143

Status:needs review» needs work

The last submitted patch, sandbox-merge-142.patch, failed testing.

#144

Status:needs work» needs review

Fix some broken tests

AttachmentSizeStatusTest resultOperations
interdiff.txt1.93 KBIgnored: Check issue status.NoneNone
sandbox-merge-144.patch374.12 KBIdleFAILED: [[SimpleTest]]: [MySQL] 54,653 pass(es), 4 fail(s), and 6 exception(s).View details | Re-test

#145

Status:needs review» needs work

The last submitted patch, sandbox-merge-144.patch, failed testing.

#146

Status:needs work» needs review

@dawehner++

AttachmentSizeStatusTest resultOperations
sandbox-merge-146.patch376.81 KBIdleFAILED: [[SimpleTest]]: [MySQL] 55,088 pass(es), 2 fail(s), and 1 exception(s).View details | Re-test

#147

Status:needs review» needs work

The last submitted patch, sandbox-merge-146.patch, failed testing.

#148

Status:needs work» needs review

Should be green. Upgrade tests are fixed
Commits list

Interdiff to show last commit (debug does not included - just to point why === changed to ==)

+++ b/core/modules/comment/lib/Drupal/comment/Plugin/field/formatter/CommentDefaultFormatter.phpundefined
@@ -0,0 +1,86 @@
+      $comment_settings = $this->instance['settings'];
...
+        $mode = $comment_settings['default_mode'];
+        $comments_per_page = $comment_settings['per_page'];
+        if ($cids = comment_get_thread($entity, $field['field_name'], $mode, $comments_per_page)) {

$mode always returns as string value

AttachmentSizeStatusTest resultOperations
interdiff.txt1.59 KBIgnored: Check issue status.NoneNone
sandbox-merge-148.patch377.84 KBIdleFAILED: [[SimpleTest]]: [MySQL] 55,186 pass(es), 10 fail(s), and 1 exception(s).View details | Re-test

#149

Status:needs review» needs work

The last submitted patch, sandbox-merge-148.patch, failed testing.

#150

Status:needs work» needs review

As fields now entities - the easiest way to add right dependency

AttachmentSizeStatusTest resultOperations
interdiff.txt982 bytesIgnored: Check issue status.NoneNone
sandbox-merge-150.patch386.9 KBIdleFAILED: [[SimpleTest]]: [MySQL] 54,931 pass(es), 8 fail(s), and 7 exception(s).View details | Re-test

#151

Status:needs review» needs work

The last submitted patch, sandbox-merge-150.patch, failed testing.

#152

Status:needs work» needs review

Fix random failures

AttachmentSizeStatusTest resultOperations
sandbox-merge-151.patch378.13 KBIdleFAILED: [[SimpleTest]]: [MySQL] 54,893 pass(es), 7 fail(s), and 7 exception(s).View details | Re-test

#153

Status:needs review» needs work

The last submitted patch, sandbox-merge-151.patch, failed testing.

#154

Current todo:

1) Fix broken tests - needs to solve dependency graph
patch comment-updates.txt - user pictures still broken

2) Find a way to implement 'entity_id' definition constrains
patch comment-def.txt - still no clue how 'properly' to get entity

3) Fix Drupal/comment/Plugin/entity_reference/selection/CommentSelection.php
Looks similar to 2) but needs to remove node relation

AttachmentSizeStatusTest resultOperations
comment-updates.txt2.53 KBIgnored: Check issue status.NoneNone
comment-def.txt2.42 KBIgnored: Check issue status.NoneNone

#155

Why are you overriding getValue() in CommentEntityItem ? It's not supposed to be computed, is it?

#156

Status:needs work» needs review

Chases head, still to-do's as per #154 and any test fails

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.156.patch377.51 KBIdleFAILED: [[SimpleTest]]: [MySQL] 55,212 pass(es), 31 fail(s), and 32 exception(s).View details | Re-test

#157

Status:needs review» needs work

The last submitted patch, decouple-comment-node-731724.helper.156.patch, failed testing.

#158

So looks like same fails as above plus the upgrade issues identified at #154

#159

Status:needs work» needs review

Adds the update deps from #154

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.159.interdiff.txt2.69 KBIgnored: Check issue status.NoneNone
decouple-comment-node-731724.helper.159.patch378.6 KBIdleFAILED: [[SimpleTest]]: [MySQL] 55,169 pass(es), 74 fail(s), and 27 exception(s).View details | Re-test

#160

Status:needs review» needs work

The last submitted patch, decouple-comment-node-731724.helper.159.patch, failed testing.

#161

Status:needs work» needs review

Makes dep optional

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.161.interdiff.txt712 bytesIgnored: Check issue status.NoneNone
decouple-comment-node-731724.161.patch377.65 KBIdleFAILED: [[SimpleTest]]: [MySQL] 55,570 pass(es), 2 fail(s), and 77 exception(s).View details | Re-test

#162

Reverses logic
@andypost++

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.162.interdiff.txt1.16 KBIgnored: Check issue status.NoneNone
decouple-comment-node-731724.162.patch377.35 KBIdleFAILED: [[SimpleTest]]: [MySQL] 55,662 pass(es), 2 fail(s), and 3 exception(s).View details | Re-test

#163

Status:needs review» needs work

The last submitted patch, decouple-comment-node-731724.162.patch, failed testing.

#164

Status:needs work» needs review

Fix broken tests git show 5a22142..73ed66a > interdiff.txt

PS decouple-comment-node-731724.164_.patch just same patch with -M25%

AttachmentSizeStatusTest resultOperations
interdiff.txt5.63 KBIgnored: Check issue status.NoneNone
decouple-comment-node-731724.164.patch385.12 KBIdlePASSED: [[SimpleTest]]: [MySQL] 55,670 pass(es).View details | Re-test
decouple-comment-node-731724.164_.patch376.3 KBIdlePASSED: [[SimpleTest]]: [MySQL] 55,951 pass(es).View details | Re-test

#165

Reverts 4ec8332
Also xhprof output is attached:

Before:

Total Incl. Wall Time (microsec): 5,834,274 microsecs
Total Incl. CPU (microsecs): 5,744,359 microsecs
Total Incl. MemUse (bytes): 15,029,036 bytes
Total Incl. PeakMemUse (bytes): 15,960,536 bytes
Number of Function Calls: 469,702

After:

Total Incl. Wall Time (microsec): 5,817,289 microsecs
Total Incl. CPU (microsecs): 5,716,357 microsecs
Total Incl. MemUse (bytes): 13,609,980 bytes
Total Incl. PeakMemUse (bytes): 14,551,396 bytes
Number of Function Calls: 479,456
AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.165.patch408.34 KBIdleFAILED: [[SimpleTest]]: [MySQL] 55,889 pass(es), 2 fail(s), and 0 exception(s).View details | Re-test
xhprof-output.zip17.87 KBIgnored: Check issue status.NoneNone

#166

Note xhprof output is for node view with 100 comments and per-page set to 150 (there is no 100 option)

#167

Status:needs review» needs work

The last submitted patch, decouple-comment-node-731724.helper.165.patch, failed testing.

#168

Status:needs work» needs review

#165: decouple-comment-node-731724.helper.165.patch queued for re-testing.

#169

Reverting 4ec8332 broke file access

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.169.interdiff.txt823 bytesIgnored: Check issue status.NoneNone
decouple-comment-node-731724.helper.169.patch377.93 KBIdlePASSED: [[SimpleTest]]: [MySQL] 56,213 pass(es).View details | Re-test

#170

Fixes for #1900132-16: [Meta] Comment as field

AttachmentSizeStatusTest resultOperations
decouple-comment-node-731724.helper.171.interdiff.txt18.4 KBIgnored: Check issue status.NoneNone
decouple-comment-node-731724.helper.171.patch383.87 KBIdleFAILED: [[SimpleTest]]: [MySQL] 55,337 pass(es), 25 fail(s), and 25 exception(s).View details | Re-test

#171

Merge for Issue #1043198: Change notice: Convert view modes to ConfigEntity
also commited

--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentAdminTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentAdminTest.php
@@ -2,7 +2,7 @@

/**
  * @file
- * Definition of Drupal\comment\Tests\CommentAdminTest.
+ * Contains \Drupal\comment\Tests\CommentAdminTest.
  */
AttachmentSizeStatusTest resultOperations
sandbox-merge-171.patch381.87 KBIdleFAILED: [[SimpleTest]]: [MySQL] 55,361 pass(es), 26 fail(s), and 25 exception(s).View details | Re-test

#172

Status:needs review» needs work

The last submitted patch, sandbox-merge-171.patch, failed testing.

#173

Status:needs work» needs review

Fix routing with stab in hook_menu()
Normalize path to common comments/manage/{bundle}
Changed deprecated ControllerInterface

Also fix upgrade path tests

--- a/core/modules/comment/comment.install
+++ b/core/modules/comment/comment.install
@@ -582,12 +582,11 @@ function comment_update_8006(&$sandbox) {
     }
     _update_7000_field_create_field($field);

-    $existing_instance = db_select('field_config_instance', 'f')
-      ->condition('field_name', $field['field_name'])
-      ->condition('bundle', $node_type)
-      ->condition('entity_type', 'node')
-      ->execute()
-      ->fetch();
+    $existing_instance = (bool) db_query_range('SELECT 1 FROM {field_config_instance} WHERE field_name = :field_name AND bundle = :bundle AND entity_type = :ent
+      'field_name' => $field['field_name'],
+      'bundle' => $node_type,
+      'entity_type' => 'node',
+    ))->fetchField();
AttachmentSizeStatusTest resultOperations
interdiff.txt4.28 KBIgnored: Check issue status.NoneNone
sandbox-merge-173.patch381.95 KBIdleFAILED: [[SimpleTest]]: [MySQL] 56,358 pass(es), 27 fail(s), and 18 exception(s).View details | Re-test

#174

Status:needs review» needs work

The last submitted patch, sandbox-merge-173.patch, failed testing.

#175

Status:needs work» needs review

Fix the rest broken tests. I think /manage is great improvement so allowing contrib to attach own tabs to comment bundles

AttachmentSizeStatusTest resultOperations
interdiff.txt2.37 KBIgnored: Check issue status.NoneNone
sandbox-merge-175.patch381.98 KBIdlePASSED: [[SimpleTest]]: [MySQL] 55,970 pass(es).View details | Re-test

#176

Another clean-ups
- form alter
- bundle stub-page

AttachmentSizeStatusTest resultOperations
interdiff.txt5.18 KBIgnored: Check issue status.NoneNone
sandbox-merge-176.patch383.69 KBIdlePASSED: [[SimpleTest]]: [MySQL] 56,400 pass(es).View details | Re-test

#177

+++ b/core/modules/comment/comment.admin.incundefined
@@ -82,23 +82,30 @@ function comment_admin_overview($form, &$form_state, $arg) {
+  if (module_exists('node')) {
+    // Special case to ensure node access works.

Module_exists is deprecated... use Drupal::moduleHandler() instead

+++ b/core/modules/comment/comment.api.phpundefined
@@ -198,5 +202,36 @@ function hook_comment_delete(Drupal\comment\Comment $comment) {
+ * @todo replace this with entity access controls once generic access controller
+ *   lands.
+ *
+ * @see http://drupal.org/node/1696660

This has happened see #1696660: Add an entity access API for single entity access

+++ b/core/modules/comment/comment.info.ymlundefined
@@ -6,6 +6,5 @@ version: VERSION
-  - node

yay!

+++ b/core/modules/comment/comment.installundefined
@@ -36,50 +38,52 @@ function comment_uninstall() {
+  state()->set('comment.maintain_entity_statistics', TRUE);

+++ b/core/modules/comment/comment.moduleundefined
@@ -974,233 +1017,156 @@ function comment_view_multiple($comments, $view_mode = 'full', $langcode = NULL)
+  if ($fields && state()->get('comment.maintain_entity_statistics', TRUE)) {

+++ b/core/modules/comment/lib/Drupal/comment/CommentStorageController.phpundefined
@@ -181,45 +172,56 @@ protected function postDelete($comments) {
+    if (!state()->get('comment.maintain_entity_statistics', TRUE)) {

get only accepts a key...
should be something like
$maintain_entity_statistics = state()->get('comment.maintain_entity_statistics') ?: TRUE;

+++ b/core/modules/comment/comment.installundefined
@@ -390,7 +451,321 @@ function comment_update_8003(&$sandbox) {
+    $existing_instance = (bool) db_query_range('SELECT 1 FROM {field_config_instance} WHERE field_name = :field_name AND bundle = :bundle AND entity_type = :entity_type', 0, 1, array(

Shouldn't we be using the config system here...

+++ b/core/modules/comment/comment.installundefined
@@ -390,7 +451,321 @@ function comment_update_8003(&$sandbox) {
+    module_load_install('entity');

deprecated in favour of the module handler if the entity module has been enabled at this point

+++ b/core/modules/comment/comment.moduleundefined
@@ -4,18 +4,23 @@
+require_once DRUPAL_ROOT . '/core/modules/comment/comment.field.inc';

Should be require __DIR__ . '/comment.field.inc'; ... I don't think we need require_once we already ensure we load the comment.module only once...

+++ b/core/modules/comment/comment.moduleundefined
@@ -62,19 +67,39 @@
-const COMMENT_NODE_OPEN = 2;

This is still referenced in node.api.php

+++ b/core/modules/comment/comment.moduleundefined
@@ -98,38 +123,154 @@ function comment_help($path, $arg) {
+  if ($entity->entityType() != 'node') {
+    // Only content needs comment links.
+    return;
+  }

Why? This comment could do with some more meat... I would have thought other entity type might want to benefit from the functionality...

+++ b/core/modules/comment/comment.moduleundefined
@@ -98,38 +123,154 @@ function comment_help($path, $arg) {
+  $fields = field_info_instances($entity->entityType(), $entity->bundle());
+  foreach ($fields as $field_name => $instance) {
+    $links = array();
+    $field = field_info_field($field_name);
+    if ($field['type'] != 'comment') {
+      continue;
+    }

Is there really not more optimal way of doing this... 10 node teasers on the frontpage... each has 10 fields 2 of which is a comment field... aren't we looping 90 times unnecessarily here?

+++ b/core/modules/comment/comment.moduleundefined
@@ -256,93 +403,107 @@ function comment_menu() {
+  // Legacy redirect handler for links of form comment/reply/%nid
+  if (module_exists('node')) {
+    $items['comment/reply/%node'] = array(
+      'title' => 'Add new comment',
+      'page callback' => 'comment_node_redirect',
+      'page arguments' => array(2),
+      'access callback' => 'node_access',
+      'access arguments' => array('view', 2),
+      'file' => 'comment.pages.inc',
+    );
+  }

+++ b/core/modules/comment/comment.pages.incundefined
@@ -120,5 +141,33 @@ function comment_approve(Comment $comment) {
+/**
+ * Page callback: Legacy handler to redirect old comment reply urls to new url.
+ *
+ * @param \Drupal\node\Plugin\Core\Entity\Node $node
+ *   The node to which the comments are attached.
+ * @param int $pid
+ *   (optional) Some comments are replies to other comments. In those cases,
+ *   $pid is the parent comment's comment ID. Defaults to NULL.
+ *
+ * @throw \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
+ *   When there are no comment fields attached to the node.
+ */
+function comment_node_redirect(Node $node, $pid = NULL) {
+  $fields = comment_get_comment_fields('node');
+  foreach ($fields as $field_name => $detail) {
+    // Pick the first comment field found on the node.
+    if (in_array($node->bundle(), $detail['bundles']['node'], TRUE)) {
+      drupal_goto('comment/reply/node/' . $node->id() . '/' . $field_name);
+    }
+  }
+  throw new NotFoundHttpException();

Should be a route... and return a redirect response

+++ b/core/modules/comment/comment.moduleundefined
@@ -256,93 +403,107 @@ function comment_menu() {
+function comment_reply_access(EntityInterface $entity) {
+  $function = $entity->entityType() . '_access';
+  // @todo replace this with entity access controls once generic access
+  // controller lands.
+  // @see http://drupal.org/node/1696660
+
  if (function_exists($function)) {
+    switch ($function) {
+      case 'user_access':
+        return $entity->access('view');

-/**
- * Implements hook_node_type_update().
- */
-function comment_node_type_update($info) {
-  if (!empty($info->old_type) && $info->type != $info->old_type) {
-    entity_invoke_bundle_hook('rename', 'comment', 'comment_node_' . $info->old_type, 'comment_node_' . $info->type);
+      case 'taxonomy_term_access':
+        return user_access('access content');
+
+      default:
+        return $function('view', $entity);
+    }
   }

Generic controller has landed and the needs more comments if it stays in like this..

+++ b/core/modules/comment/comment.moduleundefined
@@ -256,93 +403,107 @@ function comment_menu() {
+  return !in_array(COMMENT_ACCESS_DENY, $access, TRUE);

Do we really need the strict type checking here?

... note to self... I've got to comment_new_page_count()

#178

Fixed part of 177, also changed type-hitting to CommentInterface

AttachmentSizeStatusTest resultOperations
interdiff.txt11.91 KBIgnored: Check issue status.NoneNone
sandbox-merge-178.patch385.41 KBIdleFAILED: [[SimpleTest]]: [MySQL] 56,005 pass(es), 10 fail(s), and 2 exception(s).View details | Re-test

#179

Status:needs review» needs work

The last submitted patch, sandbox-merge-178.patch, failed testing.

nobody click here