README says:
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']); ?>
Now, I'm baffled by this. The bottom of my Joomla Template? Can someone spell out what that explicitly means, please? What file/dir or whatever are we talking about? Thanks.
in your joomla/templates/templatename/index.php file
(i.e. the joomla template)
Alternatively, you can go to your Joomla admin panel, Site menu -> Template Manager -> Site Templates.
Click on the name of the template(s) with green arrows next to them in order to edit them, and then add the code above in the appropriate location in the textarea.
I've added this code to the bottom of my joomla template:
<?php mysql_select_db($GLOBALS['db_name']); ?>
For some reason the following error is still showing up, but only on the homepage:
Database Error: Table 'myaccount_db.smf_sessions' doesn't exist
File: /home/myaccount/public_html/smf/Sources/Load.php
Line: 2005
Is there anything else that might be causing this error?
Does your Joomla database user have access to your SMF database?
by the way are there any advantages or disadvantages to having both joomla and smf installed in a single database other than for organizational purposes?
If you have a fairly small site, one database would be preferable. That way, you only have one database backup to deal with, and on a small site, the backup file will be relatively small as well.
On a larger site with lots of activity, however, two databases would be preferable. Not only does it keep things more organized, but it will keep your backups separate. On large sites, the database backup files can be huge, and having SMF and Joomla in the same database can make it unmanageable.
Yeah. That's why I decided to go with two databases. I wasn't sure if there would be any performance advantages either way.
Another strange thing is that this bit of code is showing up in the left sidebar for my site, even when I have the SMF login unpublished and on pages that do not have any SMF content:
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_formSubmitted;
function submitonce(theform)
{
smf_formSubmitted = true;
}
function send_form(form_id)
{
document.getElementById(form_id).submit();
}
function submitThisOnce(item)
{
// Hateful, hateful fix for Safari 1.3 beta.
if (navigator.userAgent.indexOf('AppleWebKit') != -1)
return !smf_formSubmitted;
for (var i = 0; i < item.form.length; i++)
if (typeof(item.form[i]) != "undefined" && item.form[i].tagName.toLowerCase() == "textarea")
item.form[i].readOnly = true;
return !smf_formSubmitted;
}
// ]]></script>
For some reason it seems to be causing some display errors for the left sidebar in IE7 only in the Gallery section, but only when a user is logged in. There are no display errors in Firefox or Opera. So many little bugs :P
Can I see a URL?
http://themebot.com/gallery/
the center column overlaps the left column a bit in IE7 when a user is logged in. there is no overlap otherwise.
I'm using IE7, and I don't see anything wrong at all.
I haven't logged in yet, but I do suspect it may have something to do with the discussbot.
I don't have discussbot published. You should see what i'm talking about if you log in. That is the only time it is visible.
I'm logged in now, and I still don't see anything wrong.
Then center column doesn't overlap the border on the left modules in http://themebot.com/gallery/
?
I just tried it on another computer with IE6 and I see this.
Also, that bit of javascript code I posted earlier is from the discussbot. Come to think of it, i'm pretty sure i started seeing problems after installing that. But i'm not sure if the database error was there or not. I just might not have checked it on the homepage.
Anyways, the discussbot was deleted and then completely removed via FTP. That's no good that it left remnants of code floating around. I need to find where that is located and delete it.
The issues I was having with this are solved. Something went haywire with an installed module. I reverted to a backup from a couple days ago and everything is working properly now. No more database error, although the strange display error in Internet Explorer for the Gallery section still remains. I think it may be related to this hack which was needed to get the Gallery bridge working:
http://www.simplemachines.org/community/index.php?topic=83665.msg577929#msg577929
I get the same error if I install the smf.discussbot. I've just tried 4.2b1 with Joomla 1.0.12, smf 1.1.2, bridge just upgraded to 1.1.7. If I unpublish the bot it doesn't help - I have to uninstall it.
I added the code to the bottom of the site template - both above & below the closing body tag but it doesn't make any difference.
Copy the EXACT erro you get and paste it here. I'll bet the "smf_" part is missing.
Hi Oristo,
You're right! The error is (path changed):
Database Error: Table 'site_joomla.sessions' doesn't exist
File: /home/site/public_html/forums/Sources/Load.php
Line: 2022
This is without the bot even being published - which has no effect on the error. It also doesn't make any difference whether or not the code block (below) is in the Joomla template or not.
The enf of my Joomla template (sample_longgray) is:
</body>
<!-- SMF Bridge -->
<?php mysql_select_db($GLOBALS['db_name']); ?>
<!-- SMF Bridge -->
<!-- SMF Discuss Bot -->
<?php
ob_start('output');
$buffer = ob_get_contents();
ob_end_clean();
$buffer = str_replace('<input type="hidden" name="sc" value="" />'
,'<input type=hidden name="sc" value="'.$sc.'">', $buffer);
echo $buffer;
?>
<!-- SMF Discuss Bot -->
</html>
The only way to remove the error is to uninstall the bot.
I don;t know if this is relevent: the Joomla database prefix is the default jos_, but the smf prefix is forums_, and not the default smf_.
Mike
Install the bot.
Go to the Mambots menu in your Joomla admin panel. Click on Site Mambots.
Find the smf.discussbot in the list of bots. It might not be on the first page. When you find it, click on it.
Look on the right hand side of the page for the parameters. In those parameters, you will see two fields for inputting the SMF database name and database prefix. You will need to enter values into those fields.
Ah! That's fixed it!
Can I suggest adding this to the readme - I completely missed it, assuming that it would be picked up from the SMF or bridge, which is probably asking too much because you aren't going to know where they are.
It also gave me the tip to find the missing comment icon - my joomla lives in a sub-directory of the site root, so I needed to add that to the start of the path.
While on the subject of settings (should I open new topics for these questions?) - how do you point the discussion to child boards - I have two boards called Discussion, one General, and the other Technical. How do I select a specific one. Can I also point to an existing board and topic? Can the number of words to be quoted be set to "up to", so a short article doesn't get a 700 letter quote but just the number of letters it contains?
Thanks for your quick replies and constant help.
Mike
QuoteCan I suggest adding this to the readme - I completely missed it, assuming that it would be picked up from the SMF or bridge, which is probably asking too much because you aren't going to know where they are.
This may already be a part of the instructions for the bot. I'm not certain as it's a GPL product, maintained mostly by Chadness.
QuoteWhile on the subject of settings (should I open new topics for these questions?) - how do you point the discussion to child boards - I have two boards called Discussion, one General, and the other Technical. How do I select a specific one.
I believe if you are using discussbot 4.2b1, you can specify by board id number rather than board name by selecting that in the parameters.
QuoteCan I also point to an existing board and topic?
Only if the topic has exactly the same title as the content item.
QuoteCan the number of words to be quoted be set to "up to", so a short article doesn't get a 700 letter quote but just the number of letters it contains?
Just set the value larger in the parameters. It can quote as large as any post in SMF can be made.
QuoteQuoteCan I suggest adding this to the readme - I completely missed it, assuming that it would be picked up from the SMF or bridge, which is probably asking too much because you aren't going to know where they are.
This may already be a part of the instructions for the bot. I'm not certain as it's a GPL product, maintained mostly by Chadness.
I looked there before posting. Hopefully Chadness keeps an eye on here and picks this up for the next version.
Quote...you can specify by board id number rather than board name by selecting that in the parameters.
I was hoping for a way to do this in words. The board numbers show as 3.0, 5.0, etc - I guess board.child_board? It would be nice to go General.Discussion - maybe a problem if spaces in the name though.
QuoteQuoteCan I also point to an existing board and topic?
Only if the topic has exactly the same title as the content item.
Shame. I have a couple of articles about the same overall subject and it would be nice to collate all comments into a single thread. From what you've said I've managed to link an existing thread to an article in Joomla - thanks. Unfortunately I can't link another article to the same thread. Chadness - next version?
QuoteCan the number of words to be quoted be set to "up to", so a short article doesn't get a 700 letter quote but just the number of letters it contains?
I meant, it's fine if the article is 700 characters long (the default quote limit), it gets truncated at that limit. But if it's less the quote block in the forum gets padded out to what looks like a 700 character block, even if the article only contained a couple of words. Another one for Chadness and the next version.
Thanks for all your help.
QuoteQuote
...you can specify by board id number rather than board name by selecting that in the parameters.
I was hoping for a way to do this in words. The board numbers show as 3.0, 5.0, etc - I guess board.child_board? It would be nice to go General.Discussion - maybe a problem if spaces in the name though.
No, each board id is unique, regardless of whether it is a child board. The format is board.topic ordering start of page. That is, for the first page, a 0, because you want it to start at the beginning, but if you have 20 topics/page, 20 for the second page so that it starts at the 20th topic record selected.
Thanks Oristo.
Not going to help for what I want to do - because the topic is going to move as new topics get added.
What I was hoping for was to specify the category.board.topic, or topic_id, regardless of the topic's title - there could be two boards or topics with the same title, as I have with boards, which you've pointed out how to get around by using board number rather than name. For topics - it finds the newest (nearest the top?), you may (as I do) want two articles with different titles to point to a single topic - I know, I can give them the same name in Joomla.
Okay, I've followed all of the directions I can find in this thread, and I am still getting this error message at the bottom of each of the articles (and the front page) on the site.
Database Error: Table 'myjoomladb.smf_sessions' doesn't exist
File: /home/sitename/public_html/forums/Sources/Load.php
Line: 2056
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0
Everything (the bridge, the discussbot) installed without an error, I modified the index.php as described, and everything appears to be working correctly - it will generate a discussion thread on my 1.1.2 forum. The only problem is that error message at the bottom of the pages.
What else do I need to be looking for to fix this issue?
you know, it might be a module that is causing the problem. i have a module i added on http://themebot.com. you can see the "become a sponsor" module in the right column. in it i have some code that calls on the Jumi mambot. for some reason, when that module is active on the forum, i get the same error. try deactivating modules on the forum page and see if the error goes away. best of luck.
Quote from: undoIT on April 13, 2007, 02:41:56 AM
you know, it might be a module that is causing the problem. i have a module i added on http://themebot.com. you can see the "become a sponsor" module in the right column. in it i have some code that calls on the Jumi mambot. for some reason, when that module is active on the forum, i get the same error. try deactivating modules on the forum page and see if the error goes away. best of luck.
Good idea, but I turned all of them off, and am still experiencing the same problem.
Thanks, though! ;-)
have you logged in to the standalone smf installation without logging out? try logging out all user on both the standalone and the joomla brige. just guessing based on the error message.
Quote from: Caitlain on April 13, 2007, 02:35:21 AM
Okay, I've followed all of the directions I can find in this thread, and I am still getting this error message at the bottom of each of the articles (and the front page) on the site.
Database Error: Table 'myjoomladb.smf_sessions' doesn't exist
File: /home/sitename/public_html/forums/Sources/Load.php
Line: 2056
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0
Everything (the bridge, the discussbot) installed without an error, I modified the index.php as described, and everything appears to be working correctly - it will generate a discussion thread on my 1.1.2 forum. The only problem is that error message at the bottom of the pages.
What else do I need to be looking for to fix this issue?
Does your Joomla database user have access to your SMF database?
Did you enter both the database name and the database prefix for your SMF database in your discussbot params?
Quote from: undoIT on April 13, 2007, 03:28:49 AM
have you logged in to the standalone smf installation without logging out? try logging out all user on both the standalone and the joomla brige. just guessing based on the error message.
Yes.
Quote from: Orstio on April 13, 2007, 06:46:20 AM
Does your Joomla database user have access to your SMF database?
Yes, sir.
QuoteDid you enter both the database name and the database prefix for your SMF database in your discussbot params?
Yes, I did. Am I correct in assuming that, if that were not the case, the discussbot wouldn't be working at all? Like I said, it does function like it is supposed to. The "Discuss this article" appears at the bottom of the articles, and when it is clicked on, it does generate a thread in the appropriate location in the forum itself.
As I remember, I had some problems with the Discussbot as well and ended up having to uninstall it to get rid of the error. Actually, I had to restore a backup of my site, because the database error was still there even after uninstalling the Discussbot. Why don't you list all of the modules and components you have installed. That would help people troubleshoot the problem.
I think I've finished beta 2, which solves the multiple database issues (I hope).
As far as getting multiple topics pointing towards the same topic without giving them the same title, that's not possible with the current design of the bot. Right now, all you specify is the board. It's a good idea for a future addition, though!
I'll also add those instructions you mentioned to beta 2, and I'll give the quote a quick look to see what's wrong with it.
Quote from: undoIT on April 13, 2007, 01:51:05 PM
As I remember, I had some problems with the Discussbot as well and ended up having to uninstall it to get rid of the error. Actually, I had to restore a backup of my site, because the database error was still there even after uninstalling the Discussbot. Why don't you list all of the modules and components you have installed. That would help people troubleshoot the problem.
I am actually leaning toward it not being a module, so much as a database issue. Or, more specifically, a sessions issue.
When I install the discussbot, not only do I get the error mentioned above, but upon logging in, I seem to have issues maintains sessions across any length of time, and the Joomla admin panel appears to be looking for a location to save session information.
The issue is addressed here:
http://www.netregistry.com.au/customer-service/support/scripting/PHP/php_sessions.php
I am waiting on the host I use (that link above is not my host) to send the specific location that I need to plug into that to see if doing what that suggests fixes the issues.
Both issues disappear completely when I uninstall the discussbot, so they appear to be linked in some way.
When will beta 2 be available to play with? ;)
Should be available within the next 24 hours. I added in the ability to specify a board topic as well, because it was actually pretty simple to do.
Chadness,
QuoteI added in the ability to specify a board topic as well, because it was actually pretty simple to do.
Excellent - thanks!
QuoteI'll also add those instructions you mentioned to beta 2, and I'll give the quote a quick look to see what's wrong with it.
Thanks for taking note of the suggestion. Did you manage to fix the quote length for articles of less than the quote limit value?
Quote from: mpetrie on April 13, 2007, 11:41:35 PM
Thanks for taking note of the suggestion. Did you manage to fix the quote length for articles of less than the quote limit value?
That's nothing that the discussbot is doing. All it does is take the exact text of the article and post it as the message. The only thing it adds in is ". . ." and the quote tags. This is the exact line of code:
$message = '[quote]'.substr($row->text,0,$num_chars).'. . .'.'[/quote]';
This part:
substr($row->text,0,$num_chars)
just says take only the first so many characters of the message text.
Quote from: Caitlain on April 13, 2007, 05:28:48 PM
When I install the discussbot, not only do I get the error mentioned above, but upon logging in, I seem to have issues maintains sessions across any length of time, and the Joomla admin panel appears to be looking for a location to save session information.
The issue is addressed here:
http://www.netregistry.com.au/customer-service/support/scripting/PHP/php_sessions.php
I am waiting on the host I use (that link above is not my host) to send the specific location that I need to plug into that to see if doing what that suggests fixes the issues.
Both issues disappear completely when I uninstall the discussbot, so they appear to be linked in some way.
*sigh* I resolved the issue above, but am still getting the error message referenced earlier.
Interestingly, when I have Alikno's "Latest Posts from SMF" http://www.alikonweb.it/451/ (http://www.alikonweb.it/451/) installed, I get a slightly different error message inside that box when I install the discussbot in addition to the one mentioend ealier:
Database Error: Table 'cc_joom.smf_messages' doesn't exist
File: /home/caitlain/public_html/forums/SSI.php
The page footer goes away completely with both of those active as well.
When I uninstall the discussbot, all of the error messages go away and everything functions normally. I also tried the latest & greatest Beta 2 of the bot, with the same results.
This is perplexing.
Quote from: chadness on April 14, 2007, 12:02:49 AM
Quote from: mpetrie on April 13, 2007, 11:41:35 PM
Thanks for taking note of the suggestion. Did you manage to fix the quote length for articles of less than the quote limit value?
That's nothing that the discussbot is doing. All it does is take the exact text of the article and post it as the message. The only thing it adds in is ". . ." and the quote tags. This is the exact line of code:
$message = '[quote]'.substr($row->text,0,$num_chars).'. . .'.'[/quote]';
This part:
substr($row->text,0,$num_chars)
just says take only the first so many characters of the message text.
I've just run this again using a very simple Joomla article with a single sentence of intro text only, saying "This is only for testing and will be deleted shortly."
The HTML in the Joomla editor is:
<p>This is only for testing and will be deleted shortly.</p><p>{mos_smf_discuss:5.0}</p>
When output in SMF it gets translated to:
[url=http://www.simuser.com/joomla/index.php?option=com_content&task=view&id=325&Itemid=77]
Read the article...[/url]
[quote][br][br]This is only for testing and will be deleted shortly.[br][br]
. . .[/quote]
Note the two br tags before and after the text and the extra blank line that's likely to get output. It's all these that made me think it was being padded out to $num_chars length.
Where do these tags come from? This is what needs to get removed from shorter quoted text.
Regards - Mike
THe <p> tags get translated into [ br ][ br ] for posting. If they don't paragraphs don't get separated in the SMF post.
Quote from: Orstio on April 14, 2007, 08:41:03 PM
THe <p> tags get translated into [ br ][ br ] for posting. If they don't paragraphs don't get separated in the SMF post.
Quote blocks in SMF are normally closely bounded to the text, but in this case there's a large space before and after the text. I guess what would be needed to get the quote to look like a normal SMF quote would be to strip off leading and trailing <p> tags from the quoted text, just keeping </p><p> combinations for paragraph breaks in the quotation. Without this it looks strange. In fact, it looks like there are at least two blank lines above, and a further three below the short quote. The link in my last post has been left active so you can see the effect by following the comment link from this "article".
QuoteI guess what would be needed to get the quote to look like a normal SMF quote would be to strip off leading and trailing <p> tags from the quoted text, just keeping </p><p> combinations for paragraph breaks in the quotation.
I agree. That shouldn't be too hard to implement. It would just be a matter of checking $row->text for a <p> at the beginning, and deleting it, and then check for </p> at the end, and deleting that before going through the HTML to BBcode translation in the bot.
Shouldn't be too tough. I'll make a note of it for beta 3.