Hello,

Firstly, thanks for an awesome module... I've been trying to extend your module for an auction website that I am running since last night. Somehow the module goes into an infinite loop while running... I just wanted to run the code by you to make sure...

My auction website that has products on (node/%nid), requires that a particular node view gets updated automatically each time a bid is made

In terms of how I used your API,

1. I added the live_update_initialize to the hook_preprocess_node function
2. I opened an API from my module named hook_bid_alter for passing the node element
3. In this hook, I added the live_update_update_content function so that every time a bid is placed, the content gets updated automatically

I've attached the module as plain text below...
Step 1. i.e. the hook_preprocess works fine... I can see that the js is attached to the page. Also the directories for states.txt are created the moment I open a specific node (i.e., the hook_preprocess_node runs)

Step 2. This is where I am getting stuck. I firstly tried to load the entire node view using 'node_view' that sent the module into an infinite loop (i.e., my bids stopped getting accepted and the session timed out).

Then, I just replaced the text with simple HTML saying 'xyz...'. Interestingly, now the bid goes through. The directory structure for states.txt is also updated with the new content. BUT, my node view is not getting refreshed! Which is again stumping me!

Sorry for the long discourse... Please try to help me if you can with this... Thanks a lot in advance!
Ravdeep

CommentFileSizeAuthor
issue.txt2.75 KBravdeepchawla

Comments

jonskulski’s picture

Category: task » support

Sorry that I didn't get back sooner. What I see is that you are using two different keys:

live_update_initialize('node-'. $node->nid);

ex. node-234

live_update_update_content('node/'.$node->nid, $html, $settings);

ex. node/234

So that would explain why there is no updates coming through.

Hope this helps!

jonskulski’s picture

Status: Active » Closed (fixed)