Active
Project:
Views node.js
Version:
7.x-1.0
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Feb 2016 at 13:34 UTC
Updated:
20 May 2017 at 18:02 UTC
Jump to comment: Most recent
not sure yet if this is an actual bug but i have labelled it so because Rules is not updating ALL the views I have set up in Rules. When i execute a nodejs-views rule, rules only updates remote views and not the view on the machine which excuted the action which actioned the Rules event. is this by design? is it because the machine executing the rule is not sending a nodejs message to itself. in the meantime there are workarounds (views_flag_refresh module)
thanks
laurence
Comments
Comment #2
Syntapse commentedComment #3
no sssweat commentedwhat rules action are you using?
Comment #4
Syntapse commentedthe nodejs update view... added by the nodejs module. is the behaviour ive described correct or is there something wrong with my setup? ideally id like to drop views_flag_refresh if possible.
Comment #5
Syntapse commentedthere is only one nodejs update view rule i can see...
Comment #6
no sssweat commentedoops, my bad, I meant to say what react on are you using? (what triggers the rule?)
Comment #7
Syntapse commentedim reacting on a variety of events where i need the end result to be an update on the view. i.e. consider it could be anything that updates data in a relevant view. do you want a specific example?
Comment #8
no sssweat commentedyes, please.
Comment #9
Syntapse commentednode created, user unfriended... pretty much any reaction i set up with a nodejs views update shows on the "other" not where the rule is executed.
Comment #10
Syntapse commentedthe specific use case i would like to get working is as follows:
a node/view page manager override with a node edit and a node view (list of nodes) on the same page. when i add a node (using whatever means i need to to keep on the page) i update the view with the new node. at the moment only remote screens update using nodejs update view action. as a workaround im using views_flag_refresh to update the local machine (which id rather drop in favour of a single nodejs rules action).
however im not sure if its working to design or meant to update all views - remote and local...
Comment #11
Anonymous (not verified) commentednot sure what you mean by remote or local, but in case this helps, but see this code here:
http://cgit.drupalcode.org/nodejs/tree/nodejs.js#n20
in a nutshell, the node.js module checks for messages that originate on a given socket, and drops them on the return trip. if this is causing an issue, perhaps we could add something to the node.js module that allowed for this to be conditional, perhaps with a flag on the message?
Comment #12
Syntapse commentedmany thanks
to clarify:
local: the browser which fired the rules reaction.
remote: all other browsers looking at a view affected by a nodejs update view action.
at the moment (in my test cases) the local browser doesnt update its view. is it designed to? or is there a problem with my setup?
Comment #13
Anonymous (not verified) commented"at the moment (in my test cases) the local browser doesnt update its view": this may be because of the code i linked above.
can you put some debug code in nodejs.js like this:
if you see that log code fire in the local view, then the approach i suggested in #11 will work. if it doesn't, then we have to look at the path of the message from the browser through drupal and the node.js server to figure this out.
Comment #14
Chipie commented@laurencefass: I'm having the same problem. Did you find a solution yet?
Comment #15
Chipie commented@beejbus: I have put the code from #13 in node.js and the log code fires in the local view.
Do you know the message should be dropped when
message.clientSocketId == Drupal.Nodejs.socket.id?Comment #16
Chipie commentedIf I revert this commit, the local view is also being updated again.
Comment #17
drupal_newb commentedI'm having the same problem.
I have a Views comment block and below that I have the Comments form.
When submitting a new Comment, the Views comment block doesn't update on the same page, but if that page is viewed from different machines or the same machine, but different tabs, it updates fine.
#16 fixed it for me! Thanks so much.
Comment #18
delacosta456 commentedhi
i was having a similar issue with a view with Editable field on it to modify values and and on the right another view that was supposed to refresh when change occur in the editable view..
and #16 fixed it ...
but if it make sense ...that commit is it not for a reason .. ?
instead of reverting i was thinking of changing the code to
SORRY i am not and advanced programmer , it is just an idea that i suggest