|
View:
New views
17 Messages
—
Rating Filter:
Alert me
|
|
|
Form Submission Problem with FuseboxHi Folks
Having make huge progress with my first Fusebox venture (and being quietly blown away by the productivity gains of using the A4D framework) I came unstuck with a form submission problem. Active 4D is returning an error 500 when I submit the form with the POST method. After the submission, the Action URL is left in the browser address bar and if I re-request the URL (by hitting return in the address bar) I don't get the 500. I've closely followed the Active 4D demo (including using seting the Action URL in the switch and accessing it with $XFA_onSubmit in the display code) and tried various combinations of URLs but every single time the POST gives me an error 500 (actually A4D Execute 4D Request) returns this. The demo works fine on the same machine and version of Active4D. (techniques/forms) The Action URL looks like this: /index.a4d?fuseaction=query.run There is a circuit called 'query' and a switch called #run'. I also tried things like straight '/index.a4d/query/run' (since the demo appears to use 'techniques/forms' without the dot notation) with no success. What am I missing ? I already scoured the archives and can't find anything similar except a problem with port mapping using ipfw (which I am doing since it's OS 10.5.7). But why then does the demo work fine ? Other stuff I wouldn't mind knowing regarding the demo: - how does the 'techniques' circuit manage to determine the switch ('forms') when the form action uses a slash instead of a dot ? - when the $XFA_onSubmit assignment in the 'forms' switch (techniques circuit) uses fusebox{fqfa}, shouldn't this return the dot notation format ? Any ideas much appreciated if I'm missing something obvious. Regards Peter _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem with Fusebox> The Action URL looks like this: /index.a4d?fuseaction=query.run
Just a wild guess...try changing the circuit name to something other than query. > - how does the 'techniques' circuit manage to determine the switch > ('forms') when the form action uses a slash instead of a dot ? The demo is using an On Request event handler that transforms /circuit/ action into circuit.action. See Active4D.a4l. > - when the $XFA_onSubmit assignment in the 'forms' switch (techniques > circuit) uses fusebox{fqfa}, shouldn't this return the dot notation > format ? No, I installed a custom fusebox url factory. See the On Application Start method in Active4D.a4l. Regards, Aparajita www.aparajitaworld.com "If you dare to fail, you are bound to succeed." - Sri Chinmoy | www.srichinmoy.org _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem with FuseboxOn 1 Sep 2009, at 19:31, Aparajita Fishman wrote: > Just a wild guess...try changing the circuit name to something other > than query. Tried this and same result - error 500. It doesn't even get as far as loading index.a4d. When I inspect the request headers in 'On Web Connection' then seem ok and all the form variables are there but something must be wrong because 'A4D Execute Request' immediately throws the error. I will dump the full request header ($1, $2 etc) to the clipboard and compare it with the one in the demo to see if I can see any difference. On 1 Sep 2009, at 19:31, Aparajita Fishman wrote: > The demo is using an On Request event handler that transforms / > circuit/action into circuit.action. See Active4D.a4l. That explains it - thanks. b.t.w. the demo is absolutely great for learning fusebox. I couldn't have got this far so fast without it and I'm seeing what a huge body of work the whole fusebox framework is just to make things easy for us. (It's kind of like discovering session management again). No turning back now :) Regards Peter _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem with Fusebox> When I inspect the request headers in 'On Web Connection' then seem
> ok and all the form variables are there but something must be wrong > because 'A4D Execute Request' immediately throws the error. What version of 4D? You should be using 'A4D Execute 4D Request'. Did you modify On Web Connection? > b.t.w. the demo is absolutely great for learning fusebox. I couldn't > have got this far so fast without it and I'm seeing what a huge body > of work the whole fusebox framework is just to make things easy for > us. Once you "get" fusebox, development is 100x easier and you never want to go back. Regards, Aparajita www.aparajitaworld.com "If you dare to fail, you are bound to succeed." - Sri Chinmoy | www.srichinmoy.org _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem with FuseboxOn 1 Sep 2009, at 20:29, Aparajita Fishman wrote: > What version of 4D? You should be using 'A4D Execute 4D Request'. > Did you modify On Web Connection? Sorry, I am indeed calling 'A4D Execute 4D Request' - just missed the '4D' out. Peter _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem with Fusebox> When I inspect the request headers in 'On Web Connection' then seem
> ok and all the form variables are there but something must be wrong > because 'A4D Execute Request' immediately throws the error. I will > dump the full request header ($1, $2 etc) to the clipboard and > compare it with the one in the demo to see if I can see any > difference. Check Active4D.log, there should be an error message there. A 500 status means the http server barfed somewhere, which should be logged. Regards, Aparajita www.aparajitaworld.com "If you dare to fail, you are bound to succeed." - Sri Chinmoy | www.srichinmoy.org _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem with FuseboxOn 1 Sep 2009, at 22:56, Aparajita Fishman wrote:
> Check Active4D.log, there should be an error message there. A 500 > status means the http server barfed somewhere, which should be logged. Strangely, I've never seen any Active4D logging activity at all. There are no 'set log level' commands in my code (new and simple database). Neither does there appear to be any logging in the demo database. An OS level search for 'active4d.log or 'Active 4D Logs' (folder) doesn't return any results. I tried setting 'log level=4' in Active4D.ini but still no folder or log appears when the error occurs. Have I missed something 'duh' here ? I'll take another look. Active 4D v4.5r1 Mac OS 10.5.7 Peter _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem with FuseboxPeter, are you using apache in front of 4D?
Thanks, Michael Check On Tue, Sep 1, 2009 at 5:58 PM, Peter Jakobsson<lists@...> wrote: > On 1 Sep 2009, at 22:56, Aparajita Fishman wrote: >> >> Check Active4D.log, there should be an error message there. A 500 status >> means the http server barfed somewhere, which should be logged. > > > Strangely, I've never seen any Active4D logging activity at all. There are > no 'set log level' commands in my code (new and simple database). Neither > does there appear to be any logging in the demo database. An OS level search > for 'active4d.log or 'Active 4D Logs' (folder) doesn't return any results. > > I tried setting 'log level=4' in Active4D.ini but still no folder or log > appears when the error occurs. > > Have I missed something 'duh' here ? I'll take another look. > > Active 4D v4.5r1 > > Mac OS 10.5.7 > > Peter > > _______________________________________________ > Active4D-dev mailing list > Active4D-dev@... > http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev > Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ > Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem with FuseboxI recall having a form issue once that went away when I added
"enctype="multipart/form-data" within my form tag. I might be way off, but I recall it causing me a headache. Worth a try though. Darin On Tue, Sep 1, 2009 at 8:14 PM, Michael Check<michaelr.check@...> wrote: > Peter, are you using apache in front of 4D? > > Thanks, > > Michael Check > > > > On Tue, Sep 1, 2009 at 5:58 PM, Peter Jakobsson<lists@...> wrote: >> On 1 Sep 2009, at 22:56, Aparajita Fishman wrote: >>> >>> Check Active4D.log, there should be an error message there. A 500 status >>> means the http server barfed somewhere, which should be logged. >> >> >> Strangely, I've never seen any Active4D logging activity at all. There are >> no 'set log level' commands in my code (new and simple database). Neither >> does there appear to be any logging in the demo database. An OS level search >> for 'active4d.log or 'Active 4D Logs' (folder) doesn't return any results. >> >> I tried setting 'log level=4' in Active4D.ini but still no folder or log >> appears when the error occurs. >> >> Have I missed something 'duh' here ? I'll take another look. >> >> Active 4D v4.5r1 >> >> Mac OS 10.5.7 >> >> Peter >> >> _______________________________________________ >> Active4D-dev mailing list >> Active4D-dev@... >> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev >> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ >> > _______________________________________________ > Active4D-dev mailing list > Active4D-dev@... > http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev > Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ > Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem with FuseboxOn 2 Sep 2009, at 02:14, Michael Check wrote:
> Peter, are you using apache in front of 4D? No - just raw 4D (standalone 2004.7) on my laptop. The Active 4D demo form submission works ok. On 2 Sep 2009, at 05:35, Darin Schroeder wrote: > I recall having a form issue once that went away when I added > "enctype="multipart/form-data" within my form tag. Thanks, I'll try that this morning. I also need to find out how to turn the A4D logging on. Peter _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Form Submission Problem - SolvedI've got to the bottom of this problem - which turns out of course to be
my own code. It relates to item 940 of the Active 4D release notes for version 4.5. There appears to have a dependency on a 4D method called 'A4D_GetHttpBodyCallback'. My shell does not have this method and when I create it, the form submission works again. I couldn't determine in which part of the framework the dependency exists - i.e. if it's the plugin or the framework scripts. I can't find any reference in Active4D.ini or in any of the libraries. If it's the plugin, it would be usefull to br sblr to specify it in an 'A4D Set HttpBody Callback' type method so the plugin remains independent of the shell - maybe this already exists but I couldn't find any reference to such a command. Many thanks in the meantime for all the usefull input on the thread ! Regards Peter _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem - Solved> There appears to have a dependency on a 4D method called
> 'A4D_GetHttpBodyCallback'. My shell does not have this method and > when I > create it, the form submission works again. It is true that I did not document the purpose for this method, but I put methods in the shell for a good reason! > it would be usefull to br sblr to specify it in an 'A4D Set HttpBody > Callback' type method so the plugin remains independent of the shell - The plugin cannot remain independent of the shell. The shell is the glue between 4D and the plugin. Regards, Aparajita www.aparajitaworld.com "If you dare to fail, you are bound to succeed." - Sri Chinmoy | www.srichinmoy.org _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem - Solved> The plugin cannot remain independent of the shell. The shell is the
> glue between 4D and the plugin. I appreciate this, however, we've always been able to specify the names far 4D method callbacks ('A4D Set Stream Callbacks'). I haven't used the A4D shells in their raw form for about 5 years and only ever use them as a reference for how to call the plugin. This has never been a problem since the plugin has (up till now) been independent of any particular method naming in 4D. This makes it possible (for example) to build real 4D components around the A4D plugin without conflicting with any A4D library code. It would be good if this level of independence could continue to be supported (e.g. with a 'A4D_Set_httpBody_Callback' command). Regards Peter _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem - Solved> This makes it possible (for example) to
> build real 4D components around the A4D plugin without conflicting > with > any A4D library code. Point well taken. I'll add it in the v11 version. Regards, Aparajita www.aparajitaworld.com "If you dare to fail, you are bound to succeed." - Sri Chinmoy | www.srichinmoy.org _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem - SolvedOn 2 Sep 2009, at 19:09, Aparajita Fishman wrote: > Point well taken. I'll add it in the v11 version. That'll be great. Thanks ! _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem - SolvedPeter
Can you elaborate on this procedure? Are you saying that the shell methods do not need to be within 4D? And they're called externally somehow? Thanks, Michael Check On Wed, Sep 2, 2009 at 11:36 AM, <lists@...> wrote: >> The plugin cannot remain independent of the shell. The shell is the >> glue between 4D and the plugin. > > I appreciate this, however, we've always been able to specify the names > far 4D method callbacks ('A4D Set Stream Callbacks'). > > I haven't used the A4D shells in their raw form for about 5 years and only > ever use them as a reference for how to call the plugin. This has never > been a problem since the plugin has (up till now) been independent of any > particular method naming in 4D. This makes it possible (for example) to > build real 4D components around the A4D plugin without conflicting with > any A4D library code. > > It would be good if this level of independence could continue to be > supported (e.g. with a 'A4D_Set_httpBody_Callback' command). > > Regards > > Peter > > > _______________________________________________ > Active4D-dev mailing list > Active4D-dev@... > http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev > Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ > Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
|
|
Re: Form Submission Problem - SolvedOn 2 Sep 2009, at 20:05, Michael Check wrote: > Can you elaborate on this procedure? Are you saying that the shell > methods do not need to be within 4D? And they're called externally > somehow? No - not at all. I'm just saying that if you want to write a custom shell (still in 4D code) instead of using the one supplied with A4D, you have always been able to do this because the plugin has allowed us to specify the 4D callback method names instead of having them hard coded (internally in the plugin). Peter _______________________________________________ Active4D-dev mailing list Active4D-dev@... http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ |
| Free embeddable forum powered by Nabble | Forum Help |