jruizgit / rules

Durable Rules Engine
MIT License
1.13k stars 209 forks source link

Uncaught TypeError: undefined is not a function in dutableVisual.js #3

Closed aflores closed 9 years ago

aflores commented 9 years ago

Hello Jesus

I am trying to use Durable Rules on a Mac by using the Setup and Tutorial instructions but when I open the browser on http://localhost:5000/approve/1/admin.html I get a blank page and 'Uncaught TypeError: undefined is not a function' on Chromes console.

The above error message makes reference to durableVial.js:1616 which contains: history.onNewRecord(addHistoryRecord);

Do you have any idea about what might be wrong?

I am using redis 2.8.16 and node 0.10.26

Thank you for you help and thank yoy for sharing such an interesting project

Armando

jruizgit commented 9 years ago

Hi Armando, thanks a lot for your interest in durable_rules. Let me look into this issue tomorrow morning. I have been heads down improving the engine and writing the language abstractions, so I haven't got to update the documentation.

Jesus Ruiz

Date: Sun, 9 Nov 2014 18:54:58 -0800 From: notifications@github.com To: rules@noreply.github.com Subject: [rules] Uncaught TypeError: undefined is not a function in dutableVisual.js (#3)

Hello Jesus

I am trying to use Durable Rules on a Mac by using the Setup and Tutorial instructions but when I open the browser on http://localhost:5000/approve/1/admin.html I get a blank page and 'Uncaught TypeError: undefined is not a function' on Chromes console.

The above error message makes reference to durableVial.js:1616 which contains:

history.onNewRecord(addHistoryRecord);

Do you have any idea about what might be wrong?

I am using redis 2.8.16 and node 0.10.26

Thank you for you help and thank yoy for sharing such an interesting project

Armando

— Reply to this email directly or view it on GitHub.

                  =
jruizgit commented 9 years ago

Hi Armando, thank you for reporting this issue. I have checked in and published a fix for the problem. Please give it a try (delete your test directory and redo the 'First App' section in the setup instructions). The code below broke in the latest chrome version (as it collides with the global history object). You can also fix this in place by going to node-modules/durable/libjs/admin.html and renaming the history variable so it doesn't collide (something like theHistory).

        var history = promiseHistory(url);
        promiseGraph(url, history).createVisual(query.size ,function(err) { 
            if (!query.disableScratchpad) {
                var pad = scratchPad(url, history)
                if (err) { 
                    pad.setStatus(err.error); 
                } 
            }
        });
aflores commented 9 years ago

Hello Jesus, thank you for looking into this. I noticed that you made some changes so I started testing in Safari (for now). I will continue to explore durable_rules. I will be glad to help you in any way I can but I need to become more familiar with durable_rules. I'll stay in touch, thanks again!

jruizgit commented 9 years ago

Cool, yes please stay in touch. let Let me know if you have any feedback. It is extremely useful.

I'm in AWS conference this week, I think there is a lot of potential. These are some of the large items in my TODO list (I'll be progressing on them one by one).

Sent from my phone

On Nov 11, 2014, at 12:22 PM, Armando Flores notifications@github.com wrote:

Hello Jesus, thank you for looking into this. I noticed that you made some changes so I started testing in Safari (for now). I will continue to explore durable_rules. I will be glad to help you in any way I can but I need to become more familiar with durable_rules. I'll stay in touch, thanks again!

— Reply to this email directly or view it on GitHub.