Last post Jan 03, 2009 04:32 PM by Azazal
Aug 06, 2008 05:22 PM|varunnchopra|LINK
The Beer Project works perfectly but unfortunately I have no idea why posting replies to a forum would not work.
// insert the new post
Post.InsertPost(forumID, threadID, txtTitle.Text, txtBody.Value, chkClosed.Checked);
panInput.Visible = false;
That source code is found in the AddEditPost.aspx.cs file and seems to be correct. The txtBody.Value should be retrieved later when the post is placed and ShowThread.aspx does this.
For some reason though, when i post a reply or edit a reply, this wont be shown on the actual forum page where everyone else have been posting replies. Have I forseen something? Is there a way to solve this?
Aug 06, 2008 06:59 PM|Lee Dumond|LINK
Is it just not shown right away... but if you close the browser and go back to the topic, it then shows? I believe this is a flaw in the cache purging code...
Aug 06, 2008 10:45 PM|varunnchopra|LINK
Restarting the program, restarting the browser or opening it from another kind of browser does not prove that its a cache purging code problem. It seems like as if whatever the user is placing into the body of the text box is not being saved onto the database.
It works perfectly for placing "User Feedbacks" on Articles. I still do not know how to fix the forum problem.
Aug 06, 2008 11:10 PM|varunnchopra|LINK
This is what i am currently getting when it runs the website...
protected void Page_Load(object sender, EventArgs e)
threadPostID = int.Parse(this.Request.QueryString["ID"]);
The following line of code is claiming to be null. This was taken off the ShowThread.aspx file.
threadPostID = int.Parse(this.Request.QueryString["ID"]);
could that be the problem?
Aug 06, 2008 11:26 PM|Lee Dumond|LINK
I recall someone else running into this, and I thought it ended up being a cache problem. I guess I remembered it wrong; but it WAS a long time ago. [:)]
What you've discovered could definitely be the problem. If there is no ID on the querystring, then I don't think the post can "point" to the correct thread.
You should look in the database to see if the "missing" posts are actually in there...
Aug 06, 2008 11:56 PM|varunnchopra|LINK
lol, Im pretty new to building websites, currently being a student.
so if it was a caching problem, how would i solve that then?
Aug 07, 2008 12:14 AM|varunnchopra|LINK
Looking at the database table where the body of the post had to be placed, that body column was empty eventhough the other parts for that post was placed in the database row. So the problem is, the texts in the body are not being placed into the database.
Aug 07, 2008 12:43 AM|varunnchopra|LINK
would you have the source code for the corrected version if there was one?
Aug 07, 2008 01:10 AM|Lee Dumond|LINK
I am remembering more now about the problem. As I recall, it was an issue with using an old version of FCKEditor.
Try upgrading to FCKEditor 2.6 or later. That should work.
Aug 07, 2008 02:10 AM|varunnchopra|LINK
ok so i updated the FCKeditor by taking out the old folder and placing in the new one. Its now complaining that it cannot load the type
That is how do i edit to fit the changes for the FCKeditor? I think the guy in the other post knew how to do this but did not mention how do to it.
Aug 07, 2008 10:28 AM|Lee Dumond|LINK
Did you update the dll in the bin folder also?
Aug 07, 2008 01:34 PM|varunnchopra|LINK
How would I update the bin folder? Are the files also provided by the FCKeditor website?
Aug 07, 2008 01:37 PM|Lee Dumond|LINK
Yes. I think you need to go through the FCKeditor website instructions for installing the current version, and follow them
slowly and carefully. It's much more than a matter of copying over some files.
Aug 07, 2008 03:32 PM|varunnchopra|LINK
ok so updating the .dll file fixes the compile time error. Going back to the forum, and trying to post a reply now gives me an error
"Toolbar set "TheBeerHouse_Simple" doesn't exist "
does editing this line of code possibly fix it?
<fckeditorv2:fckeditor id="txtBody" runat="server" ToolbarSet="TheBeerHouse_Simple" Height="400px" Width="99%" />
Aug 07, 2008 03:58 PM|Lee Dumond|LINK
No, because then you'll lose your custom toolbar.
In FCKEditor, you can define toolbar sets in the .JS file. These determine which buttons are enabled in the UI. For a simple forum post, you only need a simple set of buttons, like bold, italic, etc, like you see on this forum in fact.
The book shows the code for the TheBeerHouse_Simple toolbar set, and how to define it. You need to put it in there where it belongs, so that the FCKeditor can find and render it for forum posting.
There are actually two toolbar sets that you need. The other is a larger one that is used for Article posting.
As I recall, the toolbar sets shown in the book show an extra feature that is no longer supported by the current FCK version. You have to delete that part of the code. I can't remember which one it is, but you'll see as soon as you run the page.
Aug 07, 2008 04:16 PM|varunnchopra|LINK
To solve that problem you would have to update the fckconfig.js file by supplementing it with the configuration given to it by the original author.
// start TheBeerHouse configuration
FCKConfig.LinkBrowser = false;
FCKConfig.ImageBrowser = false;
FCKConfig.LinkUpload = false;
FCKConfig.ImageUpload = false;
FCKConfig.ToolbarSets["TheBeerHouse"] = [
FCKConfig.ToolbarSets["TheBeerHouse_Simple"] = [
// end TheBeerHouse configuration
The post takes place and you can say this is solved. But its complaining about an unknown item called
Universal Key. Would that pose a problem later on? Or is that the problem you were referring to?
I removed 'UniversalKey' from FCKConfig.ToolbarSets["TheBeerHouse"] and FCKConfig.ToolbarSets["TheBeerHouse_Simple"] but a pop up would still show up saying that it cannot identify Universal key. Where is it still calling it?
Aug 07, 2008 04:54 PM|Lee Dumond|LINK
Yes, that was exactly the problem. UniversalKey is no longer supported by the FCKeditor. Just delete it from the above code, so that it reads:
Aug 07, 2008 09:47 PM|varunnchopra|LINK
ok so i did that, but when i open up a forum and post a reply, a pop up still comes up asking for the universal key eventhough i have deleted that. Is there something else asking for that Universal key?
Aug 07, 2008 10:36 PM|Lee Dumond|LINK
Not that I can think of, unless you failed to delete some old code or something. You might try doing an entire-solution search in all files for the text
UniversalKey and see what pops up.
Aug 07, 2008 10:58 PM|vnchopra|LINK
ok i ll try that
Aug 08, 2008 12:50 AM|vnchopra|LINK
An entire solution search on all the files for the Universal key only brought up the Universal keys found in the FCKeditor. It does not seem to be asking for it elsewhere.
Aug 08, 2008 04:25 AM|vnchopra|LINK
Actually it worked. The problem is solved!
Aug 08, 2008 07:41 AM|Lee Dumond|LINK
Good, glad to help. You should probably mark the thread as answered then. Thanks
Aug 08, 2008 01:38 PM|vnchopra|LINK
I want to but there is something wrong with my other account "varunnchopra".
Jan 03, 2009 04:32 PM|Azazal|LINK