News:

Wondering if this will always be free?  See why free is better.

Main Menu

Undefined index: actual_theme_dir

Started by HunterP, March 23, 2011, 09:16:45 AM

Previous topic - Next topic

HunterP


Hi,

I'm getting this error when a member accesses his profile page :

8: Undefined index: actual_theme_dir
File: /Sources/Load.php
Line: 2082

2079:    // Default language directories to try.
2080:    $language_directories = array(
2081:       $settings['default_theme_dir'] . '/languages',
2082:       $settings['actual_theme_dir'] . '/languages',
2083:    );

Anyone?

Bigguy

Can you post a list of mods that you have installed please. :)

HunterP

Quote from: Bigguy on March 23, 2011, 09:36:10 AM
Can you post a list of mods that you have installed please. :)

1.    Tapatalk SMF 2.0 RC4 Plugin    1.3.0
2.    Bakers Dozen Pages    1.2
3.    Profile Fields & Icons Mod    1.0
4.    Bookmarks    2.3
5.    Image Quote Removal Package    1.1.1
6.    Change All Subjects    1.1.2
7.    Post Registrations    1.2
8.    Login Detector    1.0
9.    Reason For Editing Mod    2.3.2
10.    nCode Image Resizer    1.3.1
11.    SMF Staff Page    1.7
12.    Aeva ~ Auto-Embed Video & Audio    7.1
13.    Share This Topic    2.8
14.    P2000-Tabellen    1.11 (my own mod which parses some HTML in parse_bbc()
15.    Stop Forum Spam    0.8

Bigguy

Ok, can you upload the Load.php file here and I will take a quick look to see if anything is out of place in it. When did this start happening. Did you edit any files before you noticed it. ???

HunterP

Quote from: Bigguy on March 23, 2011, 10:41:36 AM
Ok, can you upload the Load.php file here and I will take a quick look to see if anything is out of place in it. When did this start happening. Did you edit any files before you noticed it. ???

I've recently upgraded to RC5 and can't exactly pinpoint the moment when this started :(

Bigguy


HunterP


Bigguy

Did you have any mods installed that edited the profile in any way, like the User CP mod or anything like that.

HunterP

Quote from: Bigguy on March 23, 2011, 11:24:48 AM
Did you have any mods installed that edited the profile in any way, like the User CP mod or anything like that.

No, I copy/pasted the full list.

Bigguy

Have you checked all your paths to make sure they are correct. Have you tried repair_settings.php

What is repair_settings.php?

I have to step out for a minute to look at a computer but won't be long.

HunterP

Quote from: Bigguy on March 23, 2011, 11:52:22 AM
Have you checked all your paths to make sure they are correct. Have you tried repair_settings.php
What is repair_settings.php?
I have to step out for a minute to look at a computer but won't be long.

I know repair_settings. Tried it, but all paths are ok. As far as I know, I'm not experiencing any problems like missing texts or whatsoever, only these errors anytime a member checks his profile.

Bigguy

Change line 2082 in Load.php to read this and see what happens:

$settings['default_theme_dir'] . '/languages',

It's just a guess but I figured might as well try it and see what happens.

Matthew K.

In a fresh install of SMF 2.0 RC5 there are no instances of "$settings['actual_theme_dir']" which insinuates that it's from a mod.

Bigguy

I figured it was and possible from the httbl mod but was not sure.

Matthew K.

HunterP, might I suggest downloading a zip of your website and then using a program to search the zip such as Notepad++ for "$settings['actual_theme_dir']" to see where it originates?

HunterP

Quote from: Labradoodle-360 on March 23, 2011, 02:08:40 PM
In a fresh install of SMF 2.0 RC5 there are no instances of "$settings['actual_theme_dir']" which insinuates that it's from a mod.

I used the upgrade package en I find 'actual_theme_dir' in :

Load.php :

   $settings['actual_theme_url'] = $settings['theme_url'];
   $settings['actual_images_url'] = $settings['images_url'];
   $settings['actual_theme_dir'] = $settings['theme_dir'];

Subs.php :

   if (isset($settings['use_default_images']) && $settings['use_default_images'] == 'defaults' && isset($settings['default_template']))
   {
      $settings['theme_url'] = $settings['actual_theme_url'];
      $settings['images_url'] = $settings['actual_images_url'];
      $settings['theme_dir'] = $settings['actual_theme_dir'];
   }

ManageServer.php :

   $backup_actual_theme_dir = $settings['actual_theme_dir'];
   $backup_base_theme_dir = !empty($settings['base_theme_dir']) ? $settings['base_theme_dir'] : '';

   // Override these for now.
   $settings['actual_theme_dir'] = $settings['base_theme_dir'] = $settings['default_theme_dir'];
   getLanguages(true, false);

   // Put them back.
   $settings['actual_theme_dir'] = $backup_actual_theme_dir;
   if (!empty($backup_base_theme_dir))
      $settings['base_theme_dir'] = $backup_base_theme_dir;

Arantor

Quote from: Labradoodle-360 on March 23, 2011, 02:08:40 PM
In a fresh install of SMF 2.0 RC5 there are no instances of "$settings['actual_theme_dir']" which insinuates that it's from a mod.

Funny, I found it right there in that code as quoted on a fresh install... it's supposed to be there. In fact, in loadBoard() it's actually derived from $settings['theme_dir']

Bigguy

I did some searching and all i could come up with was errors from the httpbl mod or what ever the name of it is. This is why I thought it was not code from SMF itself.

HunterP

Quote from: Bigguy on March 23, 2011, 02:52:55 PM
I did some searching and all i could come up with was errors from the httpbl mod or what ever the name of it is. This is why I thought it was not code from SMF itself.

As I said, I recently upgraded to RC5 (from 1.1.13). I'm 100% sure no files remained in the Source en Themes folders, and I didn't download or install the httpbl mod.

Arantor

I'm willing to bet that it doesn't happen on the default theme, but it does on another theme, because there's a missing parameter for the other theme (smf_themes table, where id_member = 0, id_theme = theme id, variable = theme_url)

Advertisement: