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

by Auge ⌂, Monday, March 13, 2023, 20:06 (464 days ago) @ Micha


In both cases the error occurs with PHP 8.0.x or 8.1.x.

FYI: I run the forum using PHP version 8.1 and it works. Today, I updated the template and checked the mail function. All mails were received, without an error. I also try PHP 8.2 and it works.

Thank you for sharing your experience. If one of the functions was removed from PHP with version 8.0 or 8.1 I would expect to have seen reports earlier than a half year after the release of the current version. Beside from that I would expect the script to fail silent instead causing the HTTP status 500.

Ahem, that said, I have one simple question to @Tommy and also to @Markus. Do you have access to the server logfiles? Normally, when the server replies with HTTP status 500 you should be able to see the cause of the underlying error in the access log or, if available, in the error log.

Maybe the error, i.e., not saving entries of registered users, is also related to the mail function (sending notification mail)?!

Let's taking this as given fact. If we assume the mail function to be broken, it should be broken in every case.

Thoughts about the scenario in the other thread: When a user has avtivated the mail about new entries in a thread, why saving an entry works in case of a posting made by an admin or mod but not in case of a posting made by a "normal" user? And why it is possible to post new entries for "normal" registered users since Markus deactivated the spam checks for entries that was made by those "normal" users?

The case in this thread is the broken mail function only for unregistered users. Why does the function work for registered users?

Beside from that, the only places I found in the code with a distiction between admins and mods as well as normal users (registered or not) is the spam check. To be fair, I searched only in includes/posting.inc.php but not in includes/contact.inc.php.

@Tommy: Do you have activated Akismet or B8 (Bayes-based filter) for the contact form? And if yes, which of the spam prevention methods is activated for the contact form and is it also activated for registered users or not?

@Micha: Do you have activated one of the spam prevention methods for other purposes than entries (I know you activated B8 for that purpose)?

Markus's configuration is now (after deactivating the checks for registered users) as follows.

B8 check entries is active
Stop Forum Spam is active (but irrelevant for this issue)
Bad Hehaviour is active (but IMHO also irrelevant for this issue)
Akismet check entries is active

Maybe the collection of spam prevention configurations in the different cases brings a clearer sight onto the problem.

Tschö, Auge

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

Complete thread:

 RSS Feed of thread