News:

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

Main Menu

Undefined index in load.php randomly

Started by Ninja ZX-10RR, September 16, 2014, 12:32:57 PM

Previous topic - Next topic

Ninja ZX-10RR

Hi all, like the title suggests I have been getting random Undefined indexes from my Load.php at totally random actions, it didn't "start" after installing something or at a definite moment... It started to happen just randomly and with totally random actions (once it was removing an uninstalled package from mods list and this time was accessing mods settings, but it happened with more things). Here you go the error is this one:

Quote8: Undefined index: actual_theme_dir
/Sources/Load.php
Line: 2341
The file is attached of course :)

The mods list is pretty long but I don't think it is the cause of the problem taking a look at this it seems to be an old problem never really solved. Tried to repeat the string already and it gets only worse since it throws an error all the time I do anything that way... --> http://www.simplemachines.org/community/index.php?topic=427245.0
Anyway... Mods list follows.

1. Browser Language Detection and Loading 0.1.0 N/A [ Install Mod ] [ List Files ] [ Delete ]
2. detectBrowser Update 1.0.1 N/A [ Install Mod ] [ List Files ] [ Delete ]
3. EmailValidator 1.0 N/A [ Install Mod ] [ List Files ] [ Delete ]
4. Enhanced PM System 1.4 N/A [ Install Mod ] [ List Files ] [ Delete ]
5. Forum Firewall 2.0.0 N/A [ Install Mod ] [ List Files ] [ Delete ]
6. jQLightbox 0.6 N/A [ Install Mod ] [ List Files ] [ Delete ]
7. MCLegendII RC3 3.0 N/A [ Install Mod ] [ List Files ] [ Delete ]
8. nneonneo's AJAX ShoutBox 1.22 N/A [ Install Mod ] [ List Files ] [ Delete ]
9. Reason For Editing Mod 2.3.2 N/A [ Install Mod ] [ List Files ] [ Delete ]
10. ResizeImagesToFitScreen 0.1.6 N/A [ Install Mod ] [ List Files ] [ Delete ]
11. Slash through Banned Usernames 2.0 N/A [ Install Mod ] [ List Files ] [ Delete ]
12. SMF Likes Plus 1.5 N/A [ Install Mod ] [ List Files ] [ Delete ]
13. User Agreement Update 1.0.3 N/A [ Install Mod ] [ List Files ] [ Delete ]
14. Allocate More RAM mod 1.0  April 19, 2014, 06:23:02 PM [ Uninstall ] [ List Files ] [ Delete ]
15. Delete Spam Posts 1.6  April 21, 2014, 06:33:04 PM [ Uninstall ] [ List Files ] [ Delete ]
16. ShowBannedMessage 1.3  April 21, 2014, 06:35:20 PM [ Uninstall ] [ List Files ] [ Delete ]
17. Move Topic Notification 1.2  April 21, 2014, 06:36:28 PM [ Uninstall ] [ List Files ] [ Delete ]
18. open mod reports 1.0  April 21, 2014, 06:43:56 PM [ Uninstall ] [ List Files ] [ Delete ]
19. Admin Notes 2.0  April 21, 2014, 06:45:28 PM [ Uninstall ] [ List Files ] [ Delete ]
20. Karma/Rep Limit 1.0.1  April 21, 2014, 06:48:26 PM [ Uninstall ] [ List Files ] [ Delete ]
21. Anti Bot: Are You Human/Bot? 3.0  April 21, 2014, 06:49:20 PM [ Uninstall ] [ List Files ] [ Delete ]
22. Quick Ban on Account Delete 1.0.1  April 22, 2014, 02:07:56 AM [ Uninstall ] [ List Files ] [ Delete ]
23. SMFPacks Shoutbox 1.0.5  April 22, 2014, 02:08:43 AM [ Uninstall ] [ List Files ] [ Delete ]
24. Order Custom Profile Fields 1.1.1  April 22, 2014, 02:26:56 AM [ Uninstall ] [ List Files ] [ Delete ]
25. Disable to send EMail with Forum-System for Users lower than Admin 1.0  April 22, 2014, 02:59:53 AM [ Uninstall ] [ List Files ] [ Delete ]
26. TalkBox3 2.0  April 22, 2014, 06:11:20 AM [ Uninstall ] [ List Files ] [ Delete ]
27. last login 2.9  April 23, 2014, 04:44:41 AM [ Uninstall ] [ List Files ] [ Delete ]
28. Next Post Level 1.3.3  April 24, 2014, 11:27:35 PM [ Uninstall ] [ List Files ] [ Delete ]
29. Post History 1.03  April 25, 2014, 02:31:33 AM [ Uninstall ] [ List Files ] [ Delete ]
30. Topic Solved 1.1.1  April 26, 2014, 06:35:12 AM [ Uninstall ] [ List Files ] [ Delete ]
31. Bad Behavior mod 1.5.18  April 26, 2014, 04:05:42 PM [ Uninstall ] [ List Files ] [ Delete ]
32. CloudFlare 1.1  April 26, 2014, 04:58:14 PM [ Uninstall ] [ List Files ] [ Delete ]
33. Users Online Today 2.1  April 26, 2014, 09:11:12 PM [ Uninstall ] [ List Files ] [ Delete ]
34. Increase Number of Visitors (cheat) 1.0  April 26, 2014, 11:15:20 PM [ Uninstall ] [ List Files ] [ Delete ]
35. Ban List 2.0  April 27, 2014, 01:48:40 AM [ Uninstall ] [ List Files ] [ Delete ]
36. 'Read the Rules' Link Above Post Button 2.0  April 27, 2014, 02:28:50 AM [ Uninstall ] [ List Files ] [ Delete ]
37. Enhanced PM Popup 1.0.1  April 27, 2014, 02:54:16 AM [ Uninstall ] [ List Files ] [ Delete ]
38. Advanced Signature 0.3.0 beta 1  April 29, 2014, 04:21:19 AM [ Uninstall ] [ List Files ] [ Delete ]
39. Sortable Packages (and Installed Time) 1.3.5  April 30, 2014, 01:45:39 AM [ Uninstall ] [ List Files ] [ Delete ]
40. Anti-Spam Links 1.0.1  April 30, 2014, 02:36:24 PM [ Uninstall ] [ List Files ] [ Delete ]
41. Add Facebook Like to Posts 1.1  May 01, 2014, 12:40:38 AM [ Uninstall ] [ List Files ] [ Delete ]
42. PM to New Members 1.2  May 02, 2014, 06:25:55 PM [ Uninstall ] [ List Files ] [ Delete ]
43. Allow Access while in Maintenance Mode 1.2  May 03, 2014, 09:19:17 PM [ Uninstall ] [ List Files ] [ Delete ]
44. Activity in Profile 1.1  May 03, 2014, 09:27:56 PM [ Uninstall ] [ List Files ] [ Delete ]
45. Ad Managment 3.2  May 03, 2014, 09:54:28 PM [ Uninstall ] [ List Files ] [ Delete ]
46. Custom Copyright 1.0.4  May 04, 2014, 02:57:46 AM [ Uninstall ] [ List Files ] [ Delete ]
47. Fake Topic Views 0.1  May 06, 2014, 12:01:47 AM [ Uninstall ] [ List Files ] [ Delete ]
48. Ban Filter 1.0  May 06, 2014, 12:05:46 AM [ Uninstall ] [ List Files ] [ Delete ]
49. Ohara YouTube Embed 1.2  May 09, 2014, 09:12:30 AM [ Uninstall ] [ List Files ] [ Delete ]
50. Bookmarks 2.5  May 17, 2014, 12:36:49 AM [ Uninstall ] [ List Files ] [ Delete ]
51. Global Topics 2.2  May 20, 2014, 12:30:45 AM [ Uninstall ] [ List Files ] [ Delete ]
52. Register Redirect 1.0  May 28, 2014, 10:20:43 AM [ Uninstall ] [ List Files ] [ Delete ]
53. Install & Uninstall Mods Quickly 1.4  May 31, 2014, 09:49:56 PM [ Uninstall ] [ List Files ] [ Delete ]
54. Tinypic Plugin 1.0.0  May 31, 2014, 09:51:08 PM [ Uninstall ] [ List Files ] [ Delete ]
55. SimpleDesk - Integrated Helpdesk for Simple Machines Forum 2.0  May 31, 2014, 10:37:17 PM [ Uninstall ] [ List Files ] [ Delete ]
56. To Buddies 1.01  June 01, 2014, 11:06:29 PM [ Uninstall ] [ List Files ] [ Delete ]
57. Time Online on Memberlist 1.00  June 04, 2014, 06:30:40 AM [ Uninstall ] [ List Files ] [ Delete ]
58. Profile Song Player 1.0 Beta  June 06, 2014, 05:42:26 PM [ Uninstall ] [ List Files ] [ Delete ]
59. Permissions Info 1.6  June 06, 2014, 05:48:00 PM [ Uninstall ] [ List Files ] [ Delete ]
60. Ignore Topics 2.3  June 14, 2014, 12:33:12 AM [ Uninstall ] [ List Files ] [ Delete ]
61. SMF 2.0.8 Update 1.0  June 19, 2014, 01:56:09 AM [ Uninstall ] [ List Files ] [ Delete ]
62. Caps_Lock_Detection_on_Login 1.1.0.2  June 21, 2014, 09:45:33 AM [ Uninstall ] [ List Files ] [ Delete ]
63. SimpleColorizer 1.1  June 23, 2014, 08:46:32 PM [ Uninstall ] [ List Files ] [ Delete ]
64. Board Index Unread Icon Fix 1.0  June 27, 2014, 02:28:34 PM [ Uninstall ] [ List Files ] [ Delete ]
65. Country Flags 2.1  June 28, 2014, 05:27:51 PM [ Uninstall ] [ List Files ] [ Delete ]
66. PM Settings 1.0.1  June 29, 2014, 09:13:36 PM [ Uninstall ] [ List Files ] [ Delete ]
67. Undeletables topics PMs and users 0.1.5  June 30, 2014, 05:09:57 AM [ Uninstall ] [ List Files ] [ Delete ]
68. Working top level links for drop menus 1.0  July 04, 2014, 04:21:40 AM [ Uninstall ] [ List Files ] [ Delete ]
69. Email Inactive Users 1.1  July 15, 2014, 02:10:39 PM [ Uninstall ] [ List Files ] [ Delete ]
70. Similar Topics 0.6  July 15, 2014, 03:08:26 PM [ Uninstall ] [ List Files ] [ Delete ]
71. Custom Pages and Tabs (2) SMF 2 - RC3 1.1  July 15, 2014, 06:06:40 PM [ Uninstall ] [ List Files ] [ Delete ]
72. Add [li] Button 1.0  July 24, 2014, 05:49:39 PM [ Uninstall ] [ List Files ] [ Delete ]
73. Multiple QA support 1.0.1  July 24, 2014, 05:53:51 PM [ Uninstall ] [ List Files ] [ Delete ]
74. Add Honey Pot to Track IP 1.1  August 04, 2014, 03:56:46 PM [ Uninstall ] [ List Files ] [ Delete ]
75. Misc Anti Spam 1.0  August 04, 2014, 04:00:43 PM [ Uninstall ] [ List Files ] [ Delete ]
76. Stop Forum Spam 1.0  August 04, 2014, 04:06:56 PM [ Uninstall ] [ List Files ] [ Delete ]
77. Word Censor List 1.1  August 04, 2014, 06:29:11 PM [ Uninstall ] [ List Files ] [ Delete ]
78. Better Profile Menu 1.2  August 06, 2014, 06:29:50 AM [ Uninstall ] [ List Files ] [ Delete ]
79. Personalized BBC 1.5  August 06, 2014, 06:46:24 AM [ Uninstall ] [ List Files ] [ Delete ]
80. Prevent Topic View Increase by Author 1.0  August 06, 2014, 06:51:58 AM [ Uninstall ] [ List Files ] [ Delete ]
81. Confirmation message to Mark as Read 1.00  August 06, 2014, 06:53:27 AM [ Uninstall ] [ List Files ] [ Delete ]
82. Add [nobbc] button 1.1  August 06, 2014, 06:58:31 AM [ Uninstall ] [ List Files ] [ Delete ]
83. Admin Ban Button in Post 3.0  August 06, 2014, 07:38:48 AM [ Uninstall ] [ List Files ] [ Delete ]
84. Change All Subjects 1.3  August 06, 2014, 07:46:52 AM [ Uninstall ] [ List Files ] [ Delete ]
85. Drafts 2.0.5  August 06, 2014, 08:23:17 PM [ Uninstall ] [ List Files ] [ Delete ]
86. Minimum Characters for Search 1.2.1  August 06, 2014, 08:43:28 PM [ Uninstall ] [ List Files ] [ Delete ]
87. Order Stickied Topics 1.01  August 06, 2014, 09:38:34 PM [ Uninstall ] [ List Files ] [ Delete ]
88. Referrals System 3.1  August 06, 2014, 09:45:02 PM [ Uninstall ] [ List Files ] [ Delete ]
89. Annoy User 1.2.4  August 06, 2014, 11:24:46 PM [ Uninstall ] [ List Files ] [ Delete ]
90. Restrict Email Providers on Registration 1.2  August 06, 2014, 11:40:08 PM [ Uninstall ] [ List Files ] [ Delete ]
91. Groups See Hidden Users 1.0  August 06, 2014, 11:51:30 PM [ Uninstall ] [ List Files ] [ Delete ]
92. BBC In Custom Title 2.0r2 - SMF 2.0.x  August 07, 2014, 12:08:24 AM [ Uninstall ] [ List Files ] [ Delete ]
93. Integration Hooks Report 1.5.3  August 07, 2014, 10:03:01 PM [ Uninstall ] [ List Files ] [ Delete ]
94. Lazy Admin Menu 1.6  August 22, 2014, 12:11:19 AM [ Uninstall ] [ List Files ] [ Delete ]
95. Member Color Link 3.1  August 22, 2014, 05:45:11 PM [ Uninstall ] [ List Files ] [ Delete ]
96. Invitation Message In Your Face (IMIYF) 0.3.2  August 22, 2014, 05:47:50 PM [ Uninstall ] [ List Files ] [ Delete ]
97. Google Wallet Subscriptions 1.0.3.2  August 27, 2014, 02:18:14 AM [ Uninstall ] [ List Files ] [ Delete ]
98. Additional Topic Authors 0.1.1  August 28, 2014, 05:28:21 PM [ Uninstall ] [ List Files ] [ Delete ]
99. Rank Image Drop Down 1.0  August 29, 2014, 04:56:55 PM [ Uninstall ] [ List Files ] [ Delete ]
100. Buddies List 1.0.1  August 29, 2014, 06:05:11 PM [ Uninstall ] [ List Files ] [ Delete ]
101. Enhancements to reattribute posts 1.5.6  August 30, 2014, 08:26:35 PM [ Uninstall ] [ List Files ] [ Delete ]
102. Moderator and Administrator Comment Tags 1.8.1  September 03, 2014, 05:11:24 PM [ Uninstall ] [ List Files ] [ Delete ]
103. SA Chat 0.1.4 Rev105  September 03, 2014, 08:45:49 PM [ Uninstall ] [ List Files ] [ Delete ]
104. Sisyphus 1.0  September 04, 2014, 07:55:40 AM [ Uninstall ] [ List Files ] [ Delete ]
105. Login Detector 1.0  September 05, 2014, 06:06:20 AM [ Uninstall ] [ List Files ] [ Delete ]
106. LUP: Logout Under Profile 1.0.0  September 05, 2014, 06:22:32 PM [ Uninstall ] [ List Files ] [ Delete ]
107. Spoiler BBCode 1.1.3  September 11, 2014, 08:21:22 PM [ Uninstall ] [ List Files ] [ Delete ]
108. Hide PM Text in Email Notifications 1.0  September 13, 2014, 06:03:20 PM [ Uninstall ] [ List Files ] [ Delete ]
109. Users mass actions 0.1.1  Today at 12:17:50 AM [ Uninstall ] [ List Files ] [ Delete ]
110. Yellow: Highlight Package On Hover 1.1.0  Today at 03:09:55 AM [ Uninstall ] [ List Files ] [ Delete ]
111. Group Key Order and Style 1.1  Today at 06:14:02 PM [ Uninstall ] [ List Files ] [ Delete ]


Thanks for any help you can provide and sorry if we will discover that is not being a bug, even if IMHO it is... Ah yeah, almost forgot, using the default theme and utf-8 language. :)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Kindred

#1
Well, since it does not happen on every forum... And definitely does not happen on a unmodified 2.0.8 installation, it is not actually an smf bug and is most definitely related to one or more of your mods or themes...

As such, moving to support rather then bug reports.
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Ninja ZX-10RR

Quote from: ♦ Ninja ZX-10RR ♦ on September 16, 2014, 12:32:57 PM
using the default theme
Definitely not theme though.
Like I said there was not a real day when it started to happen and also it happens in actions that are not affected by any mods (such as removing a package from the package manager...No mods affected that function) so I am not entirely sure about that. But anyway, I'm waiting for some good soul to have a look since looking at older topics I couldn't find a real solution in any of them...
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Hj Ahmad Rasyid Hj Ismail

I was thinking that it could be coming from some other files and not from Load.php since only a few make direct modifications to it. Again, this is just a guess and I may be wrong. Anyway, just to confirm, is your template evaluation disabled? If I remember correctly, error can sometimes points to wrong file if it is enabled.

Ninja ZX-10RR

I think it didn't make a difference because I was keeping it disabled since it wasn't making a difference... At the time of the report it was enabled but at the time of the other errors it used to be disabled, I am 99% sure of it.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Hj Ahmad Rasyid Hj Ismail

Downloaded the Load.php and find that the said line 2341 is the same as default in line 2046. Try to shortlist mods that use or change actual theme directory.

Ninja ZX-10RR

None of them since I use default theme...
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Hj Ahmad Rasyid Hj Ismail

Default theme can be one of the "actual theme" in use IMO.

Ninja ZX-10RR

Well it's the ONLY one available since users are not allowed to switch between themes...
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Hj Ahmad Rasyid Hj Ismail

Quote from: ahrasis on September 16, 2014, 01:26:03 PM
Again, this is just a guess and I may be wrong.

I am with Kindred and I definitely don't think it is coming from SMF software. The only possibilities left is your mods but you have to narrow it down yourself. I won't go deep for that as I was only trying to help you nail it down based on your given facts. We may also have some sort of language barrier here and as such, I couldn't make it clearer for you. So, may be you can just wait for others to help you with this. Good luck in solving the issues. I'll only be watching from now on. ;)

Ninja ZX-10RR

:'( I am clueless on this, that's why I posted... Thanks for the help anyway, still unsolved, waiting for more people to join the discussion :(
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Night09

Try adding the following to index.english.php in the languages folder

$txt['actual_theme_dir'] = 'Actual theme Directory';

Text may be wrong as I dont know what it relates too but it appears its looking for something not there so worth a try.

Arantor

It's not related to a txt string. It's looking for a $settings entry.

I've seen this before, usually on themes that aren't set up properly internally but I've never been able to definitely nail it down before.

Easy fix:
Code (find) Select
$language_directories = array(
$settings['default_theme_dir'] . '/languages',
$settings['actual_theme_dir'] . '/languages',
);


Code (replace) Select
$language_directories = array(
$settings['default_theme_dir'] . '/languages',
);
if (!empty($settings['actual_theme_dir']))
$language_directories[] = $settings['actual_theme_dir'] . '/languages';


Could even roll that into the base distribution to prevent this being an issue in future. (This has been done already in 2.1, and I know this because I did it albeit slightly differently there. This commit for the curious.)

Ninja ZX-10RR

Of course comes Arantor and fixes it in a minute... Thanks once again :D marking it as solved for now. I will unmark and post again if that happens again but I don't think so..
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Hj Ahmad Rasyid Hj Ismail

$txt['actual_theme_dir'] is actually used and defined in Theme template and language. But that is not the case anyway.

My understanding - Default theme is always there as a backup if you use other theme as actual theme. Default theme therefore is the actual theme when there is no others.

By the given code, it is suggested that only when your actual theme directory is not empty then the actual theme directory will be used. Meaning, if you are using default, it is suggested that sometimes your default theme is not considered as actual theme where as IMO it should be.

A deeper look is needed to your mod(s) and Load.php file. For instance, your Load.php is actually missing some code most probably due to mod(s). Here is one of them:

// Write the file.
if (function_exists('file_put_contents'))
{
$cache_bytes = @file_put_contents($cachedir . '/data_' . $key . '.php', $cache_data, LOCK_EX);
if ($cache_bytes != strlen($cache_data))
@unlink($cachedir . '/data_' . $key . '.php');
}
else
{

The original code for this part is:

// Otherwise custom cache?
else
{
if ($value === null)
@unlink($cachedir . '/data_' . $key . '.php');
else
{
$cache_data = '<' . '?' . 'php if (!defined(\'SMF\')) die; if (' . (time() + $ttl) . ' < time()) $expired = true; else{$expired = false; $value = \'' . addcslashes($value, '\\\'') . '\';}' . '?' . '>';
// Write the file.
if (function_exists('file_put_contents'))
{
$cache_bytes = @file_put_contents($cachedir . '/data_' . $key . '.php', $cache_data, LOCK_EX);
if ($cache_bytes != strlen($cache_data))
@unlink($cachedir . '/data_' . $key . '.php');
}
else
{
// Write the file.
if (function_exists('file_put_contents'))
{
$cache_bytes = @file_put_contents($cachedir . '/data_' . $key . '.php', $cache_data, LOCK_EX);
if ($cache_bytes != strlen($cache_data))
@unlink($cachedir . '/data_' . $key . '.php');
}
else
{
$fh = @fopen($cachedir . '/data_' . $key . '.php', 'w');
if ($fh)
{
// Write the file.
set_file_buffer($fh, 0);
flock($fh, LOCK_EX);
$cache_bytes = fwrite($fh, $cache_data);
flock($fh, LOCK_UN);
fclose($fh);

// Check that the cache write was successful; all the data should be written
// If it fails due to low diskspace, remove the cache file
if ($cache_bytes != strlen($cache_data))
@unlink($cachedir . '/data_' . $key . '.php');
}
}
}
}
}


Your code for this part is:
// Otherwise custom cache?
else
{
if ($value === null)
@unlink($cachedir . '/data_' . $key . '.php');
else
{
$cache_data = '<' . '?' . 'php if (!defined(\'SMF\')) die; if (' . (time() + $ttl) . ' < time()) $expired = true; else{$expired = false; $value = \'' . addcslashes($value, '\\\'') . '\';}' . '?' . '>';
// Write the file.
if (function_exists('file_put_contents'))
{
$cache_bytes = @file_put_contents($cachedir . '/data_' . $key . '.php', $cache_data, LOCK_EX);
if ($cache_bytes != strlen($cache_data))
@unlink($cachedir . '/data_' . $key . '.php');
}
else
{
$fh = @fopen($cachedir . '/data_' . $key . '.php', 'w');
if ($fh)
{
// Write the file.
set_file_buffer($fh, 0);
flock($fh, LOCK_EX);
$cache_bytes = fwrite($fh, $cache_data);
flock($fh, LOCK_UN);
fclose($fh);

// Check that the cache write was successful; all the data should be written
// If it fails due to low diskspace, remove the cache file
if ($cache_bytes != strlen($cache_data))
@unlink($cachedir . '/data_' . $key . '.php');
}
}
}
}


I do not know whether it is related or not. But replacing your undefined_index_error Load.php where some code are missing with the code from default may help in narrowing down IMO. Again, I could be wrong but if you can, compare your Load.php with default and fill in the missing code.

Ninja ZX-10RR

No way! That file has been edited if I just "fill it" it will break a lot of things, and that is not a guess, it's for sure. It has been edited by all of those mods and I am happy as it is now, looking at Arantor's fix (despite my limited knowledge of .php) it should work to avoid that error being shown in the error log. As regards the reason of it I have no clues as stated many times before, also it is not affecting any function so just not showing the error is fine since it doesn't affect anything :)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Hj Ahmad Rasyid Hj Ismail

You stated that it starts by "removing an uninstalled package from mods list and this time was accessing mods settings, but it happened with more things", so IMO something that was changed definitely is causing this error. Since you firstly posted this as a bug, I am more interested in finding the real cause of the problem.

But I guess that it is not urgent nor important to you anymore. Sorry, if I did bother you with suggestions to find its real cause and proper solution as I was thinking you were interested in it. Anyway, so long that permanently fixed what is broken and you are happy with it, I guess it should be fine.

Again, I could be wrong. ;)

Ninja ZX-10RR

You are only wrong when you say that I am not interested into it ;) I do am interested into it but if a solution has been found I take it as solved :) I am still wondering why it happened though, it happened with total random actions (including seeing the logs and logging out once) that it made me think more about a bug rather than a problem with a mod since a mod could affect an action or a few actions, not such a wide range of actions... But since there was not a "start" for this bug nor an action that took place before it started and that it happened *that* randomly I can't help it much better than this anyway :/
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Arantor

QuoteMy understanding - Default theme is always there as a backup if you use other theme as actual theme. Default theme therefore is the actual theme when there is no others.

Yes, but actual_theme_dir is also sometimes used. It's also sometimes not. To the point where it can manifest undefined.

Technically, default theme should be the very very last line of defence for this stuff, and actual_theme_dir should be applicable if you have a theme based on another theme (in theory, it's complicated) so the idea is that you check that second and load the language file from it so the default theme doesn't override it. It is more likely an SMF bug than anything else. SMF does in fact have bugs occasionally.

Regarding the cache code, there is no problem with this and it is not mod related but a human error discrepancy between 2.0.7/8 patching and 2.0.7/8 full install. It is of no concern.

Ninja ZX-10RR

Well I am glad that you call it a bug because I couldn't describe it in any other words.. I don't know if Kindred wants to put it back in bugs since from what we could see it is a bug (unfortunately) :/
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Advertisement: