Closed (works as designed)
Project:
Node Comments
Version:
6.x-2.0-beta7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jun 2011 at 00:09 UTC
Updated:
4 Jul 2011 at 20:33 UTC
I'm using nodecomment and flag module. I can flag a nodecomment and the data is stored in the database, but when I refresh the page the nodecomment is marked as not flagged. The data is still sitting in the database just fine. This is using the "bookmark" flag delivered with flag module, so nothing to do with any new flag I'm creating. As the data is stored correctly I'm guessing the problem is with nodecomment, rather than flag.
I will dig further when I get the chance, but any ideas?
Comments
Comment #1
crea commentedDid you read project page ? It looks like you didn't.
Comment #2
dunx commentedI had read it a while ago and I've just re-read it. I can't see anything obvious to explain why flags aren't displayed on nodecomments. Is it the caching feature? Views configuration?
It might well work as designed, but doesn't work as I expect. If there is a reason or solution, then I still think it's worth clarifying it out here for future reference. I never managed to find any related issues or solutions through searching d.o or more widely via Google.
Comment #3
crea commentedIt's because of caching. Before, I hoped that project text was clear enough. I've made it even more clear now.
Comment #4
dunx commentedI haven't really got in to Views yet, so if anybody is in the same position:
/admin/build/views/edit/nodecomments, click the "node comment cache" under Basic Settings and then change to "None". Remember to click Save!
That certainly sorted out my issue, although I now have concerns over performance of course. Is there any way to poke/clear the cache I can add to my flag actions or custom site module to force cache clearance when I click on one of these flags? I tried the /admin/build/views/tools [Clear Views' Cache] button, but that didn't make any difference when I refreshed my page. I don't really understand the caching mechanism Views uses.
Comment #5
dunx commentedMy final solution was to turn the Views caching back on and insert the following code in my site's custom module to just delete nodecomment cache entries for the view when a user clicks on my flags.
I think that's better than never caching anything for nodecomments. Hopefully of use to somebody.