Closed (fixed)
Project:
Rate
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2020 at 13:41 UTC
Updated:
4 Jul 2020 at 00:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
krzysztof domańskiComment #3
jordik commentedIt actually should require the comment module in tests, since we allow rating of comments in this version (as in D7 rate).
In rate.module we call the comment.manager service, so we have to check in both cases, whether the comment module is enabled.
Or make it a requirement for rate, as alternative.
Comment #4
hkirsman commentedI found the service being used in 2 places. Also fixed some coding standards issues and removed the big if's (better readability).
I'm wondering if we should hide the comments options from admin if the module is disabled?
Comment #5
hkirsman commentedComment #6
hkirsman commentedComment #7
jordik commentedThank you for this patch!
I would not hide the checkbox column, disabling it would be probably a better option.
In this way, if any entities were configured for comments, they will be visible (but not used).
And we should check if the comment module is enabled also when enabling the modules for tests in /tests/src/Functional/RateWidgetTestBase.php
Comment #8
jordik commentedUpdated the patch to disable the Comments column in the widget list and edit form.
In case the comment module is not installed, the column header in both forms will appear as "Comments (disabled)" and the checkboxes in the column will be disabled.
Fixed some coding standard issues.
Comment #9
jordik commentedComment #11
jordik commented