Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

DotNetNuke Marketplace
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! (Pro...  DNN Forum API Question
Previous Previous
 
Next Next
New Post 8/11/2008 8:54 AM
User is offline John Valentine
129 posts
www.webinnovationsystems.com/
9th Ranked


Re: DNN Forum API Question 

I was using the code api to create the post "PostController.PostAdd()" but sometimes a thread wasn't being created and sometimes it was... Go figure... So, I decided to use the Forum_AA_ThreadAdd stored procedure as well. So, it got even more complicated. I think I have a handle on it now.

Thanks!


Cheers!
John Valentine
http://www.webinnovationsystems.com
 
New Post 8/14/2008 2:27 PM
User is offline John Valentine
129 posts
www.webinnovationsystems.com/
9th Ranked


Re: DNN Forum API Question 
Modified By John Valentine  on 8/14/2008 4:36:27 PM)

Hey Brian,

I have been struggling with what seems to be an application scope caching issue. The Forum module cache is set to -1, but for some reason, the forumID is -1 when I call the database to get the newly created forum (so I can add a post to it). In my update event I have the following (partial) code.

if (chkAddForum.Checked && (chit.ThreadID == 0 || chit.ThreadID == -1))
            {

                // Perform Forum Discovery based on Module Title (if one doesn't exist this functions stored procedure creates and returns the new forum record)
                ForumInfo forum = ctlActionChits.GetActionChitForum(ddlCommittee.SelectedItem.Text);

                int retval = ctlPost.PostAdd(0, forum.ForumID, dnnUser.UserID, Request.UserHostAddress, true, txtSubject.Text, txtDescription.Content, false, Null.NullDate, false, 0, string.Empty, moduleInfo.PortalID, -1, -1);

                // Syncronize forum module and clear the cache so new forum will be displayed
                ctlForum.ClearCache_ForumGetAll(forum.GroupID);
                ModuleController.SynchronizeModule(forum.ModuleID);

                PostInfo post = ctlPost.PostGet(retval, moduleInfo.PortalID);
               
                chit.ThreadID = post.ThreadID; // Errors here

            }
           

The error occurs on the last line when I step through the code. The real problem is that my forum.ForumID is -1 instead of the actual forumID. A quick database check reviels that the record exists.

Finally, when I browse the forums module as Host, the group count in Edit Groups is correct, but the forum is not displayed in the module. Browsing to HostSettings and clearing the cache then restarting the application will cause my newly created forum to be displayed and all behaviors are normal.

Any thoughts?


Cheers!
John Valentine
http://www.webinnovationsystems.com
 
New Post 8/14/2008 2:46 PM
User is offline Brian Dukes
479 posts
www.engagesoftware.com
8th Ranked


Re: DNN Forum API Question 

Hmmm... At a point like that I would probably have to look through the forum code and see if they are maintaining a cache of their own that they clear or something when a new forum is added.

Hope it helps,


Brian Dukes
Engage Software
St. Louis, MO
314.966.4000

The leading provider of DotNetNuke support, training and custom module development.
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! (Pro...  DNN Forum API Question
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNN Outsourcing
50% more affordable services comparing to Western Europe and US: Custom DotNetNuke module development, skins, consulting, maintainence... Over 15.000 working hours of experience in custom DotNetNuke Solutions development, 8 years experience in outsourcing, excellent references!
www.dnnoutsourcing.com
Expressnet - DotNetNuke Hosting
Expressnet provide premium quality ASP.NET Web Hosting. We specialise in Windows based products including ASP.NET and Microsoft SQL Server. We offer fantastic value packages for DotNetNuke hosting. We also offer free asp.net web hosting
www.expressnet.com.au
Softech Development, Inc.
We help your business work smarter with DotNetNuke. Whether you need a new implementation, a custom module or skin for an existing implementation, or integration with your business processes, Softech has the experience and expertise to make it happen.
www.softechdevelopment.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP