Skip to content

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

@Fraenkiman

Description

@Fraenkiman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions