Author Topic: administration link has disappeared  (Read 4477 times)

helen

  • Newbie
  • *
  • Posts: 14
    • View Profile
administration link has disappeared
« on: March 23, 2009, 11:33:07 pm »
yesterday i noticed that the admin link in the top right hand corner has disappeared! previously it showed "(Logout) Administration Account Help" but now it only shows "(Logout) Account Help".

i have tried logging out & in again, & i'm definitely the admin user (& haven't changed my priviliges & no-one else has admin access) but it still doesn't appear.

so i upgraded - previously i was using 1.3-rc beta, i upgraded to 1.3, but it's still not there.

any ideas how to get it back? i need to be able to configure things!

h : (

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: administration link has disappeared
« Reply #1 on: March 24, 2009, 12:02:30 pm »
If you haven't done son yet, set DEBUG to true in file 'config/config.php'. If it is an error message that is preventing the link from being drawn it will be printed.

Try this: Load OpenGoo and put this into your address bar and press ENTER:
Code: [Select]
javascript:og.openLink(og.getUrl('administration', 'index'))
If you see the Administration panel then you are administrator and for some reason the link is not being shown. If you get a permissions error then you are no longer an administrator. In this case, you can try creating a file called 'fix.php' with the following content in your installation's root dir and browsing to it:
Code: [Select]
<?php
chdir
(dirname(__FILE__));
define("CONSOLE_MODE"true);
define('PUBLIC_FOLDER''public');
include 
"init.php";

try {
$gu = new GroupUser();
$gu->setGroupId(Group::CONST_ADMIN_GROUP_ID);
$gu->setUserId(1);
$gu->save();
} catch (
Error $e) {
echo $e->getMessage();
}

echo 
"Done.";
?>

helen

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: administration link has disappeared
« Reply #2 on: March 25, 2009, 04:56:23 pm »
thanks for the advice : )

first i tried to change the DEBUG to true; i did this in the file but when i tried to upload the chagned file back to the server, it said permission denied (which is wierd bcos to my knowledge nothing has been changed on the server). is there another way to change that?

then i tried putting the javascript line into the address bar of the browser & got an error message telling me i didn't have permission, so it looks like somehow my admin rights have been removed : (

then i created the fix.php file & got the message:
 "Query failed with message 'Duplicate entry '10000000-1' for key 1'Done."

h : (

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: administration link has disappeared
« Reply #3 on: March 26, 2009, 10:20:24 am »
Is your user the admin user you created when you installed OpenGoo? If it isn't then you should login with that admin user and change your user's permissions, by going to Administration -> Users -> <your user> -> Update profile -> Administrator options -> Administrator: Yes.

helen

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: administration link has disappeared
« Reply #4 on: March 29, 2009, 12:01:52 am »
yes, it is the same one. i've tried logging out & logging in again, but still no admin link. i don't have any other log in. when i still could access the admin area, i created 2 other users & have tried logging in as them but they don't have admin access either.

it seems that somehow my user account has had its privileges changed. is there some file in the application that i can edit to change them back?

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: administration link has disappeared
« Reply #5 on: March 30, 2009, 09:37:34 am »
OpenGoo admins are users that belong to the Administrators group. This is stored in the database, on table og_group_users. There needs to be an entry in that table for your user in order to be an admin (group id=10000000, user_id=1). The script I posted should do that, add your user to the admin's group.

Can you check if that entry exists on your database?

helen

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: administration link has disappeared
« Reply #6 on: March 31, 2009, 08:41:55 pm »
progress - i now have access to the database : ) & have looked up the og_group_users table. the group_id & user_id entries both have length/values of 10; is this wrong? should i change these values to 10000000 & 1 respectively?

i've also edited the config.php file to debug TRUE & the cookies line that i found in other support questions about log-in problems. but still i'm in the same situation - my log-in no longer works.

i think the solution is to create a new admin user log-in, but how can i do this when i can't log in to the interface? can i do it thru phpmyadmin, or by modifying & ftp-ing a file within the opengoo directory?
« Last Edit: April 01, 2009, 10:20:52 pm by helen »

helen

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: administration link has disappeared
« Reply #7 on: April 02, 2009, 01:58:38 am »
aarrgghh ... something is seriously wrong : (

after trying all kinds of things i decided i would just have to reinstall it. i backed up the database & dropped all the tables, then went thru the installation process again. all looking good - it said success, & i got the screen asking me to enter username, password etc for the admin user. this was all making me very happy. so i entered the information, clicked next ... & up came the log-in screen. ok, i enter the log-in details that i have just this moment entered as the admin user ... AND NOTHING HAPPENS

all i get is the log in screen again!!!!!!!!!!!!!!!!

help ...  :'(

helen

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: administration link has disappeared
« Reply #8 on: April 05, 2009, 03:12:40 am »
ok, it turned out i had not defined a user for the database; so i did that, i was able to log in, i now have the latest version installed AND I HAVE THE ADMIN LINK AGAIN : )

unfortunately i did not manage to import the database contents, so i've lost everything that was in it & have to start again. not too painful really.

h : )

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: administration link has disappeared
« Reply #9 on: April 07, 2009, 10:43:41 am »
Wow, glad you could solve this! :)