Installing and upgrading help

Login screen does not open

 
Picture of Steve Gregory
Login screen does not open
 

I have migrated an instance to Ubuntu 16.04, php 7.0.22, and moodle 3.4. When I click on the login link on my home page, it is redirected back to my home page without displaying a login page.

DocumentRoot = /var/www/html/moodle

wwwroot = https://my.domain.name

The login link shows https://my.domain.name/login/index.php

I have changed all database references to wwwroot to the current one.

What should I look at next?


 
Average of ratings: -
Picture of Howard Miller
Re: Login screen does not open
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Purge you caches (there's a command line script in Moodle to do it). Delete completely the 'cache/' folder in moodledata. 

Failing that, switch on debugging (in config.php - get the lines from config-dist.php), reproduce the problem and check for anything pertinent in the web server error log.

Have you any optional plugins/themes? Are they *deifinitely* 3.4 compatible?

Check for any other software running on the server that may have a configuration incompatible with Moodle - Wordpress is a common one. 

 
Average of ratings: -
Picture of Steve Gregory
Re: Login screen does not open
 

I had already cleared the cache.

When I turned on the debug, i got these three lines.

  • line 677 of /lib/pagelib.php: call to moodle_page->initialise_theme_and_output()
  • line 864 of /lib/pagelib.php: call to moodle_page->magic_get_theme()
  • line 116 of /index.php: call to moodle_page->get_renderer()
Maybe this will shed some light on what is going on. 
 
Average of ratings: -
Picture of Ken Task
Re: Login screen does not open
Particularly helpful Moodlers

It does ... but still a guess ... theme related ... two things to try:

1. manually remove any folders/files in your moodledata/localcache/ ... in there is a theme directory located there and it might have cached stuff from old site.

or

2. edit the config.php file of your site and add a line forcing the usage of a default theme that comes with the version of Moodle you have ... for version 3.4 those are 'boost' which is the default ... or 'clean' or 'more'.

$CFG->theme="clean';

or 'more' ...

No need to restart anything by adding that line to config.php, just crank up browser and hit the site.

Fingers crossed ...

'spirit of sharing', Ken


 
Average of ratings: -
Picture of Steve Gregory
Re: Login screen does not open
 

I'm getting closer. Adding $CFG->'clean'; gives me a listing of courses and the correct banner. The login link still redirects to the home screen instead of a login page.

When I click on one of the displayed courses I get redirected back to the home screen.


 
Average of ratings: -
Picture of Ken Task
Re: Login screen does not open
Particularly helpful Moodlers

Apologize ... typo on what I showed to add ... so double check your entry in config.php

$CFG->theme='clean';

The character that encloses the value must match ... not "...' like I had in the first posting.

So did you also remove all files/folders in moodledata/localcache/

Did you also do/check what Howard suggested?

Did you turn off debugging?

To get to debugging try going directly with browser URL line:

https://yoursite/admin/settings.php?section=debugging

That should prompt you to login and then redirect to the settings page for debugging.

Can you/did you search web server error logs?

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Ken Task
Re: Login screen does not open
Particularly helpful Moodlers

In addition to what Howard has suggested you check, is there a redirect in the config of the default site  related to ssl for your server? ... .htaccess or main config for the default web site to serve out?

'spirit of sharing', Ken


 
Average of ratings: Useful (1)