Admin link disappeared and infinite redirect loop errors

bipster / 2017-11-29 09:25:37   

Hi!

Has anyone here found a fix for the Admin link disappearing after updating to 2.1.4?

I've recently updated two sites (in different hostings) to 2.1.4 and after editing some settings the Admin link has disappeared from both sites. I can directly access the Users and the Stats tabs, but the rest of the tabs throw a infinite redirect loop error.

I've found the thread asking to change the /module/system/index.php to a new version with no success.

Any ideas?

Thanks

bipster / 2017-11-29 09:26:56   

Both hostings are running PHP 7.0

bipster / 2017-11-29 09:47:46   

The lines causing the infinite redirect loops in the /module/system/index.php file are like this:

  1. if ($this->access->is_admin() == false) { system_redirect("?a=$go[a]"); }

If I comment them, I can access the unreachable tabs in the Admin section. There must be a problem with the is_admin() function.

bipster / 2017-11-29 10:02:45   
  1. In case anyone is interested, for some strange reason, after updating to 2.1.4, the column "user_admin" in the "ndxz_users" table was set to 0 instead of 1, so the is_admin() check was returning false and thus disallowing the access of many of the Admin tabs and hiding the Admin link itself.

So, to fix this:

1) Access your database via phpMyAdmin or a similar tool in your hosting.
2) Go to the "ndxz_users" table (your table might have a different prefix instead of "ndxz_")
3) Change the "user_admin" column of your user from 0 to 1.

Now, the Admin link should appear again.

Regards

Vaska A / 2017-11-29 16:52:20   

What is the ID of your user?

bipster / 2017-11-29 19:50:32   

I had two users, and the one losing the user_admin value had a value of 1 as the ID. The other one had a value of 2 as the ID and maintained the user_admin value of 1.

Brenda_Lloyd / 2017-12-18 15:23:15   

I am not technical at all and I cannot figure out how to see an admin page to edit. I saw an earlier link posted to take me to that page , but it takes me to my webpage and appears uneditable. Does anyone have a step-by step how I can begin visually and verbally editing my site. Please assume I know absolutely nothing when you respond.
I would greatly appreciate any help with this!

hongkonggong / 2017-12-21 08:33:41   

Thanks @bipster! That worked for me.

@Brenda_Lloyd: what webhost are you using/how did you set up indexhibit?

thedaglab / 2018-02-19 03:51:42   

Same problem, changing the "user_admin" column of your user from 0 to 1 worked! Thank you

Moleskind / 2018-05-06 12:02:11   

Thanks for your help @bipster ! It works for me.

eveamill / 2018-06-25 20:12:00   

Hi,
I wanted to do what @bipster first suggested, but having problems, i.e. I found /module/system/index.php and the above mentioned code line, but not sure what does it mean to "comment them" (I am not familiar with html, php, etc). Could you, @bipster, help me out, please? Don't want to ruin anything :-/
Also, I do not see any database at my hosting...
Any recommendation would be appreciated!
Thanks,
Agnes

Vaska A / 2018-06-25 20:34:32   

Commenting that line would mean putting two forward slashes in front of it...like this...

  1. // like that
eveamill / 2018-06-26 18:27:11   

Thank you, @Vaska!

bendriggs / 2019-02-19 04:32:40   

changing the user_admin worked for me!

This thread has been closed, thank you.