Need some help with the antispam "Post Message" button

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Need some help with the antispam "Post Message" button

DavidJCobb
A while back, I built an inline "Quick Reply" form for the Reaching Perfection forums.

The Quick Reply system broke when the antispam button was implemented, because it didn't use the antispam button macro. I've updated it to use that macro for its submit button, but am still receiving intermittent "Submit failed" errors (redirecting to the main Reply form, which then works) when using Quick Reply. Other users are reporting the same.

It happens seemingly at random on Reaching Perfection and Testing Perfection. It doesn't seem to matter if the app is being used standalone or embedded (RP only allows embedding; TP doesn't force redirection, lest I "lose" the app again).

It seems like there's still some problem with how Quick Reply invokes the antispam button. It could also be an issue with the button itself (I've asked a user to keep an eye out for "Submit failed" messages seen when using the normal Reply page), but I've not heard anything to suggest that specific problem. However, QR is sending all the needed fields for replying, and is using the antispam button now, so I have no idea why it's still experiencing occasional errors. I'm hoping you might be able to help me fix this up.

If you wish to test and see this bug for yourself, feel free to toss some throwaway posts into a Testing Perfection test thread. It will likely take several tries to see the error.
Reply | Threaded
Open this post in threaded view
|

Re: Need some help with the antispam "Post Message" button

Hugo <Nabble>
Hi David, thanks for the explanation. This issue happens because the topic page (where the quick reply controls are located) is cached. So the antispam_submit_button macro is NOT called when the page is served from the cache. That command sets a variable in the user session, so it must be run before any post is saved. The easiest solution for you is to remove the line below from the new_post macro:
<n.check_antispam_submit bypass="preview"/>
This will disable the anti-bot control on your forum, but this shouldn't be an issue if you have active moderators around. Remember that we also have other ways to block spam messages, so you can contact us if there is any user (human or not) posting junk to your forum. Please let me know if you have any questions.

PS. Did you read this post about the future of Nabble? NAML is a great language, but it is not intuitive to the average user. So we are moving our templating language to Lua, which is one of the simplest languages available and typically used as an embedded language. This will push Nabble to the next level and will allow us to fix many issues reported by our users in the last years. I would like to hear from you (probably the most advanced NAML user so far) what you think about this. Thanks for the feedback and I am open to new questions.
Reply | Threaded
Open this post in threaded view
|

Re: Need some help with the antispam "Post Message" button

DavidJCobb
Thanks for the help! Took out the anti-spam check, and ten consecutive posts via Quick Reply worked. :)

Hugo <Nabble> wrote
PS. Did you read this post about the future of Nabble? NAML is a great language, but it is not intuitive to the average user. So we are moving our templating language to Lua, which is one of the simplest languages available and typically used as an embedded language. This will push Nabble to the next level and will allow us to fix many issues reported by our users in the last years. I would like to hear from you (probably the most advanced NAML user so far) what you think about this. Thanks for the feedback and I am open to new questions.
Sounds interesting -- especially the part about being able to test a new-language app while keeping one's NAML-based app running for the public.

Would I be correct in assuming that things like node structure, and setting arbitrary properties on posts/users, will still work?
Reply | Threaded
Open this post in threaded view
|

Re: Need some help with the antispam "Post Message" button

Hugo <Nabble>
DavidJCobb wrote
Sounds interesting -- especially the part about being able to test a new-language app while keeping one's NAML-based app running for the public.
Yes. Users will need that to move their custom code to the new language and compare the old and new until all customizations have been moved.
DavidJCobb wrote
Would I be correct in assuming that things like node structure, and setting arbitrary properties on posts/users, will still work?
Yes, that will continue to work. I know you have put a lot of effort into NAML and I will make sure things work smoothly with your migration. We plan also to add new modules based on things users implemented for their forums, like the Quick Reply form and many others.