Page 1 of 1

FEU Login Error "You did not enter a username"

Posted: Wed Jul 15, 2015 7:56 pm
by rbaby
Just installed FEU, on the front-end when I try to log in with the form, it gives me the "You did not enter a username" error despite logging in with credentials.

Tried this with both as username or e-mail logins. Has anyone experienced this? I see no errors in the console and was able to install this fine in another project. I also have Custom Content installed. Code in the template is as follows:

Code: Select all

{if $ccuser->loggedin()}
{content}
{else}
<p>Please login for authorization to view content.</p>
{FrontEndUsers}
{/if}
Thanks in advance.

Re: FEU Login Error "You did not enter a username"

Posted: Wed Jul 15, 2015 8:05 pm
by velden
Wild guess if using mod_rewrite for pretty urls:

check your .htaccess
It should not redirect POST requests

Re: FEU Login Error "You did not enter a username"

Posted: Wed Jul 15, 2015 9:27 pm
by rbaby
velden wrote:Wild guess if using mod_rewrite for pretty urls:

check your .htaccess
It should not redirect POST requests
I do use mod_rewrite for pretty URLs, but just checked htaccess and see nothing that redirects POST requests. Thanks for the suggestion, any other ideas?

Re: FEU Login Error "You did not enter a username"

Posted: Wed Jul 15, 2015 9:35 pm
by velden
Does it have conditions to prevent it from redirecting post requests?

You could use a webinspector to capture network traffic and see if the post request gets redirected.

Example from a default .htaccess of cmsms (/doc/htaccess.txt)

Code: Select all

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
RewriteCond %{REQUEST_METHOD} !POST$ is an important condition in this case. A redirect POST request will loose the POST parameters.

Again, just a guess.

Re: FEU Login Error "You did not enter a username"

Posted: Wed Jul 15, 2015 9:51 pm
by rbaby
velden wrote:Does it have conditions to prevent it from redirecting post requests?

You could use a webinspector to capture network traffic and see if the post request gets redirected.

Example from a default .htaccess of cmsms (/doc/htaccess.txt)

Code: Select all

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
RewriteCond %{REQUEST_METHOD} !POST$ is an important condition in this case. A redirect POST request will loose the POST parameters.

Again, just a guess.
In my .htaccess file, that section is commented out. The htaccess is the same settings as to the other site that I have FEU login working in so I'm not sure what the difference between the two are.

Code: Select all

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
Thank you again for your help.

Re: FEU Login Error "You did not enter a username"

Posted: Thu Jul 16, 2015 12:35 pm
by velden
Do you want to share url to login page?

Re: FEU Login Error "You did not enter a username"

Posted: Thu Jul 16, 2015 8:55 pm
by rbaby
I think I solved my problem though I still don't know the source. I changed the default template to something simpler to just have the input elements and submit button and that seemed to have fixed it.

???