Calendar is not defined, Dojo is not defined, tinymce failing

105 views
Skip to first unread message

Gabriel Piassetta

unread,
Jun 30, 2010, 2:30:28 PM6/30/10
to rum-discuss
Hello,

My rum is not working very well

I get some random errors

TinyMCE editor sometimes appear, sometimes no
Javascript console sometimes shows Calendar is not defined
sometimes shows Dojo is not defined

sometimes the edit button appears, somtimes no

And rum is incredibly slow

Javascript error
Calendar is not defined
Calendar.setup=function(params){funct...ition[1]);return
false;};return cal;};
calendar-setup.js (line 21)
Calendar is not defined
Calendar._DN = new Array
calendar-en.js (line 13)
Calendar is not defined
Calendar.setup({"ifFormat": "%Y-%m-%d"...alse, "inputField":
"rum18_created"})

Apache errors
[Wed Jun 30 15:03:20 2010] [error] /usr/local/lib/python2.6/dist-
packages/WebOb-0.9.8-py2.6.egg/webob/request.py:55:
DeprecationWarning: The class attribute charset is deprecated; use
default_charset instead
[Wed Jun 30 15:03:20 2010] [error] DeprecationWarning)
[Wed Jun 30 15:03:22 2010] [error] No handlers could be found for
logger "egg_translations"
[Wed Jun 30 15:03:40 2010] [error] Exception KeyError:
KeyError(-1218808064,) in <module 'threading' from '/usr/lib/python2.6/
threading.pyc'> ignored


I realy like RUM interface, but i cant use it in a production
environment

:(

Michael Brickenstein

unread,
Jul 1, 2010, 3:11:48 AM7/1/10
to rum-d...@googlegroups.com
Hi Gabriel!

Am 30.06.2010 um 20:30 schrieb Gabriel Piassetta:

> Hello,
>
> My rum is not working very well
>
> I get some random errors
>
> TinyMCE editor sometimes appear,

Does sometimes refer to the same installation, and different browsers?
Otherwise, TinyMCE is an optional package not required
and must be installed explicitly

easy tw.tinymce


> sometimes no
> Javascript console sometimes shows Calendar is not defined
> sometimes shows Dojo is not defined
>
> sometimes the edit button appears, somtimes no

Please make sure, that you have the latest version of RUM and
tw.rum installed. Using an outdated version of tw.rum might cause such effects.

>
> And rum is incredibly slow

Does it appear to be slow overall or at specific requests.

I do not know of any bottlenecks in the recent versions.
So either you might be using an outdated version or
you are experiencing some very specific bottleneck, I do not know of.
In this case I would like to have more information.

> Javascript error
> Calendar is not defined
> Calendar.setup=function(params){funct...ition[1]);return
> false;};return cal;};

We base our Calendar widget on one of tw.forms.
Can you see if all js-files are loaded in particular these:

from tw.rum import widgets
widgets.RumCalendarDatePicker.javascript
Out[6]:
[JSLink(None, children=[], **{'modname': 'tw.forms', 'filename': 'static/calendar/calendar.js'}),
JSLink(None, children=[], **{'modname': 'tw.forms', 'javascript': [JSLink(None, children=[], **{'modname': 'tw.forms', 'filename': 'static/calendar/calendar.js'})], 'filename': 'static/calendar/calendar-setup.js'})]

If there is something wrong with these js-files, then it might be appropriate to report it in
http://groups.google.com/group/toscawidgets-discuss


Since there are so many problems, I recommend
to use a new clean virtualenv

and begin with

easy_install rum tw.rum RumAlchemy tw.tinymce

Then check your versions against:
http://pypi.python.org/pypi/rum/
http://pypi.python.org/pypi/tw.rum/
http://pypi.python.org/pypi/RumAlchemy
http://pypi.python.org/pypi/tw.forms

Cheers,
Michael


> calendar-setup.js (line 21)
> Calendar is not defined
> Calendar._DN = new Array
> calendar-en.js (line 13)
> Calendar is not defined
> Calendar.setup({"ifFormat": "%Y-%m-%d"...alse, "inputField":
> "rum18_created"})
>
> Apache errors
> [Wed Jun 30 15:03:20 2010] [error] /usr/local/lib/python2.6/dist-
> packages/WebOb-0.9.8-py2.6.egg/webob/request.py:55:
> DeprecationWarning: The class attribute charset is deprecated; use
> default_charset instead
> [Wed Jun 30 15:03:20 2010] [error] DeprecationWarning)
> [Wed Jun 30 15:03:22 2010] [error] No handlers could be found for
> logger "egg_translations"
> [Wed Jun 30 15:03:40 2010] [error] Exception KeyError:
> KeyError(-1218808064,) in <module 'threading' from '/usr/lib/python2.6/
> threading.pyc'> ignored
>
>
> I realy like RUM interface, but i cant use it in a production
> environment
>
> :(
>

> --
> You received this message because you are subscribed to the Google Groups "rum-discuss" group.
> To post to this group, send email to rum-d...@googlegroups.com.
> To unsubscribe from this group, send email to rum-discuss...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rum-discuss?hl=en.

-------------------------------------------
Michael Brickenstein
Mathematisches Forschungsinstitut Oberwolfach gGmbH
Schwarzwaldstr. 9 - 11
77709 Oberwolfach
Tel.: 07834/979-31
Fax: 07834/979-38

Gabriel Piassetta

unread,
Jul 1, 2010, 10:31:02 AM7/1/10
to rum-d...@googlegroups.com
All the packages are the last version

When i say sometimes is Calendar does not appear, F5, now is appear, F5 again, dont, yes, no yes... its very strange

tw.tinymce is installed, but equal, sometimes appear sometimes dont.



With the server
python app.py --dburl mysql://path 
Everthing works very well and rum works very fast!

but in apache its very slow in any request.



2010/7/1 Michael Brickenstein <bricke...@mfo.de>

Michael Brickenstein

unread,
Jul 1, 2010, 12:06:28 PM7/1/10
to rum-d...@googlegroups.com
Hi Gabriel!

Thanks for your email. Finally I understand, that it is some sort of deployment problem.

Am 01.07.2010 um 16:31 schrieb Gabriel Piassetta:

> All the packages are the last version
>
> When i say sometimes is Calendar does not appear, F5, now is appear, F5 again, dont, yes, no yes... its very strange
>

F5, does reloading? Maybe you can use firebug, to investigate, what JS files are actually loaded.
Somehow, I suspect, it has to do with the mentioned performance problems.

> tw.tinymce is installed, but equal, sometimes appear sometimes dont.
>
>
>
> With the server
> python app.py --dburl mysql://path
> Everthing works very well and rum works very fast!
>
> but in apache its very slow in any request.
>

How, did you deploy RUM in apache?
Usually, I do some proxy set up (personally I use nginx).

I recommend very strongly to you making
sure, to serve all these js, css and img resources statically by apache directly
(there are good examples in the Pylons
documentation).

Could you try that out please? Personally I have underestimated for a long
time, how much speed can be eaten by those many small requests (in particular, as the
toscawidgets middleware prevents caching, at least by default).

Cheers,
Michael

Gabriel Piassetta

unread,
Jul 1, 2010, 1:35:28 PM7/1/10
to rum-d...@googlegroups.com
Hi Michael,

I installed nginx as a proxy and now everthing is ok.

The deploy was the problem.. Thank you for your help.

Gabriel Piassetta

unread,
Jul 2, 2010, 4:19:31 PM7/2/10
to rum-d...@googlegroups.com
Hi michael, rum is slow again, but now is nginx proxy, because with rum running direct is very fast.

can you me give your nginx.conf? maybe providing static files direct improve the speed.


thanks in advance

2010/7/1 Gabriel Piassetta <gabrielp...@gmail.com>

Gabriel Piassetta

unread,
Jul 2, 2010, 5:43:38 PM7/2/10
to rum-d...@googlegroups.com
Hi Michael,

i did it by myself

If anyone with the same problem, one day, read this, i will say how i did it

make a public/rum dir

look to all static files that rum needs

make simbolic folders

and in nginx config

        location ~* \.(js|css|rdf|xml|ico|txt|gif|jpg|png|jpeg)$ {
                root /var/www/public/rum;
                access_log  /var/log/nginx/d-a.direct.log ;
        }

and its done.


2010/7/2 Gabriel Piassetta <gabrielp...@gmail.com>

Michael Brickenstein

unread,
Jul 5, 2010, 3:23:09 AM7/5/10
to rum-discuss
Hi Gabriel!

Fine, that it works now.

Although, I could not answer before, I post some excerpts of my
nginx.conf.

Cheers,
Michael

upstream xxxx {
server 127.0.0.1:4579;
server 127.0.0.1:4580;
server 127.0.0.1:4582;
server 127.0.0.1:4583;
}


server {
listen 0.0.0.0:4581;
listen 0.0.0.0:80;
server_name xxxx;

#site runs on Pylons
location / {
proxy_pass http://xxxx;
proxy_redirect default;
}

location /toscawidgets/resources/tw.forms/static/{
alias /home/xxxx/tw.forms/tw/forms/static/;
}
location /js/ {
alias /home/xxxx/xxxx/xxxx/public/js/;
}
location /toscawidgets/resources/xxxx/public/js/ {
alias /home/xxxx/xxxx/xxxx/public/js/;
}
location /images/ {
alias /home/xxxx/xxxx/xxxx/public/images/;
}
location /css/ {
alias /home/xxxx/xxxx/xxxx/public/css/;
}

location /toscawidgets/resources/rum.widgets/static/ {
alias /home/xxxx/rum/rum/widgets/static/;
}

location /toscawidgets/resources/tw.rum/static/ {
alias /home/xxxx/tw.rum/tw/rum/static/;
}
location /toscawidgets/resources/tw.dojo/static/ {
alias /home/xxxx/tw.dojo/tw/dojo/static/;
}

location /toscawidgets/resources/tw.dojo.core/static/ {
alias /home/xxxx/tw.dojo/tw/dojo/static/;
}

location /toscawidgets/resources/tw.tinymce.widgets/static/ {
alias /home/xxxx/tw.tinymce/tw/tinymce/static/;
}

}


On Jul 2, 11:43 pm, Gabriel Piassetta <gabrielpiasse...@gmail.com>
wrote:
> Hi Michael,
>
> i did it by myself
>
> If anyone with the same problem, one day, read this, i will say how i did it
>
> make a public/rum dir
>
> look to all static files that rum needs
>
> make simbolic folders
>
> and in nginx config
>
>         location ~* \.(js|css|rdf|xml|ico|txt|gif|jpg|png|jpeg)$ {
>                 root /var/www/public/rum;
>                 access_log  /var/log/nginx/d-a.direct.log ;
>         }
>
> and its done.
>
> 2010/7/2 Gabriel Piassetta <gabrielpiasse...@gmail.com>
>
> > Hi michael, rum is slow again, but now is nginx proxy, because with rum
> > running direct is very fast.
>
> > can you me give your nginx.conf? maybe providing static files direct
> > improve the speed.
>
> > thanks in advance
>
> > 2010/7/1 Gabriel Piassetta <gabrielpiasse...@gmail.com>
>
> > Hi Michael,
>
> >> I installed nginx as a proxy and now everthing is ok.
>
> >> The deploy was the problem.. Thank you for your help.
>
> >> 2010/7/1 Michael Brickenstein <brickenst...@mfo.de>
> >>> > 2010/7/1 Michael Brickenstein <brickenst...@mfo.de>
> >>> rum-discuss...@googlegroups.com<rum-discuss%2Bunsu...@googlegroups.com>
> >>> .
> >>> > > For more options, visit this group at
> >>>http://groups.google.com/group/rum-discuss?hl=en.
>
> >>> > -------------------------------------------
> >>> > Michael Brickenstein
> >>> > Mathematisches Forschungsinstitut Oberwolfach gGmbH
> >>> > Schwarzwaldstr. 9 - 11
> >>> > 77709 Oberwolfach
> >>> > Tel.: 07834/979-31
> >>> > Fax: 07834/979-38
>
> >>> > --
> >>> > You received this message because you are subscribed to the Google
> >>> Groups "rum-discuss" group.
> >>> > To post to this group, send email to rum-d...@googlegroups.com.
> >>> > To unsubscribe from this group, send email to
> >>> rum-discuss...@googlegroups.com<rum-discuss%2Bunsu...@googlegroups.com>
> >>> .
> >>> > For more options, visit this group at
> >>>http://groups.google.com/group/rum-discuss?hl=en.
>
> >>> > --
> >>> > You received this message because you are subscribed to the Google
> >>> Groups "rum-discuss" group.
> >>> > To post to this group, send email to rum-d...@googlegroups.com.
> >>> > To unsubscribe from this group, send email to
> >>> rum-discuss...@googlegroups.com<rum-discuss%2Bunsu...@googlegroups.com>
> >>> .
> >>> > For more options, visit this group at
> >>>http://groups.google.com/group/rum-discuss?hl=en.
>
> >>> -------------------------------------------
> >>> Michael Brickenstein
> >>> Mathematisches Forschungsinstitut Oberwolfach gGmbH
> >>> Schwarzwaldstr. 9 - 11
> >>> 77709 Oberwolfach
> >>> Tel.: 07834/979-31
> >>> Fax: 07834/979-38
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "rum-discuss" group.
> >>> To post to this group, send email to rum-d...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> rum-discuss...@googlegroups.com<rum-discuss%2Bunsu...@googlegroups.com>
> >>> .
Reply all
Reply to author
Forward
0 new messages