Hi,

using latest devx, you can add comments, and they are shown. Then if you refresh the page, the comments are gone. As if they are not queried. It does say "3 comments", but they are not shown anymore. I check the html source, and it's not there.

CommentFileSizeAuthor
#14 heartbeatcomment.png23.76 KBgoekhanc
#11 comment_waiting_approval.png106.98 KBStalski
#6 heartbeat-comment-step-1.png15.17 KBAnonymous (not verified)
#6 heartbeat-comment-step-2.png23.39 KBAnonymous (not verified)
#6 heartbeat-comment-step-3.png14.68 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Stalski’s picture

Status: Active » Postponed (maintainer needs more info)

I don't have this problem. Can you explain the setup of the comments? Especially following information:
- Which heartbeat template are you using?
- What is the setting for the comments in that template?
- If you enabled "node comments if in node context", are the node comments enabled as well and which type on the content type?
- is the comment cache enabled in the global heartbeat configuration?

Anonymous’s picture

- using the default templates, like heartbeat_add_comment, with all default settings
- default settings
- no comment cache

Also, when I want to edit the activitycomment plugin, and click "save", I get:

Class activitycomments not found.

You can't save the comment plugin - I cannot enable comment cache, even if I wanted to.

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Active

Let me explain the steps again (all default out-of-the-box settings)

1. click 'Comment'
2. Type "Hello", click "submit"
3. Comment is shown - OK
4. refresh the page (F5)
5. Comment link shows '1 comment' - OK
6. But where is now the comment?? The comment is not shown.

Anonymous’s picture

AHA, the problem is your heartbeat_comments do not show.

> Enable node comments for this activity template if a node is available
If you enable that, it works. But of course this is bad, because it adds node comments, which I do not want to happen.

If you disable this node comments option, my problem happens: heartbeat_comments are not shown in the stream. The heartbeat comments are stored correctly in the database heartbeat_comments, but they are not shown to the user.

Stalski’s picture

Status: Active » Postponed (maintainer needs more info)

So you comment is not logged in the database as separate heartbeat log, I persume?
So this is completely about the query to heartbeat_comments that is not correct. The comments are not shown by design, since they are hidden by css. Clicking on the "1 comment" or "5 comments" link, would trigger the comment box to open (the comment box AND the list). So you are able to see the comment box since you commented (without nodes, thus in the stream).

That works here. I will try it out some more. Maybe take latest dev, I am working heavily for the moment on heartbeat, so things are changing (for the better).

I wont set this on "cant reproduce" yet, but I 'll need some more info. I see no reason why this should not work. Can you debug in the activitycomments object?

Anonymous’s picture

FileSize
14.68 KB
23.39 KB
15.17 KB

Hi, I am using the latest dev. The heartbeat comments are correctly stored into heartbeat_comments. But they not shown back on the page. See my screenshots attached.

- step-1.png - enter comment - OK
- step-2.png - submitted comment: is shown - OK
(now I refresh the page F5)
step-3.png: comment is not shown anymore, despite collapsed comment box - not OK

My heartbeat comments table has an entry like:

hcid: 1 (started with a clean table)
uid: 1
uaid: 128
message: Test comment
cleared: 0
time: 1309040322

I'll have a better look monday-wednesday, as I need this to work anyway. I'll provide a patch. Thanks for your efforts.

Valc’s picture

I have the same problem when using Views to display heartbeats. After commenting (activitycomment, not node comment) the comment is shown until the next page refresh. Then the only the number of comments and the comment box is displayed, but not the comments themselves. Also the commentbox is always visible on views, not only if you click the comment button. So I guess this is a problem with the views integration.

The comments are still shown on the build in display pages, no problems there!

Stalski’s picture

Status: Postponed (maintainer needs more info) » Needs work

I have the same as in #6 however without any inconsistenties.

My setup: install a new drupal with heartbeat (token, rules, display suite, entity, ctools)
Create an article.
Upload my admin avatar.
Visit siteactivity and see two messages. My profile being updated and the node being created.
comment on the profile update message (normal heartbeat comment): works and still shows after refresh.

What is described in #7 could be a views integration bug but imo not the same as the bug reported here. I'll investigate this one as well.

- Edit - So I still need some guidance on how to reproduce this. There must be something totally different in configuration.

Stalski’s picture

I was able to reproduce this as a normal user and played a bit with permissions. Appearantly in the database, the comment I don't see after page refresh, are the ones that are unpublished (or unapproved).
So basically, there is no error, only the end user does not know what just happened. The comment IS logged, only it's not available for everyone.
Two options:
- You do show the comment (special query) and tag this as (you can see this since you commented it, however still under consideration)
- We don't show the comment in both cases, replacing the after comment behavior into "your comment was logged and is waiting moderation..."

Thoughts.

The views problem still to come.

Stalski’s picture

Title: Comments not shown after page refresh » Comments not shown after page refresh when the node comment is unpublished
Assigned: Unassigned » Stalski
Category: bug » feature
Stalski’s picture

FileSize
106.98 KB

Hey again,

The views problem appears to be the same, leaving me to improve the UX on the not being able to see your own comment.

I added another theme function for the no-comment problem. This way we can alter what we are seeing and even how it's dealt with. You might override this theme function and redelegate to the original so you have the same as before.
However now, you will see something like in screenshot. This is my first and best (for now) solution and thus by design.

All propositions are welcome, but for now, I consider this fixed.
Thx for the report.

Stalski’s picture

Status: Needs work » Fixed
goekhanc’s picture

I still have problem with this.

I use the standard blocks from the heartbeat module. but the comments are not visible, even though they are listed in the list PUBLISHED HEARTBEAT COMMENTS.

After page reload I can only see the number of comments. Where can I publish/ approve unpublished comments?

goekhanc’s picture

FileSize
23.76 KB

When I am adding a node comment, it is shown as expected. but when I add a heartbeat comment, I can only see the author name and the time information but not the comment message. (see screenshot)

so I dont think, that this problem is realy fixed or am I doing something wrong?

goekhanc’s picture

Status: Fixed » Active
Stalski’s picture

I use the standard blocks from the heartbeat module. but the comments are not visible, even though they are listed in the list PUBLISHED HEARTBEAT COMMENTS.
After page reload I can only see the number of comments. Where can I publish/ approve unpublished comments?

Then it seems like you don't have a problem, no? You should see a link "no comments" or "1 comment" where you can click on (like facebook). This should open up the comment box.

Doesn't that work for you?

I can only see the author name and the time information but not the comment message.

Are you sure you using latest dev of heartbeat?

Also this is a total different issue, since the fact that it's about heartbeat comments only, where this ticket is about node context comments only.
I can't really reproduce this, it's all working here. Can you tell us more about your problem and how I could reproduce this from a clean install?

goekhanc’s picture

Then it seems like you don't have a problem, no? You should see a link "no comments" or "1 comment" where you can click on (like facebook). This should open up the comment box.

Doesn't that work for you?

no, unfortunately not. as you can see on the image of my last post, the comment block is opened. but the content of the first and the last comments are not shown. these comments were created using the heartbeat comment form. the other two comments, which are shown properly, were created with the standard drupal comment form.

Stalski’s picture

You are using dev? I can see comments that come from heartbeat_comments. I'll try it later on today.

goekhanc’s picture

Yes, I am using the dev version.

I did a clean install and everything worked as it should.

But on the other drupal instance with few other modules the problem still exists. i dont know if there is any configuration or module that is interfering.

goekhanc’s picture

a little progress:

I commented a Node Creation activity with checked "Enable node comments for this activity template if a node is available". After page refresh I could only see the author name and the time information, but not the content. I checked the database and changed the comment_body_format entry from filtered_html to html and viola the content became visible.

on my web site I removed the fitlered_html input format.

However, when I add a pure heartbeat_comment, that means with unchecked "Enable node comments for this activity template if a node is available" the comment is not shown, even the author name and the time are not shown. only the number of existing comments.

Stalski’s picture

That last remark, that's on the other install? not on the clean install?
I am basically looking for a way to reproduce this behavior to be able to help you.

- Edit - I was able to reproduce it when enabling locale and languages again.

Solution will be to drop translations all together. The way drupal6 worked, that was needed. With the new approach, I'll have to completely get rid of heartbeat_translations.

Stalski’s picture

Status: Active » Fixed

So, currently it's fixed with latest commit.

The refactoring is started as of now, but this is not the issue here.

Status: Fixed » Closed (fixed)

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

mobendary96@gmail.com’s picture

Issue summary: View changes

I'm interested
Heartbeat irregularities (also called cardiac arrhythmias) arrhythmia is deviations from the normal heart rhythm, steady beating of the heart such you feel an irregular heartbeat at night.
https://treasure4us.com/heartbeat-irregularities/