Page 1 of 1

Admin login twice

Posted: Wed Nov 23, 2016 8:05 am
by lumimies
Hello

For some reason I have to log in twice to reach admin pages.

- also admin log shows "logged in" two separate times

This behaviour started after upgrade 1.12.1 >> 2.1.5

*****
----------------------------------------------

Cms Version: 2.1.5

Installed Modules:

AdminSearch: 1.0.2
CGContentUtils: 2.1.5
CGExtensions: 1.53.13
CGFeedMaker: 1.0.20
CGSimpleSmarty: 2.1.4
CGSnapshot: 1.2.1
CG_RSS_Reader: 1.0.3
CMSContentManager: 1.1.1
CMSMailer: 6.2.14
DesignManager: 1.1.1
ExtendedTools: 1.3.3
FileManager: 1.5.2
JQueryTools: 1.3.9
MenuManager: 1.50.2
MicroTiny: 2.0.3
MleCMS: 2.0-alpha2
ModuleManager: 2.0.4
Navigator: 1.0.3
News: 2.50.5
PDFGenerator: 0.1
Printing: 1.1.2
Search: 1.50.2
ThemeManager: 1.1.8
TinyMCE: 3.1.4


Config Information:

php_memory_limit:
max_upload_size: 20000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
auto_alias_content: true
locale: fi_FI.UTF8
set_names: true
permissive_smarty: false


Php Information:

phpversion: 5.4.4-14+deb7u12
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 22519
E_STRICT: 0
E_DEPRECATED: 0
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 256M
max_execution_time: 120
register_globals: Off (False)
output_buffering: 4096
disable_functions: pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority,
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 20M
upload_max_filesize: 20M
session_save_path: /var/lib/php5 (1733)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On


Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
smarty_cache_udt: Off (False)
auto_clear_cache_age: On (True)

Server Information:

Server Software: Apache/2.2.22 (Debian)
Server Api: apache2handler
Server Os: Linux 3.2.0-4-amd64 On x86_64
Server Db Type: MySQL (mysql)
Server Db Version: 5.5.52
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable


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

Re: Admin login twice

Posted: Fri Dec 02, 2016 7:01 am
by lumimies
Any suggestions to try?

Re: Admin login twice

Posted: Fri Dec 02, 2016 9:16 am
by Rolf
What browser do you use?

Re: Admin login twice

Posted: Fri Dec 02, 2016 9:20 am
by lumimies
Hi

Mostly FF or Chrome on Mac. Behaviour is the same on IE / Win also

Regards

Re: Admin login twice

Posted: Fri Dec 02, 2016 9:50 am
by Rolf
There are more similar reports, I have also seen it a few times myself...
But it happens not frequently and inconsistent. Some sites at the same server have it sometimes, others don't. We have no leads to think it is a bug within CMSMS or a module. Not saying it isn't one, but if we can't reproduce it, it can't be fixed.

So it might also be a server or browser related problem...

Nothing more I can do at this time sadly.

Re: Admin login twice

Posted: Fri Dec 02, 2016 10:53 am
by lumimies
Hi

Ok - Thank You. My servers php log shows:

"PHP Notice: Only variable references should be returned by reference in ../lib/classes/class.useroperations.inc.php on line 197"

... but i do not know if this has anything to do with this matter..

Regards

Re: Admin login twice

Posted: Fri Dec 02, 2016 11:35 am
by Rolf
No, that one is not related. Should be fixed for 2.2 release.

Re: Admin login twice

Posted: Fri Dec 02, 2016 11:55 am
by lumimies
Ok - Thanks for these.

Re: Admin login twice

Posted: Wed Dec 21, 2016 5:03 pm
by caciavar
I'm having the same issue - running the latest version (2.1.6)
For me it happens every time I try to log in.

Re: Admin login twice

Posted: Thu Dec 22, 2016 5:16 am
by caciavar
I found out what was causing my issue... maybe this is a clue into what the issues are for everyone else.

In my case, I have a custom (forked) module where in the <Module Name>.module.php, there are a bunch of lines like this:

Code: Select all

$this->CreateParameter('summarytemplate','',$this->Lang('param_summarytemplate'));
$this->SetParameterType('summarytemplate',CLEAN_STRING);
$this->CreateParameter('sortby','product_name',$this->Lang('param_sortby'));
$this->SetParameterType('sortby',CLEAN_STRING);
$this->CreateParameter('sortorder','asc',$this->Lang('param_sortorder'));
$this->SetParameterType('sortorder',CLEAN_STRING);
...etc.

If a parameter is created in this file, but does not have a corresponding entry in the language file (ex. 'lang\en_US.php'), then you will experience the behaviour of having to login twice (although you just need to manually change the url to \admin from \admin\login.php after the first login attempt which doesn't properly redirect).

Once you ensure all the "created parameters" have corresponding "$lang" declarations, the normal login behaviour is restored.

I'm not sure if this is true for all modules or if this was just the case for the custom, forked module that I am working with, but I hope this helps pinpoint an issue with a module or with the CMSMS core.

I'd be interested to test whether or not missing $lang declarations cause this type of behaviour across the board for all modules in the latest CMSMS (I'm currently running 2.1.6). I'll have to test that out when I have some more time.

Re: Admin login twice

Posted: Sat Jan 14, 2017 8:42 pm
by deactivated010521
Filled a bug report: http://dev.cmsmadesimple.org/bug/view/11269 Will follow this thread for further discussion.

If I can test something (BETA) or fix let me know.