News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Bridge 1.1.4/Joomla 1.08 and IE/database problem

Started by Conflagrant, April 23, 2006, 04:56:00 PM

Previous topic - Next topic

Conflagrant

First of all many thanks for the effort that has gone into developing this software.  I am a web development newb and have learnt much over recent months but there is an issue with the installation of the bridge that has me beat, at least at present.

Before installation my site validates and is error/warning free both in Joomla and in the unwrapped SMF forum.  I can install the bridge with no apparent problem and in Firefox all appears to be OK.  Yet when I checked the forum page in IE the page reloads several times and refuses to display the main menu module, or in fact any module that is listed on the left hand side of the page.  In IE I also lose my width/font size changer that came with the SIMPLICITY theme from Joomlashack.  When I tried validating the page it returns three errors (plus some warnings) that relate to a database error.

</html><!-- 1145818320 -->Database Error: Table 'davef_joom1.smf_sessions' doesn't exist<br />File: /home/davef/public_html/forum/Sources/Load.php<br />Line: 1902

hxxp:capesandcowls.info/component/option,com_smf/Itemid,70/ [nonactive]   (bridge set to wrap SMF)

Any ideas how I can fix this so that my bridge works and IE will display the page?

I am using:

Joomla 1.08
SMF 1.1 RC2 (with recent patch)
Bridge version 1.1.4
OpenSef (RC4)
SEF urls enabled in Joomla and SMF
Compression is only enabled in Joomla
Relevant access permissions were set to 777

Joomla and SMF are installed in separate databases but I believe that I have made the necessary links between the Joomla and SMF.

I cannot think of anything else relevant to add.  I will leave the site up in its present state in the hope that someone may be able to find out what is causing this and help me to sort it out. 

Here is to hoping that it is something simple that is wrong (probably something I did in my newbie state of ignorance/bliss).

Best wishes

Update:  Most of the previous was as true of bridge 1.1.3 as it is of this version.  However, shortly before posting I decided to check a few things out to see if I could sort it out on my own.  Unfortunately I now cannot log into the administrator module in Joomla to edit my site at all.  When I try to log in I am told "You cannot login.  There are no administrators set up".

This is a new problem that never occurred before with 1.1.3.

It looks to me like a call to my host to restore a backup is imminent unless, of course, you know different!   ;)

Any help would really be appreciated.
hxxp:capesandcowls.info [nonactive]

Orstio

#1
Do you have compressed output turned on in SMF?

QuoteUpdate:  Most of the previous was as true of bridge 1.1.3 as it is of this version.  However, shortly before posting I decided to check a few things out to see if I could sort it out on my own.  Unfortunately I now cannot log into the administrator module in Joomla to edit my site at all.  When I try to log in I am told "You cannot login.  There are no administrators set up".

It looks as if you have either deleted your super administrator, or made your super administrator something less than administrator.  This is easily done in the group synch if you change the synching options. 

I could fix it in a few seconds, but it appears that nobody so far has had the patience to walk through the process of fixing it while I instruct.  :-\

QuoteWhen I tried validating the page it returns three errors (plus some warnings) that relate to a database error.

This is minor, and the fix for it is included in the readme.html that comes with the bridge.

Also, OpenSEF is not 100% compatible with the bridge. 

Conflagrant

#2
Thank you for a very quick response.  I will admit to seeing that you were online and that I was feeling hopeful.   ;D 

To address your points:

QuoteDo you have compressed output turned on in SMF?

No, it is only enabled in Joomla.  From a previous post/FAQ I thought that to do otherwise caused problems.

QuoteIt looks as if you have either deleted your super administrator, or made your super administrator something less than administrator.  This is easily done in the group synch if you change the synching options.

I could fix it in a few seconds, but it appears that nobody so far has had the patience to walk through the process of fixing it while I instruct.  Undecided

I changed no settings in group synch as I was happy from 1.1.3 that the defaults were appropriate for my use.  When I pressed the bottom button (I forget the exact name, my apologies I have been awake a long time now) I got a white screen and the interface hung.  As the database has very few users (delay was unlikely to be computational) I only allowed a minute or so to elapse before pressing back on the browser and trying again.  Is it possible that this has corrupted the users data?

If this is a position that it is possible to recover from I would certainly like to try.  Would it be possible to do this tommorrow as I really need to sleep and also perhaps a fresh mind would be beneficial?



hxxp:capesandcowls.info [nonactive]

Orstio

QuoteIf this is a position that it is possible to recover from I would certainly like to try.  Would it be possible to do this tommorrow as I really need to sleep and also perhaps a fresh mind would be beneficial?

You're in luck -- I don't have to work tomorrow. :)

Conflagrant

Heh!  That's good to hear!

Well here I am, slept and stereo on to help the wake up process...   :) 

As far as I can see I still have some sort of Admin access as I can alter articles on the page but I cannot add new ones because I cannot get into the Admin (Joomla) back end.  Access to the SMF Admin is still available too. 

Maybe I have this wrong but is the reason that I cannot get into Joomla due to the presentation of the Joomla login module if direct admin access is used  (via /root/administrator) ?  I assume this module is now disabled once the bridge is enabled.  Unfortunately there isn't another page link enabled to get to the back end and I am a Joomla newb so I don't know another way of getting into the actual back end (add modules etc).  Maybe nothing needs fixing, just another method access needs to be found?

Also the webpage direct after login says that the the page does not exist, but I suspect that this is another separate issue.
hxxp:capesandcowls.info [nonactive]

Orstio

Would you prefer I instruct you, or would you prefer to give me access to PhpMyAdmin?

Conflagrant

If you instruct, I learn something.  If you do it, it gets done faster...and more importantly correctly!  Hmmm.  What a choice! lol

I think I will PM you details as I don't want to take up your time unnecessarily.
hxxp:capesandcowls.info [nonactive]

Orstio

#7
Since you haven't provided login details I can use, I am going to assume you'd rather be instructed?

Go to PhpMyAdmin.  Go to your jos_users table.

Find your username in the list.  If it's the admin with which you set up Joomla, it should be the first row.

Find the corresponding value in the "name" column for that row, and post that name here.


Alright, thank you.  You have two users with the name "Dave".  Which would you like to keep?

Conflagrant

My apologies.  I closed the window but hadn't logged out.  The details will work now.   :-[

However, I shall do as you asked and go into sql now...

The corresponding name is "Dave" and it occurs twice btw.
hxxp:capesandcowls.info [nonactive]

Orstio

#9
OK, you should be able to login to your Joomla admin panel now.

I strongly suggest you either get rid of, or rename, one of those "Dave"s.  Having two users with the same name can be problematic.

QuoteSEF urls enabled in Joomla and SMF

You are going to have to turn off SEF in SMF.  Let Joomla handle the SEF.

Conflagrant

OK.  I can indeed login to the Joomla backend again.  Thank you.

The dual instance of "Dave" has been corrected (renamed).

SEF was not enabled in SMF when I just checked, nor was OpenSEF.  I assume this is something that you did?

The forum displays fine in Firefox, names as it should etc.  It even works with OpenSEF enabled (though not if you use the component alias feature).  Thus I can have OpenSEF for the rest of the site and not for the forum...something that I could definitely live with ;)

Thing is though, in IE the page reloads endlessly with any of these options.  I am no fan of Microsoft but I have to be realistic and cater for the ordinary browsing public that think any product by Bill Gates is a "must have".  God help us all when IE 7 hits.  :P 

Relating to this, the login module for the bridge does not display at all in IE despite the fact that it displays fine in Firefox.  Any ideas?  It looks to my newbie eyes just that IE has gone into quirks mode due to the database errors that it is seeing and this is breaking the CSS, which causes it to ignore the other modules present (most notably the login module).

As I said before, unless you of course know different! lol

Many thanks for the time you have spent on this.
hxxp:capesandcowls.info [nonactive]

Conflagrant

Just a thought, feel free to ignore this but... 

Can you point me to an area to explore to see if I can fix this myself?  I don't know if this would be productive as my knowledge is limited but at least I would feel I was contributing. lol

I figure that the present colour scheme alone must be enough to give you a headache never mind the code issues!   :P 

(As it is a comics/superhero site the colours were a deliberate choice btw, I am not colour blind!   :D  I will do a more adult orientated scheme and a switcher as soon as I get a chance).
hxxp:capesandcowls.info [nonactive]

Orstio

I'm sorry.  You have so many modules, bots, and components installed, it is impossible to tell what is interacting with what. 

It would take me hours to go through your site, and I would probably end up uninstalling most of your bots and modules.

Conflagrant

#13
OK, many thanks for the time you have already spent on this.  I do appreciate it even though I am a little disappointed that this issue cannot yet be resolved. (May IE be cursed, and all those that use it!   :P).

As I have a Javascript project to cobble together before Wednesday I will have to leave it alone myself shortly and go back to a non integrated solution for the time being.  If at some point I work out what is breaking IE so wonderfully well I will of course post back here.

One last question before I do leave this alone:

Can I get rid of this error message?

Database Error: Table 'davef_joom1.smf_sessions' doesn't exist
File: /home/davef/public_html/forum/Sources/Load.php
Line: 1902


This code is something to do with a function in SMF:

function sessionWrite($session_id, $data)
{
global $db_prefix;

if (preg_match('~^[A-Za-z0-9]{16,32}$~', $session_id) == 0)
return false;

// First try to update an existing row...
$result = db_query("
UPDATE {$db_prefix}sessions
SET data = '" . addslashes($data) . "', last_update = " . time() . "
WHERE session_id = '" . addslashes($session_id) . "'
LIMIT 1", __FILE__, __LINE__);  //this is the listed line 1902 where it registers the error

// If that didn't work, try inserting a new one.
if (db_affected_rows() == 0)
$result = db_query("
INSERT IGNORE INTO {$db_prefix}sessions
(session_id, data, last_update)
VALUES ('" . addslashes($session_id) . "', '" . addslashes($data) . "', " . time() . ")", __FILE__, __LINE__);

return $result;

As I am a PHP newb I think I shall leave this alone (at least for a few weeks :) ) but maybe someone will have a clue what this means.

I have tried the page in Opera and it functions correctly but this text remains at the bottom of the page.  My guess remains that whatever is causing this error is also what is causing IE the problems too.  Firefox and Opera seem to know that this is present but work around it.  IE just throws its dummy out of the pram! 

Anyone out there an IE buff?  Is this just a "quirks mode" thing or do I have it wrong (highly likely!)?

Even if I cannot stop the error can I stop it from forming on the page?  Can this bit of code just be commented out (the dirty hack solution) or will it break things badly?  If it can't be commented out (which I sort of suspect) can anyone with some PHP knowledge rewrite it so that I don't get the error?  At the present time this is beyond me, else I wouldn't ask.  (I hadn't even heard of PHP until about 6 weeks ago).
hxxp:capesandcowls.info [nonactive]

Orstio

You can fix it with something from the readme.html (Again):

QuoteWith some Joomla templates, you may end up with this error appearing at the bottom of the page:

Database Error: Table 'db_joomla.smf_sessions' doesn't exist
File: /home/user/public_html/joomla/forum/Sources/Load.php
Line: 1886
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

If that happens, please add this to the bottom of your Joomla template:
<?php mysql_select_db($GLOBALS['db_name']); ?>

Conflagrant

WOOHOO!   :D

I tried that piece of code while I was using the other bridge (1.1.3) and I received a blank page for my troubles, so I didn't think to try it again.  I cut and pasted it, so no typos, but it didn't work.  No clue why.  With this version/setup whatever it worked a treat.  Thank you very much.

The page now renders correctly in IE and guess what?  No more endless page reloads.  Everything appears to be working correctly and at the moment even my funky "four colour comic book" colour scheme looks good to my eyes!   ;)

For the benefit of any other code newbies like myself:

Sometimes searching these forums can be confusing as people here have a real variety of knowledge.  The error code that is being discussed here is actually hidden in Firefox, causes endless refreshes in IE, displays at the foot of the page in Opera, is unreported by Doctor Watson online and is mentioned as a formatting error in the W3C online validator.

The code goes into your active theme folder in the theme template (probably called "index.php") before the final tags:

</body>
</html>


so it looks like..

<?php mysql_select_db($GLOBALS['db_name']); ?>
</body>
</html>

when completed.

Another poster here once mentioned the importance of having pages that validate properly if you are having difficulties.  I wish I could remember who that was...

My apologies if this last paragraph seems obvious to you, but I hope that it helps someone somewhere.

And finally many, many thank to you Orstio for "holding my hand" through all this.  Especially for restoring my access to the Joomla Admin!  You saved me a tenner for a backup restore so if you have a PayPal account I'll split it with ya and we can both have a beer on me!   8)
hxxp:capesandcowls.info [nonactive]

Advertisement: