"Could not get style data" Help?

Discussion in 'phpBB' started by BlackTheorem, Apr 3, 2010.

  1. BlackTheorem

    BlackTheorem Neophyte

    8
    1
    +0
    I'm fairly new to making sites, but I understand and pick up stuff pretty quickly.

    For some reason, i can't log into my phpbb site, and it gives me that error whenever I try to go onto the index or any part of the forum. I can't even log into ACP. I'm seriously confused, and if anyone has any idea on what to do, then by all means, post.

    Thnx
     
  2. Maxis010

    Maxis010 Enthusiast

    132
    33
    +2
    All I can think of is manually empty your site cache, assuming you have FTP go to <forum directory>/cache/ and delete EVERYTHING except for .htaccess and index.htm
     
  3. phreakwars

    phreakwars Wakka Wakka Wakka

    2,504
    660
    +13
    Usually when I have seen that happen, the person has them-self or the board assigned a default theme that is no longer installed/ they uninstalled without refreshing the cache or changing the settings in the ACP.

    Just navigate to www.yoursite.com/adm and login that way to correct the error. You can try clearing the cache manually, but usually what happens with that type of message, the board is trying to find the style that has been set in the SQL, clearing the cache will do nothing.
    .
    .
     
  4. Maxis010

    Maxis010 Enthusiast

    132
    33
    +2
    No offence phreakwars but read the posts before you reply, he can't log in to the ACP.

    The style error will block the ACP login page as it is effected by the active style.
     
  5. phreakwars

    phreakwars Wakka Wakka Wakka

    2,504
    660
    +13
    No it isn't. The admin panel run's on it's own style found under /adm/style

    Try it and see. navigate to adm/index.php

    This will IN THE LEAST, give you the default theme's login page (ucp.php).

    Least it does for me, but then, I did rewrite the "Error 40x" errors to redirect.

    http://www.mywebsite.com/adm/ucp.php?mode=login allows me to get to the ACP without using the default theme.
    .
    .
     
  6. Maxis010

    Maxis010 Enthusiast

    132
    33
    +2
    No it won't, adm/index.php uses the ACTIVE STYLE, it is ONLY inside of the admin control panel that the admin style kicks in.

    .htaccess rewrites won't help here either as phpbb will always force re-auth when you try to login to admin for the first time.

    Actually try it on a phpbb forum, find a way to bypass the active theme to get to the login.

    While you are trying that I have found another fix, disable the admin check

    Go to <forum directory>/adm/ and modify index.php by commenting out lines 31 through 34 and lines 38 through 41

    EDIT: You will also need to give the anonymous account a copy of your privileges inside the mysql.
    Go to Users, copy the existing privileges for user id 1 and put them in notepad or something, now replace them with your privileges (user_id 2)

    Now do what you need to inside the ACP and once your board is working again reverse the changes you have made
     
    Last edited: Apr 4, 2010
  7. BlackTheorem

    BlackTheorem Neophyte

    8
    1
    +0
    For some reason, I can't find a .htaccess. But I did delete everything else (except the index) in the cache.

    EDIT: Alright, that didn't work. Onto the next option..
     
    Last edited: Apr 4, 2010
  8. phreakwars

    phreakwars Wakka Wakka Wakka

    2,504
    660
    +13
    Another option is rename the style folder it's looking for into something else, then copy the prosilver folder and rename it the style the board is looking for...THEN change it in the ACP.
    .
    .
     
  9. Maxis010

    Maxis010 Enthusiast

    132
    33
    +2
    Are you actually trying any of this out or are you just posting ideas that quite frankly cause as many problems as solutions.
    I've got a phpbb board sitting on my dev server simulating this error as best I can so I can solve it.

    Your Idea comes across as
    1. Rename the faulty style
    2. Rename a working style to the faulty style
    3. Delete the renamed faulty style and install 2 working styles
    4. Either...
      • Change prosilver back to prosilver
      • Change the fresh copy of the faulty style you actually want to it's original name and then use the ACP to switch it over
    5. OR just overwrite it, purge the cache and hope for the best

    Much easier in the long run to just
    • Comment out a few lines
    • Change the style
    • Reinstall it


    Just my view on things
     
    Last edited: Apr 5, 2010
  10. BlackTheorem

    BlackTheorem Neophyte

    8
    1
    +0
    So I delete this?
    and this?
     
  11. Maxis010

    Maxis010 Enthusiast

    132
    33
    +2
    NOT delete, you don't want to delete anything as you need to restore it afterwards else anyone can access the ACP

    Just follow this

    Find:
    Code:
    // Have they authenticated (again) as an admin for this session?
    if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
    {
    	login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
    }
    
    Replace with
    // Have they authenticated (again) as an admin for this session?
    //if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
    //{
    // login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], //$user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
    //}

    Find
    Code:
    // Is user any type of admin? No, then stop here, each script needs to
    // check specific permissions but this is a catchall
    if (!$auth->acl_get('a_'))
    {
    	trigger_error('NO_ADMIN');
    }
    Replace with
    Code:
    // Is user any type of admin? No, then stop here, each script needs to
    // check specific permissions but this is a catchall
    //if (!$auth->acl_get('a_'))
    //{
    //	trigger_error('NO_ADMIN');
    //}
    Then go to the database that your forum runs on and open the users table
    Copy the user_permissions field for user_id 1 to notepad
    Copy the user_permissions field for user_id 2 to user_id 1

    How go to yoursite.com/<forum directory>/adm/ and if everything was done right you will end up inside the ACP with full permissions

    From there you should be able to fix your style error
     
  12. phreakwars

    phreakwars Wakka Wakka Wakka

    2,504
    660
    +13

    I've actually had that problem before, and the solution was taken from phpbb.com thank you.

    And it works quite well. So, no, I am not just talking out of my @$$ as you are implying.

    It's the same workaround for people locked out of their ACP because of style issues.
    .
    .
     
  13. Maxis010

    Maxis010 Enthusiast

    132
    33
    +2
    I asked if you was actually trying any of these out in anyway like I was since for all I knew you was plucking ideas out of thin air, next time quote your sources instead of snapping at people who doubt you.

    I've disagreed with all but the last suggestion as they wouldn't work, the final suggestion would work assuming the error is entirely file based, I went for an option that covered a DB fault as well.

    At no point did I say that you was talking out of your @$$ so don't claim other wise.
     
  14. BlackTheorem

    BlackTheorem Neophyte

    8
    1
    +0
    Nevermind, i've decided to just start over with my forum. A wipe and fresh install should fix the problem.
     
Verification:
Draft saved Draft deleted