Rjs error when creating new post

已查看 17 次
跳至第一个未读帖子

Puttlick

未读,
2007年11月2日 16:50:302007/11/2
收件人 ActiveScaffold : Ruby on Rails plugin
Hi!

First of all, I love this Scaffold, thanks alot!

Unfortunately it does not work as mean, I get a error when I make a
post.
------------
RJS error:

TypeError: $$("#admin__user-create--form a.cancel").first().link has
no properties
------------

And after that
------------
new Insertion.Top("admin__user-tbody", "\n<tr class=\"record \" id=
\"admin__user-list-11-row\" class=\"record\">\n \n \n <td
class=\"name-column sorted\" >\n ssasd\n </td>
\n \n \n <td class=\"email-column \" >\n asdasd
\n </td>\n \n \n <td class=\"phonenumber-column \"
>\n adsasds\n </td>\n \n \n <td class=
\"about-column \" >\n adsads\n </td>\n <td
class=\"actions\">\n <table cellpadding=\"0\" cellspacing=\"0\">\n
<tr>\n <td class=\"indicator-container\">\n <img alt=\"loading
indicator\" class=\"loading-indicator\" id=\"admin__user-record-11-
loading-indicator\" src=\"/images/active_scaffold/default/
indicator.gif?1194035756\" style=\"visibility:hidden;\" />\n </td>
\n <td>\n <a href=\"/admin/user/edit/11?
_method=get\" class=\"edit action\" id=\"admin__user-edit-11-link\"
position=\"replace\">Edit</a> </td>\n <td>
\n <a href=\"/admin/user/destroy/11?_method=delete\" class=
\"destroy action\" id=\"admin__user-destroy-11-link\" onclick=\"return
confirm('Are you sure?');\">Delete</a> </td>\n <td>
\n <a href=\"/admin/user/show/11?_method=get\" class=\"show
action\" id=\"admin__user-show-11-link\" position=\"replace\">Show</
a> </td>\n </tr>\n</table>\n </td>\n </tr>\n\n<script type=
\"text/javascript\">\nactions = new ActiveScaffold.Actions.Record(\n $
$('#admin__user-list-11-row a.action'),\n $('admin__user-list-11-
row'),\n $('admin__user-record-11-loading-indicator'),\n
{refresh_url: '/admin/user/row/11?_method=get'}\n);\n</script>\n");
ActiveScaffold.stripe($('admin__user-tbody'))
ActiveScaffold.toggleEmptyMessage('admin__user-tbody','admin__user-
empty-message');
ActiveScaffold.increment_record_count('admin__user-active-scaffold');
$$("#admin__user-create--form a.cancel").first().link.close();
------------

I haven't changed the javascript or something like that, everything
else works perfect. The post is even being created.

Thanks a lot for all help!!!
What is wrong?

Puttlick

未读,
2007年11月3日 05:13:012007/11/3
收件人 ActiveScaffold : Ruby on Rails plugin
I should add that this only happens in Firefox.

Puttlick

未读,
2007年11月3日 05:14:182007/11/3
收件人 ActiveScaffold : Ruby on Rails plugin
Actually, it only happens in Firefox Minefield
Strange...

friofool

未读,
2007年12月11日 04:32:002007/12/11
收件人 ActiveScaffold : Ruby on Rails plugin
i get the same error with firefox 3, all is ok with others for me
(safari,ie),

any ideas ?

On 3 nov, 09:14, Puttlick <patrick....@gmail.com> wrote:
> Actually, it only happens in Firefox Minefield
> Strange...
>
> On Nov 3, 10:13 am, Puttlick <patrick....@gmail.com> wrote:
>
> > I should add that this only happens in Firefox.
>
> > On Nov 2, 9:50 pm, Puttlick <patrick....@gmail.com> wrote:
>
> > > Hi!
>
> > > First of all, I love this Scaffold, thanks alot!
>
> > > Unfortunately it does not work as mean, I get aerrorwhen I make a

wamd

未读,
2007年12月20日 17:05:352007/12/20
收件人 ActiveScaffold : Ruby on Rails plugin
Happening for me as well in firefox 3 beta 2

On Dec 11, 3:32 am, friofool <smaure...@gmail.com> wrote:
> i get the same error with firefox 3, all is ok with others for me
> (safari,ie),
>
> any ideas ?
>
> On 3 nov, 09:14, Puttlick <patrick....@gmail.com> wrote:
>
> > Actually, it only happens in Firefox Minefield
> > Strange...
>
> > On Nov 3, 10:13 am, Puttlick <patrick....@gmail.com> wrote:
>
> > > I should add that this only happens in Firefox.
>
> > > On Nov 2, 9:50 pm, Puttlick <patrick....@gmail.com> wrote:
>
> > > > Hi!
>
> > > > First of all, I love this Scaffold, thanks alot!
>
> > > > Unfortunately it does not work as mean, I get aerrorwhen I make a
> > > > post.
> > > > ------------
> > > >RJSerror:
>
> > > > TypeError: $$("#admin__user-create--forma.cancel").first().link has
> > > > $$("#admin__user-create--forma.cancel").first().link.close();

Jefflin

未读,
2007年12月20日 23:52:172007/12/20
收件人 ActiveScaffold : Ruby on Rails plugin

Hi,

Which version of AS are you using? I have similar issue when I have
the template override on create.rjs, destroy.rjs and add_existing.rjs
with version 1.0.1 and then updated to the version 1.1.0 rc1.

The code "ActiveScaffold.toggleEmptyMessage" has been changed to
"ActiveScaffold.hide_empty_message" after version 1.0.1 from what I
can see.

If you have the same case, just replace the .rjs files with new .rjs
files and update them accordingly.

aria42

未读,
2008年1月29日 19:38:402008/1/29
收件人 ActiveScaffold : Ruby on Rails plugin
I'm having this same problem with AS v1.1.0, any suggestions?

Cheers, Aria

On Dec 20 2007, 8:52 pm, Jefflin <jefflin.hu...@gmail.com> wrote:
> Hi,
>
> Which version of AS are you using? I have similar issue when I have
> the template override on create.rjs, destroy.rjsand add_existing.rjs
> with version 1.0.1 and then updated to the version 1.1.0 rc1.
>
> The code "ActiveScaffold.toggleEmptyMessage" has been changed to
> "ActiveScaffold.hide_empty_message" after version 1.0.1 from what I
> can see.
>
> If you have the same case, just replace the .rjsfiles with new .rjs
> files and update them accordingly.
>
> On Nov 3, 7:50 am, Puttlick <patrick....@gmail.com> wrote:
>
> > Hi!
>
> > First of all, I love this Scaffold, thanks alot!
>
> > Unfortunately it does not work as mean, I get aerrorwhen I make a

kintner

未读,
2008年3月12日 17:23:422008/3/12
收件人 ActiveScaffold : Ruby on Rails plugin
I filed Issue 548 on this.

The problem that is in Firefox 3 there is a native version of
getElementsByClass that returns a NodeList instead an Array like the
prototype version does.

To fix this change line 266 of active_scaffold.js from

this.adapter.getElementsByClassName('cancel').each(function(elem) {

to

this.adapter.select('.cancel').each(function(elem) {

Chris

Synth

未读,
2008年4月14日 00:22:342008/4/14
收件人 ActiveScaffold : Ruby on Rails plugin
The above fix worked for me for updates :-) but I'm still getting a
similar error on creates...:-(

Synth

未读,
2008年4月14日 01:27:192008/4/14
收件人 ActiveScaffold : Ruby on Rails plugin
Ok, tracked it down to create.rjs changed:
cancel_selector = "#{element_form_id(:action => :create)}
a.cancel".to_json
to:
cancel_selector = "##{element_form_id(:action => :create)}
a.cancel".to_json

How did something like this get through?

Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.

未读,
2008年4月14日 04:09:222008/4/14
收件人 actives...@googlegroups.com
El Monday 14 April 2008 07:27:19 Synth escribió:
> Ok, tracked it down to create.rjs changed:
> cancel_selector = "#{element_form_id(:action => :create)}
> a.cancel".to_json
> to:
> cancel_selector = "##{element_form_id(:action => :create)}
> a.cancel".to_json
>
> How did something like this get through?

Are you using an old version? I'm using 1.1.0 and I have create.rjs like that.

--
Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com

goodwill

未读,
2008年5月9日 11:25:102008/5/9
收件人 ActiveScaffold : Ruby on Rails plugin
Still no luck here. I am using 1.1.1 I think. I track down and found
this code not working in Safari 3.1:

$$("#admin__user-create--form a.cancel").first().link.close();
Which is created by:
page << "$$(#{cancel_selector}).first().link.close();"

Inside create.rjs

On Apr 14, 4:09 pm, "Sergio Cambra .:: entreCables - Symbol Servicios

goodwill

未读,
2008年5月9日 11:44:082008/5/9
收件人 ActiveScaffold : Ruby on Rails plugin
And it did not happen on FF2, I haven't tried FF3 though.

fiend

未读,
2008年6月27日 00:53:082008/6/27
收件人 ActiveScaffold : Ruby on Rails plugin
I got the same problem with Firefox 3 and AS 1.1.1, but I swear
changing the line at 266 did the fix, at least temporarily! Apparently
active_scaffold.js is metaprogrammed back into the original code
during a create, maybe we need to inform the active scaffold team?

On May 9, 10:25 am, goodwill <william.yeung...@gmail.com> wrote:
> Still no luck here. I am using 1.1.1 I think. I track down and found
> this code not working in Safari 3.1:
>
> $$("#admin__user-create--form a.cancel").first().link.close();
> Which is created by:
>     page << "$$(#{cancel_selector}).first().link.close();"
>
> Inside create.rjs
>
> On Apr 14, 4:09 pm, "Sergio Cambra .:: entreCables - Symbol Servicios
> Informáticos S.L. ::." <ser...@entrecables.com> wrote:
>
> > El Monday 14 April 2008 07:27:19 Synth escribió:
>
> > > Ok, tracked it down to create.rjschanged:
> > >           cancel_selector = "#{element_form_id(:action => :create)}
> > > a.cancel".to_json
> > > to:
> > >           cancel_selector = "##{element_form_id(:action => :create)}
> > > a.cancel".to_json
>
> > > How did something like this get through?
>
> > Are you using an old version? I'm using 1.1.0 and I have create.rjslike that.
回复全部
回复作者
转发
0 个新帖子