Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After enabling askimet, when trying to post a comment, I get the following:
Fatal error: Call to undefined function drupal_submit_form() in /home/corsix/public_html/modules/akismet/akismet.module on line 707
Comment | File | Size | Author |
---|---|---|---|
#38 | akismet.patch | 4.67 KB | web.net |
Comments
Comment #1
apadernodrupal_submit_form()
doesn't exist anymore in Drupal 6.x or higher (see the documentation page, where the tab for Drupal 6.x is missing).Strangely enough, that change is not documented in the "Converting 5.x modules to 6.x" page.
Comment #2
domesticat CreditAttribution: domesticat commentedJust a confirmation - I am seeing this bug as well.
Comment #3
mcurry CreditAttribution: mcurry commentedsubscribe.
I'm seeing it too.
Comment #4
mcurry CreditAttribution: mcurry commentedDoes anybody know how to fix this problem? I can't see any information on drupal.org talking about how to handle the conversion to Drupal 6,
here http://drupal.org/node/114774#formapi3
or here http://drupal.org/node/144132
Are there any other resources describing how one goes about updating a drupal 5 module, addressing this particular problem?
Comment #5
mcurry CreditAttribution: mcurry commentedupdating title.
Comment #6
apadernoMaybe
drupal_execute()
can be used in this case.The example in the documentation is the following:
Comment #7
alastair CreditAttribution: alastair commentedsubscribe.
I hope that does what I think it does!
Comment #8
apadernoFor what I can understand, it permits to submit some values to a form from a Drupal module.
Actually, I don't understand why there would be two different functions in Drupal 5 which make almost the same thing. The example, anyway, is clear.
Comment #9
drewish CreditAttribution: drewish commentedmarked #268149: Blank white page after comment submission as a duplicate
Comment #10
MorganParker CreditAttribution: MorganParker commentedsubscribe: really having a problem with this and have had to turn off Akismet as it is confusing commenters.
Comment #11
Daniel S. Jackson CreditAttribution: Daniel S. Jackson commentedJust exchanging drupal_submit_form for drupal_execute seems to work.
Comment #12
apadernoWould anybody submit a patch to fix the issue?
Comment #13
mrfelton CreditAttribution: mrfelton commentedsubscribing
Comment #14
harrisben CreditAttribution: harrisben commentedLike others I'd love to see a fix for this so I've gone looking about for a solution, despite having very little knowledge, so please forgive me if I am stating the blatantly obvious.
Have you tried using comment_form_submit() instead? It seems to have the elements you're after.
I'd really hate if we got stuck on this and believe that if we can overcome it we can push on and get this module Drupal 6-ified.
Comment #15
apadernoIt could be the right function to use.
There is just a question that needs an answer: is the form redirection made from that function the desired one?
Comment #16
apadernoPlease, remove my last comment from your mind. :-)
comment_form_submit()
is supposed to be called directly from the core routines; plus, it requires you prepare the arguments it need, and one of them is the parameter&$form_state
(I don't know if we know exactly how it should be set).Watching at that function, anyway, we can see what it does, and use that code to do the same. I actually don't understand a thing: is necessary to imitate the submission of the form data? Would not it be possible to save the data into the comments table? Please, accept my apologies if the question seems silly.
Comment #17
juniperphoenix CreditAttribution: juniperphoenix commentedI'm also getting this bug. Initially I tried posting a comment as an anonymous user; I got the fatal error referenced above and my comment did not post. Then I logged in as an authenticated user and tried posting a comment again; I got the fatal error again but the comment did post. However, when I log in as an administrator and try to unpublish that comment, I get a "Page Not Found."
Comment #18
harrisben CreditAttribution: harrisben commentedTo be honest, this is just one of the many problems that exist with this module under drupal 6. It's just sad that there seems to be a complete lack of movement. I wish I had the knowledge to be able to give this a nudge or two.
Comment #19
mhutch CreditAttribution: mhutch commentedSubscribing. I too have had to disable this module since its broken behaviour is confusing people.
Comment #20
tcblack CreditAttribution: tcblack commentedSame here,
Module disabled. Anyone have a suggestion for a replacement? Preferably one maintained?
Comment #21
apadernoYou can check Mollom.
Comment #22
alpinejag CreditAttribution: alpinejag commentedsubscribing
The module worked great under 5.x but hasn't worked at all for me in 6.x. I have it disabled for now.
Comment #23
apadernoI forgot to say who is the maintainer for Mollom, but you can read his name on the footer of every page here. :-)
Comment #24
Nchase CreditAttribution: Nchase commentedsame issue here.
Comment #25
apadernoChanging the title: it's useless to say "in Drupal 6" when the issue is reported for the version 6.x-1.x-dev of the module.
Comment #26
tcblack CreditAttribution: tcblack commentedGreat advice. After enabling it it's been catching spam left and right.
Comment #27
tronick CreditAttribution: tronick commentedSame problem.
A temporal solution is a exchange "drupal_submit_form" for "drupal_execute" on a "akismet.module", but apears a little new problem.
Comment #28
Konstantin Boyandin CreditAttribution: Konstantin Boyandin commentedConfiirming - the same problem. I have turned Akismet module off.
Comment #29
Poromenos CreditAttribution: Poromenos commentedSame problem here, subscribing.
Comment #30
two40 CreditAttribution: two40 commentedsubscribing
Comment #31
arena CreditAttribution: arena commentedsubscribing
Comment #32
harrisben CreditAttribution: harrisben commentedThis module hasn't been touched in nearly 6 months so unless someone is going to adopt it there is no point in subscribing. I recommend Mollom instead.
Comment #33
Nchase CreditAttribution: Nchase commentedswitched to mollom, but mollom seems to have capacity problems. mollom.com is done: to many connections :(
Comment #34
ionmedia CreditAttribution: ionmedia commentedsame problem
Comment #35
dailypress CreditAttribution: dailypress commentedsame problem on one of my websites. For some reason it works on the other website despite running the same Drupal version.
Comment #36
saturnin CreditAttribution: saturnin commentedsubscribing
Comment #37
jibbajabba CreditAttribution: jibbajabba commentedJust confirming that I'm seeing the same and disabled.
Comment #38
web.net CreditAttribution: web.net commentedTry this. Akismet works for me now.
Oliver
President
www.web.net
Comment #39
web.net CreditAttribution: web.net commentedI've ditched Akismet entirely. Use Mollom instead--it's much better.
Comment #40
apadernoI am closing this issue, since it's for a Drupal version not supported.