delete forum error
Posted: 04 July 2008 03:09 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  78
Joined  06-23-2008

Hi,

When I want to delete a forum or category in the Forum management I get this error:

Notice: Undefined variable: PREFS in /home/system/modules/forum/mcp.forum.php on line 2123

Fatal error: Call to a member function ini() on a non-object in /home/system/modules/forum/mcp.forum.php on line 2123

Anyone an idea?

Ok, the forum or category is deleted, but the error is a bit annoying.  long face

Profile
 
 
Posted: 04 July 2008 08:08 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12390
Joined  04-29-2002

Avril, are both EE and the forum module up to date?

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 04 July 2008 08:18 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  78
Joined  06-23-2008

Hello,

Yep, I just bought EE + forum module 2 days ago.

Regards,

Profile
 
 
Posted: 06 July 2008 07:38 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23524
Joined  05-20-2002

I more or less replicate- got the ‘Call to a member function on a non-object’ error- which would then jam up defininte $batch- which would then jam up

foreach($forum_topics_count->result as $result)
            
{                    
                $update_forum_topics
.= "\n\tWHEN member_id = '".$result['author_id']."' THEN ".$result['count'];

                
// build member update in batches, no need to do the first one
                
                
if ($current_row % $batch == 0 AND $current_row != 0)
                
{
                    $update_forum_topics_array[]
= $update_forum_topics;
                    
$update_forum_topics = "UPDATE exp_members SET total_forum_topics = \nCASE";
                
}


Think it can be solved by just adding $PREFS to the initial global list at the top of the function:

global $DSP, $LANG, $IN, $DB, $FNS, $PREFS;


You might want to recount stats- as it’s possible they got off.  Check in ‘Admin- Utilities’ for that.  And I’ll put in a bug report.

Make sense?

ETA- edited the path in the error because it’s always a good idea to keep your system folder private.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 07 July 2008 05:26 AM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6729
Joined  03-23-2006

Hi Avril.

Thanks for reporting this, sorry for the inconvenience.  I’ve fixed it up for the next release.  Robin’s assessment of the fix is accurate (adding PREFS to the global list). If you’d like a fixed up file, feel free to email me and I’ll send it right out.

Derek

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 07 July 2008 05:56 AM   [ Ignore ]   [ # 5 ]  
Grad Student
Avatar
Rank
Total Posts:  78
Joined  06-23-2008

Hello Derek,

Ok great! I’ll send u an email.

Thanks smile

Profile
 
 
Posted: 08 July 2008 02:05 AM   [ Ignore ]   [ # 6 ]  
Grad Student
Avatar
Rank
Total Posts:  78
Joined  06-23-2008

Allright, it works!!

Thanks smile

Profile
 
 
Posted: 08 July 2008 03:17 AM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15380
Joined  05-15-2004

Glad to hear it. We ready to close this one out, then?

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 08 July 2008 03:26 AM   [ Ignore ]   [ # 8 ]  
Grad Student
Avatar
Rank
Total Posts:  78
Joined  06-23-2008

Yep

Profile
 
 
Posted: 08 July 2008 03:37 AM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15380
Joined  05-15-2004

Thanks. There we go ...

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64937 Total Logged-in Users: 62
Total Topics: 81905 Total Anonymous Users: 29
Total Replies: 440292 Total Guests: 312
Total Posts: 522197    
Members ( View Memberlist )