Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No green success message for correctly completed contact form/ comment form #420

Open
Fraenkiman opened this issue May 26, 2024 · 0 comments
Labels

Comments

@Fraenkiman
Copy link
Collaborator

Fraenkiman commented May 26, 2024

Hello everyone,
there is no green success message when the contact form/comment form is filled out correctly if FlatPress is located directly in the main document directory ($_SERVER['DOCUMENT_ROOT']). In addition, you may have to click “Send” twice for the message to be sent.

If FlatPress is located in a subdirectory, a green success message is displayed.

Conditions/ Setup:
FlatPress 1.3.1 release, standard theme, only standard plugins active except accessibleantispam and prettyurls, Commentcenter=allow all comments, no Akismet active.

Apache 2.4 on Debian, Xampp on Windows

My note:
I could not find out the cause. Maybe you should look at the utils_redirect() function.

My workaround:
Do not leave FlatPress in $_SERVER['DOCUMENT_ROOT'], but move it to a subdirectory.

So that FlatPress appears when the domain is called, the rewrite rule in the .htaccess in $_SERVER['DOCUMENT_ROOT'] must be adjusted as follows:

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteRule ^\.htaccess$ - [F]
	RewriteBase /

	RewriteCond %{REQUEST_URI} !^/subdirectory/
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^(.*)$ /subdirectory/$1
	RewriteRule ^(/)?$ subdirectory/index.php [L]
</IfModule>

With best regards
Frank

@Fraenkiman Fraenkiman added the bug label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant