Problem/Motivation
Blocks #1986606: Convert the comments administration screen to a view.
When a comment is accessed from a view, there is no obvious way to display the author's name, URL and email that works consistently for anonymous and registered users. To add to the confusion, fields within the database that appear to contain meaningful data (name and mail) are actually undefined if the uid points to a non-anonymous user. When uid points to a real user, this information should come from the user entity.
For historical reference, the issue was originally reported as:
When a comment is edited, the user name is blanked out in the database for the comment entity. This does not seem to affect the display of comments on the entity display itself nor on the comment edit form. However, it causes Views to be unable to display the author name. @andypost provided this screenshot of the database after editing some comments.
Steps to reproduce
- Install Standard.
- Create a comment view using fields, and add the comment author field.
- Create an article node.
- Add a comment on the article.
- Visit the view and confirm that the username is displayed.
- Edit the comment and change something, e.g. the comment body.
- Visit the view. The username disappears.
- Perform a full cache clear. The bug still persists.
Proposed resolution
- Force the undefined fields to NULL so that people can easily spot misuse of them through tests.
- Make sure that the relevant plugins are available and working so that people can extract the Author Name, homepage (and email?) in a consistent way. This is possibly the highest priority bit since it blocks #1986606: Convert the comments administration screen to a view. Because of that we might want to split out the labelling as a sub-issue. The other pieces are needed for testing.
- Test coverage for all of the above.
Remaining tasks
Identify plugins needed, as they appear in Views (the highest priority being whatever blocks #1986606: Convert the comments administration screen to a view.Force the undefined database values to NULL, along with adequate test coverage (this is in progress).Write the missing plugins.- Add tests.
User interface changes
The Author Name now has slightly different rendering options, reflecting a change to the how the field is treated.
API changes
None expected.
Data model changes
Should we blank out existing data in the fields with undefined meaning?