"You are unable to connect to simplemachines.org's latest news file."

Started by Johnnymushio, June 23, 2011, 04:06:29 AM

Previous topic - Next topic

Johnnymushio

I have looked for over an hour for the database error log with no luck.

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

TuxDK

Don't know about the original poster, but it's still a problem for me at least.
It's been a problem since upgrading to 2.0, wasn't a problem in 1.5.x.

awolexpat

TuxDK,
I don't know if this will help you, but I had the same issue and fixed it by looking at Admin>Configuration>Languages - I had originally changed (in SMF 1.x.x) my language to English.British-utf8, but when i looked (recently some time after upgrading to 2.0 and 2.0.1) this had disappeared and for some reason Russian had appeared, along with English. I would suggest that you check your language files and make sure they are as you want them; once I uploaded the file I wanted and deleted Russian, and selected my language I was able to access the SMF files. I hope this works for you and the countless others I have heard this problem from.

TuxDK

awolexpat,

I appreciate the advise, but I didn't seem to have any problems with my language file.
I tried updating my english language file, but no result.

BTDSoft

I had the same issue with a 2.0.2 upgrade recently.

I determined first that mysql table "smf_admin_info_files" had not been created for some reason. I first attempted to track down this info and create the table. This had the same results.

What I did do that fixed it was install smf again in another directory, which did create the table and info files, which I simply imported into the existing database on the failed upgrade / install.

This fixed the "unable to connect" problem.

Hope it helps someone else.
hxxp:www.btdsoft.com [nonactive]|hxxp:www.cometomissouri.com [nonactive]|hxxp:www.btdsoft.com/forum/ [nonactive]

NightWolve

I'd like to add some solutions to this problem to help others should they encounter it.

I started triggering this error with SMF 2.0.18 recently while making changes to the custom theme. I then noticed if I switched to the default SMF theme it worked again. It's by that experience I tracked down what the problem was.

Simply adding an onload event to your body tag in HTML breaks the Live announcements Admin panel.

E.g. <body onload="Initialize();">

Solutions / Workarounds ?? There are several.

1) In your custom theme's "index.template.php" file, when printing the body tag add a condition for admin pages:

if ( isset($_GET['action']) && $_GET['action'] == 'admin' )
echo '<body>';
else
echo '<body onload="Initialize();">';


2) For some reason, if you instead use JavaScript to setup a function to be executed by the onload event, it will also avoid this problem:

window.onload = new function() {Initialize();}

3) There is a 3rd option, to explicitly call the function that refuses to execute by default when an object is created. In the default theme, find file "Admin.template.php" and the end of the "template_admin()" function, it's the first function in 2.0.18. Right at the very end of the JavaScript, before "// ]]></script>';" you can make an explicit call to the needed function to make sure the live news is loaded.


Find: "// ]]></script>';"
AddBefore:

oAdminIndex.loadAdminIndex();
// ]]></script>';"


When "var oAdminIndex = new smf_AdminIndex(...)" is executed, the function loadAdminIndex(); is also executed as an object initialization method, but when you add '<body onload="Initialize();">' it just doesn't work like that anymore.

So this solution/workaround at best will cause 2 live news loads, and probably will more guarantee other weird JavaScript changes don't affect it. Well, that's the best I can do to explain my findings, good luck!



Advertisement: