FEU, logged out if submitting form

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

FEU, logged out if submitting form

Post by Cognatus »

This is a retake of a problem I'va tried to ventilate in this forum earlier (http://forum.cmsmadesimple.org/viewtopi ... =7&t=70571). I have started things over to simplify debugging.

I have made a new installation of CMSMS:

----------------------------------------------

Cms Version: 1.11.11

Installed Modules:

CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.5
MenuManager: 1.8.6
MicroTiny: 1.2.7
ModuleManager: 1.5.8
News: 2.14.4
Search: 1.7.11
ThemeManager: 1.1.8
CGExtensions: 1.42.2
FrontEndUsers: 1.24
SelfRegistration: 1.8.2
Gallery: 2.0.1
CustomContent: 1.10
FormBuilder: 0.8
GBFilePicker: 1.3.3


Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 256000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.3.3
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 256M
max_execution_time: 1600
output_buffering: 0
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 128M
upload_max_filesize: 256M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.0.83
Server Db Grants: Could not find a suitable "GRANT ALL" permission. This may mean you could have problems installing or removing modules. Or even adding and deleting items, including pages
Server Time Diff: No filesystem time difference found


----------------------------------------------

I use this template:

http://www.cmstemplatebuddy.com/templat ... msms/3/008


----------
You may see the page here:

http://www.dombok.se

You may use self registration to register as a user here:

http://dombok.se/index.php?page=registrera-konto

(In swedish but it's nothing but the usual self reg...)
----------

I have set four pages as Protected Content, will show in menu when logged in.

I have placed a very simple form in one of the protected pages via an UDT:

Code: Select all

echo'
<div Id="uploaddiv">
<form action="http://www.dombok.se/index.php?page=registrera-post" method="post" Id="upload">
<input type="hidden" name="upload" value="upload">
<table>
<tr>
<td width="100px">Datum</td><td><input name="Datum"type="text" ><br /></td>
</tr>

<tr>
<td></td>
<td><input Id="sokid" type="submit" style="width:auto;"  value="Spara och lägg till en ny"><input Id="rensa"  name="Rensa" type="button" style="width:auto; margin-left:10px;" onClick="location.href=\'http://www.dombok.se/index.php?page=registrera-post\' "value="Rensa" /><br /></td>
</table>
</form>
</div>
';
----------


Problems

1. If I try to submit this form I get kicked out of the session now and then, independent of what browser I use.

One way that I regularly can reproduce this is if I login from FF (usually I can submit the form, but not always) then logout, open Chrome and login and try to submit the form, kicked out.

2. How do I set up FEU to remember that I'm logged in even if I close the browser? If I login now, close the browser and open it again I can't access the protected pages.


As you may underastand this is not my comfort zone but I try to read all available instructions, but it's easy to overlook things.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: FEU, logged out if submitting form

Post by paulbaker »

2. Users & Groups -> Frontend User Management -> Settings (at the top) -> Allow users to login more than once: [tick]

You will also see Session Timeout (seconds) on the same page.
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

Re: FEU, logged out if submitting form

Post by Cognatus »

paulbaker wrote:2. Users & Groups -> Frontend User Management -> Settings (at the top) -> Allow users to login more than once: [tick]

You will also see Session Timeout (seconds) on the same page.
If I tick "Allow users to login more than once" I can login again sending credentials once more, but I'm not automaticly logged in when I reopen the page (as for instance in this forum). Is that feature not supported in FEU?
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: FEU, logged out if submitting form

Post by paulbaker »

Just tried logging in, closing browser and reopening on the same page - I stayed logged in. This was an instance of FEU on a live site. I ticked "Remember me on this computer" when I logged in (a tick box that was in the standard templates if I remember correctly).
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

Re: FEU, logged out if submitting form

Post by Cognatus »

I have tried ticking the box, makes no difference, I'm not logged in when I reopen the browser and the page again. What can I do to check whether all necessary cookies are available?
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

Re: FEU, logged out if submitting form

Post by Cognatus »

I have now spent some time to test FEU logging in and out, switching browsers, ticking boxes, you name it to see if I can get things to work. No luck. But a couple of questions has arisen...


A. In the FEU settings I set the "Use cookies to keep logins alive" to Yes, save, switch to another module, go back to the FEU and verify that the change is done. If I then tick the box "Allow users to login more than once" the previous setting resets to No. Is that the correct behavior?

B. I have never been able to tick the "Remember me on this computer" in the login dialogue and find it there again when opening the same page.

C. If I have set FEU to not allow users to login more than once, login, close the window, open it and try to login again, I get the information that the user is already logged in. Additionally I see some faulty code (/>) next to the checkbox for "Remember me on this computer". See picture. Is it possible that the Swedish language settings is messing things up?
Skärmklippx.JPG
Skärmklippx.JPG (18.11 KiB) Viewed 4754 times
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: FEU, logged out if submitting form

Post by calguy1000 »

A. In the FEU settings I set the "Use cookies to keep logins alive" to Yes, save, switch to another module, go back to the FEU and verify that the change is done. If I then tick the box "Allow users to login more than once" the previous setting resets to No. Is that the correct behavior?
I just tested this (as it seems like it could potentially be a simple error in the code)... but I could not reproduce it. The input field is a dropdown with 2 elements (yes, no). and works properly here.
B. I have never been able to tick the "Remember me on this computer" in the login dialogue and find it there again when opening the same page.
This could be due to an HTML error in the form. In the past the sample forms had some errors in them. Or maybe your code above or below the call to FEU is invalid or causing errors. You should:
1. Make sure your HTML validates
2. Look for javascript errors.
C. If I have set FEU to not allow users to login more than once, login, close the window, open it and try to login again, I get the information that the user is already logged in.
This is correct behaviour.
Additionally I see some faulty code (/>) next to the checkbox for "Remember me on this computer". See picture. Is it possible that the Swedish language settings is messing things up?
See above. Check for validation and and javascript errors.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

Re: FEU, logged out if submitting form

Post by Cognatus »

It's obviously something wrong here (at the swe translation of "Remember me on this computer row"):
Skärmklippy.JPG
How do I fix that?
User avatar
magallo
Dev Team Member
Dev Team Member
Posts: 121
Joined: Thu Mar 24, 2011 12:37 am

Re: FEU, logged out if submitting form

Post by magallo »

Could it be an overlooked "/> in the login template inside FEU ?
Magal Hezi
Pixel Solutions, Technology Partners
magal@pixelsolutions.biz | pixelsolutions.biz

Image
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: FEU, logged out if submitting form

Post by paulbaker »

Cognatus wrote:Is it possible that the Swedish language settings is messing things up?
I guess so, perhaps a stray " in a language file? You could test that by temporarily changing the language to English.
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

Re: FEU, logged out if submitting form

Post by Cognatus »

Changing language didn't make any difference.

It looks like this in the Login Template:

Code: Select all

  {if isset($prompt_rememberme)}
  <div class="row">
    <p class="col-md-4"></p>
    <p class="col-md-8">
      <label><input type="checkbox" name="{$actionid}feu_rememberme" value="1" {if $rememberme==1}checked/>{/if}/> {$prompt_rememberme}</label>
    </p>
  </div>
  {/if}
The "checked" part is looking strange...
Last edited by Cognatus on Wed Nov 19, 2014 9:02 am, edited 1 time in total.
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

Re: FEU, logged out if submitting form

Post by Cognatus »

A control question...

In the FEU settings there are two tabs, the last one named Builtin Authentication has a blue field with following info The following settings are only applicable if using the "Builtin Authentication".

When looking at the preference tab I only have FEU Standard Authentication in "Authentication Module/Method:", is that synonymous with "Builtin Authentication"?
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: FEU, logged out if submitting form

Post by paulbaker »

Change checked/> to just checked
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

Re: FEU, logged out if submitting form

Post by Cognatus »

This could be due to an HTML error in the form. In the past the sample forms had some errors in them. Or maybe your code above or below the call to FEU is invalid or causing errors. You should:
1. Make sure your HTML validates
2. Look for javascript errors.
http://dombok.se/index.php?page=inloggning

This is what I get when validating at W3.org:

Line 5, Column 52: Bad value for attribute dir on element html.

Code: Select all

<!--[if (gte IE 9)|!(IE)]><!--><__html lang='' dir=''><!--<![endif]-->
I guess that error is not involved in my troubles...

Debugging javascript is nothing that I'm capable of. :(
Cognatus
Forum Members
Forum Members
Posts: 45
Joined: Sun Apr 08, 2012 9:30 am

Re: FEU, logged out if submitting form

Post by Cognatus »

I captured my screen while fiddling around in the seetings of FEU. As I mentioned before, if I change the settings for the cookie to Yes and save, then switch to the other tab and save, the Cookies setting is reset to No??

http://www.youtube.com/watch?v=JDT745tU ... e=youtu.be
Post Reply

Return to “Modules/Add-Ons”