When trying to disabling one of the fields of comments form, the throbber appears but no further action happens.
Can be tested on admin/structure/comments/manage/node__comment/form-display

A javascript error occurs reporting the following php error:

Fatal error: Call to a member function getBundles() on a non-object in core/modules/comment/lib/Drupal/comment/CommentManager.php on line 195
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wesleydv’s picture

Status: Active » Needs review
FileSize
891 bytes

This patch fixes the issue by not updating form['#title'] when the request is called via ajax.
Not sure if this is the correct way of fixing this :)

larowlan’s picture

Issue tags: +Needs tests

We will need to add a test here, thanks for the fix though.

larowlan’s picture

adds tests and a non path-based fix

The last submitted patch, 3: comment-form-disable-2131997.2.fail_.patch, failed testing.

chx’s picture

Status: Needs review » Needs work

There must be a better way to test whether we are in an AJAX request than messing with paths.

larowlan’s picture

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

now with 90% less yuck

chx’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
3.7 KB
810 bytes

This is nice. I have fixed such a minor issue in the test that you can't say I have RTBC'd my own: replaced assertFalse(empty with assertTrue

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Nice. I just hit this today in prepping for a demo, only to find an RTBC patch waiting. :D

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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