Do you have plans for a D6 version of this? If not, I'd like to have a placeholder for that - I could use this, but I'm not going to be touching D7 for quite a while.

CommentFileSizeAuthor
#29 permissions-1082840-29.patch567 byteshey_germano

Comments

Anonymous’s picture

yes, backport is definitely on the cards.

the module is very simple, so it shouldn't be too much work. i'll see if i can get it done at one of the coder lounges while i'm at drupalcon.

Anonymous’s picture

patches welcome!

rjbrown99’s picture

Very cool. I may have a good use for this but I won't be able to get to testing it for a few weeks. I'll pop back in, node.js seems like it could be very useful for my site.

afeijo’s picture

As soon I complete my analysis and manage to make nodejs working, I can help with the backport :)

I finally completed the instalations to nodejs, socket.io and express! yay

julien’s picture

yes, backport is definitely on the cards.

the module is very simple, so it shouldn't be too much work. i'll see if i can get it done at one of the coder lounges while i'm at drupalcon.

I was looking at the code and it's reallly based on drupal 7 api. i can't really see what the amount of work to do for a drupal 6 downgrade, apart to add and adapt the drupal 7 functions you are using, especially to add js for drupal 6. But maybe i did miss something ?

adding this, i don't think it really work well on drupal fresh install of drupal 6 with jquery 1.2.6 buy maybe i'm wrong.

julien’s picture

Hi,

Did a bit of work for the backport. Just did some very small modifications to make it installed. The node server.js is working and waiting for connections. but it seems like there is something wrong with the triggers.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home/esma/sites/all/modules/nodejs/nodejs_actions/nodejs_actions.module on line 16.

http://www.multiupload.com/UWCQ9HV9SJ

the module was too huge to upload there sry.

Tom Tom-1’s picture

I'm wondering if the back port to drupal 6 is available yet?

Anonymous’s picture

nope, nothing has been done for D6 yet.

should be pretty easy, but its not on my priority list. patches welcome.

julien’s picture

Not that easy, because of the standard jquery version of D6 and the drupal.js who has been improved in D7.
Still working on it, when i have a bit of free time. Help is welcome -> http://drupal.org/sandbox/julien/1120596

rjbrown99’s picture

You could add a dependency on jquery_update to at least get to 1.3.x. That might make it slightly better.

Anonymous’s picture

@julien - thanks for the great work so far. would you like a commit bit to the nodejs.module repository? if you're ok to just commit to a D6 branch, i'm happy to give you write access.

julien’s picture

Hi Justin,

Yes i'm happy to work like this too.

Anonymous’s picture

julien - great, i've given you commit access.

Anonymous’s picture

Status: Active » Fixed

awesome, the branch is up.

i'm going to close this issue, lets create specific issues from now on.

julien’s picture

allrighty, i'm stuck on those new drupal settings javascript drupal 7 configuration. Do you know a way to pass the settings with drupal_add_js using the drupal 6 api?

jthomasbailey’s picture

supposedly it's: drupal_add_js(array('my_module' => array('my_setting' => 'this_value')), 'setting');

However it is working, somehow. Even though the nodejs4d6.js isn't included (can't figure out how to do that either, not without breaking all the javascript) when I send a Private Message it pops up immediately in another window.

julien’s picture

Yes Hobobller,

You were right i did a for each with the line you mentioned to add the right settings. Try a git checkout of the branch 6.x-1.0 to test again (help welcome) of the nodejs integration module. I did this backport there.

Can you tell me which jquery version do you use and if you have the standard drupal.js of Drupal 6 ? That will help.

jthomasbailey’s picture

Woo hoo! I'm using jquery update which updates to 1.3.2 but I'm also using Pressflow. I don't know if that makes a difference.

When you're testing it I found that it's best to have just two windows open because messages don't load in more than one, and it's random which one it chooses. I'm logged in as two different users using two different browsers and sending PMs back and forth with no problem, although the messages disappear when the page is reloaded.

julien’s picture

excellent, the code still need work to have more realtime notifications on more triggers. I'm using the same jquery version, but not pressflow yet as i'm trying to work on a standard drupal 6 install with just jquery updated for now.
I hope i will get a stable version soon as i want to use it on a extranet project and use it on open atrium sites, but it's too alpha yet.

jthomasbailey’s picture

two problems with the new module:
editing /admin/config/nodejs/js causes a fatal error: Fatal error: Cannot use string offset as an array in /var/www/includes/form.inc on line 992.

and this: drupal_add_js(drupal_get_path('module', 'nodejs') . '/nodejs.js', 'file', 'footer'); is causing errors in drupal.js and everywhere else. The D7 version includes it using 'type' => 'file' but that's not available in D6, I think. Hmm.

julien’s picture

Thanks hobgobbler,

Did changed the file parameter of the drupal_add_js to module and commited it.
The only error i have in firebug is this:

Drupal.ajax is not a constructor
[Break On This Error] Drupal.nodejs_ajax = new Drupal.ajax('nodejs_ajax', element, element_settings);

I'm not too sure if it's coming from drupal.js or from the settings. Still investigating.

jthomasbailey’s picture

I'm using the May 19th version now and still getting those errors. I wonder if it's Pressflow.

julien’s picture

Commited a fix for "editing /admin/config/nodejs/js causes a fatal error: Fatal error: Cannot use string offset as an array in /var/www/includes/form.inc on line 992. "

Anonymous’s picture

Awesome work! Big review coming this weekend.

julien’s picture

I'm gonna also continue to work on it this weekend, also to factorise a bit more the triggers and actions callbacks.

Anonymous’s picture

first commits for me on this branch, simple notice fix and some whitespace cleanups.

please don't use tabs, and stick to tab width of 2 spaces.

http://drupalcode.org/project/nodejs.git/commit/0a60579

Equinger’s picture

I'm trying to test this on Drupal 6, but I keep running into the following error: "TypeError: Object # has no method 'get'" when running "sudo node server.js" using that file on the Drupal install. I followed the README, but I'm assuming I have something misconfigured in nodejs.config.js?

julien’s picture

Hi.

looks like something went wrong during your install of node or as you suggest. it is due to a misconfiguration in your config file.
However. this drupal 6 version is just for testing purpose in my opinion. I made a mistake while creating the drupal 6 branch . which should have been a dev one.
There is still work to do on the javascript from drupal and develop or adapt the triggers actions.
I will not be able to work on it before the 15 of june as i am relocating and having a little holiday break until then.
Dont hesitate to post patches or commit to help getting it stable.

hey_germano’s picture

StatusFileSize
new567 bytes

Here's a patch to get the permissions setting working in D6.

julien’s picture

patch applied and commited. thanks :)

Status: Fixed » Closed (fixed)

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

judahtanthony’s picture

I am interested in using this on Pressflow (Drupal 6) with jQuery update.

Is there an update on the progress? Is there a todo list I can join in on?

julien’s picture

You can make a git checkout of the 6.x-1.0-dev version and commit to it, see if you bring your two cents. Feel free to drop me an email by the drupal contact form if you need a todo list.

danielm’s picture

Subscribing

julien’s picture

Right now the D6 dev version is working but only with the triggers when a comment is added, deleted or updated. working on adding more triggers and actions today.

carvalhar’s picture

subscribing

Equinger’s picture

From what I can tell, I eventually got this module working with the latest fixes. I just want to note that either this module or the use of node.js, in general, on my Drupal 6 install, adds significant load to my webserver causing the site to grind to a halt. The load average was increased from .2 to at least 2 (on quad core machine 2.67GHz, 7.5GB RAM) while it was running with only 1 user ... and it appeared only to continue increasing. The cpu utilization was at about 50%. This utilization did not stop until I deactivated the module.

I should not that, in my case, the node.js server lives on the same machine as my Drupal install, which I understand could be a huge problem, but I was not aware of this possibility. Another thought: maybe the selection of backend port could be causing some strange issue w/ redirects or something causing apache to go nuts??

Has anyone else noticed these issues? I would love to benefit from node.js, but can't do it w/ this current configuration and would be curious to get feedback on what to attribute this problem.

julien’s picture

I can't reproduce this one. I'm using node v0.4.12 and php 5.3.6 on a ubuntu dist.
Can you post your php version, node version? also which process are taking most of the CPU, node or apache?