Problems accessing the admin/user page

There are a few threads about issues logging in to new installs and there is also a discussion about the admin session timeout, since updating a old test instance to the very latest everything, I have this odd quirk that when the admin session times out and I click log out and then log back in again, this is what I see

Why is there a “Admin re-authentication required” banner there when I have just logged in as an admin user?

Also none of the buttons in the navbar on the right work (except log out which just circles back here once I log in again), the apps menu works but not the dashboard link (on the left)

Below the footer there is what appears to be a unpopulated user list, which is my chosen landing page

image

And even more bizarrely, what’s going on when I narrow the page

I now have a page within a page!!!

My only way out of this page(s) is to open the apps page at which point my other navbar button become live and I can navigate to the page of my choice

here’s the database update page accessed via the admin page

But! If I go to admin/users I get that funky page again

At this point I’m running all master branches, all fully updated and have cleared browser cache and updated database, there are no errors reported in the log or in browser console, I have done a “git diff” and I have no local changes.

When i started writing this I thought it was a log-in or session auth issue, I now think it might just be an issue with the admin/user list page perhaps?

I have just tried defining a different start page (now feed/list, was admin/users) and it logs in just fine to the feeds page, but I still get a funky admin/users page when I navigate to it via the admin page, which, that route means I am definitely an admin level user at that time, so this is looking more like just a issue with the admin/users page so I will change the thread title from “Bizarre login behavior”.

Thats strange! sanity checking here looks fine… can anyone else replicate this?

More info on this, I get a warning in the browser console that is not present on any other page

DevTools failed to parse SourceMap: https://myserver.co.uk/admin/hammer.min.js.map

the link https://myserver.co.uk/admin/hammer.min.js.map lands me this page

and looking at the source think it is looking for https://myserver.co.uk/Lib/hammer.min.js.map which is valid

There has been some work done in the basic theme recently (ref added detection of swipe · emoncms/[email protected] · GitHub) involving hammer.min.js.map, could that be the cause?

I was unable to get it working by commenting out that code so I tried some-backdating to see where it stopped working and I have to go back to 9.8.29 to get it working fully

But both 9.8.30 and 9.8.31 both result in a blank page, no user table or error banner

and the current master (or indexedinputs)

Any thoughts on how to proceed with this ? @TrystanLea or @emrys

There have been significant changes overall since 9.8.30

But the changes between 9.8.29 and 9.8.30 where I lost the admin page are

Comparing 9.8.29...9.8.30 · emoncms/emoncms · GitHub

and the changes between 9.8.31 and the current master where it changed behavior are

https://github.com/emoncms/emoncms/compare/9.8.31...master#diff-7bfb1aa17940a085a27ffc9160e65ffd

Ok, a bit more info…

I just tried commenting out some of the more recent changes and it has started working ok.

I have commented out this whole block in admin_controller.php

and replaced it with

    if ($updatelogin || $session['admin']) {

essentially undoing the changes made to this file in this commit

following on from that I have found I must of previously forgotten to undo the $updatelogin = true: setting following a problem with logging in.

    // Set to true to run database update without logging in
    // URL Example: http://localhost/emoncms/admin/db
    $updatelogin = true;

setting this to false and reverting the file to master has worked and I have the page back.

Shouldn’t the if ($updatelogin) block come after the if ($session['admin']) block rather than before so that only if it’s not an active admin session will the $updatelogin setting be checked?

aha, yes of course, thankyou for spotting that, I’ve moved it to an ‘else if’ at the bottom:

1 Like