Avatar

Contact form isn´t working when user is not logged in (General)

by Auge ⌂, Tuesday, March 14, 2023, 21:21 (407 days ago) @ Tommy Nilsson

Hello

Fatal error: Uncaught Error: Call to a member function getResponse() on null in .../svenska-lok.se/httpd.www/forum/modules/akismet/akismet.class.php:250 …

Following the trace of the error messages, my first check was to validate my key to exclude that Akismet possibly is classifying the forum software as a non-personal use (this is the condition for free use of Akismet). The Akismet-API provides a method to do this and even without coding the check one can perform it with a tool like Insomnia or Postman (to name an open source project and a commercial product). At least my API-key is valid.

In the second step I searched for the source of the plugin, that we use. Our plugin is meanwhile very old (from the comment box: "Akismet PHP4 class"). The version information, provided in the comment box of the plugin script file is v0.3.4, created in the year 2008. The link to the project page is dead, even the page, the project page is forwarded to, is dead.

I found an Akismet-plugin for "OJS/OMP" (Open Journal System for scientific journals), written in PHP (licence GPL 2 or later) with the latest commit in february 2022. I have no clue if it would be worth the effort to port it to our needs.

The search for "Akismet" on Github (selected language: PHP, ordered descending by the latest commit) provides several possibilities.

But also the API documentation provides code examples, written in PHP (in example for checking comments/entries) (but also simple examples for other interesting purposes like checking for (not) reaching a monthly usage limit).

Generally I found many similarities between the code in our repository and the example code in the API-documentation. The API seems to be very stable over the years. But the error message, provided by Tommy, states clearly, that there is an error in line 250 of the Akismet class file.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread