Description of the bug
We needed separate created
and updated
notifications for comments on a new Backdrop project. Unfortunately, the current state is that it always gives the "Your comment has been posted." message regardless if a comment was just created or updated. Nodes, on the other hand, have a separate message for update operation: "Post Your first post! has been updated.". So I believe this needs to be brought into consistency.
Additional information
This can be easily addressed by changing the following code in comment.module
:
if ($comment->status == COMMENT_NOT_PUBLISHED) {
if (!user_access('administer comments')) {
backdrop_set_message(t('Your comment has been queued for review by site administrators and will be published after approval.'));
}
}
else {
backdrop_set_message(t('Your comment has been posted.'));
}
to
if ($comment->status == COMMENT_NOT_PUBLISHED) {
if (!user_access('administer comments')) {
backdrop_set_message(t('Your comment has been queued for review by site administrators and will be published after approval.'));
}
}
elseif (isset($comment->new)) {
backdrop_set_message(t('Your comment has been updated.'));
}
else {
backdrop_set_message(t('Your comment has been posted.'));
}
and I'll be filing a PR soon. However, what I find it strange is that the $comment->new
is set and equals to FALSE only on updates whereas on new comment creation it's not there at all. So I am not sure if this is a separate bug, because semantically it makes more sense to use an if condition something like this:
if ($comment->new == TRUE) {
print created message here
}
else {
print updated message here
}
Let me know if we should chase why the $comment->new
is not there for new comments or if the suggested PR is good enough.
Recent comments
Thanks. I think, for me, the user-interface issue is that one uses (can only use) the "big" configure to add a first condition. And that made me think that I should use that same method to add...
Blocks (custom) not displaying in Harris sidebars with visibility condition set to more than one url path (node)
Just wanted to add-- anyone trying to set these permissions while running from Synology web station (DSM 7x) like I am, the apache user is apparently "http". So use: chown -R http....
can't install modules: "Error installing Devel. Permissions are not set up properly."
Correct, if you add multiple condition statements they are treated as AND so it would appear to the system as: node/103 AND node/91 which will never happen. Glad you found the way to...
Blocks (custom) not displaying in Harris sidebars with visibility condition set to more than one url path (node)