Thomas Varghese Thomas Varghese Thomas Varghese Thomas Varghese Thomas Maliackal

forex trading logo


Home Community ccBoard - Support Forum unable to delete a topic
 Support Forum :: ccBoard - Support Forum
Welcome Guest   [Register]  [Login]
 Subject :unable to delete a topic.. 2010-11-29 03:14:53 
linpi
Fresher
Joined: 2010-03-24 18:54:03
Posts: 4
Location: Berrlin
 

strange, I'm trying to delete a topic. CC Board allows me to do it as an admin, tells me that it did it, but actually didn't delete anything...

Does somemody else have this problem?

 

IP Logged
 Subject :Re:unable to delete a topic.. 2010-11-29 05:10:26 
linpi
Fresher
Joined: 2010-03-24 18:54:03
Posts: 4
Location: Berrlin
 

i made further tests in joomla debug mode and got:

500 - JDatabaseMySQL::query: 1054 - Unknown column 'post_id' in 'where clause' SQL=DELETE FROM jos_ccb_posts WHERE post_id = 33

maybe it hat with the php version to do... (5.3.2 ) I have to look deeper...

IP Logged
Last Edited On: 2010-11-29 05:11:57 By linpi for the Reason
 Subject :Re:unable to delete a topic.. 2010-11-29 05:40:39 
linpi
Fresher
Joined: 2010-03-24 18:54:03
Posts: 4
Location: Berrlin
 
I think I found the solution...
the error said SQL=DELETE FROM jos_ccb_posts WHERE post_id = 33.
looking at the database structure of the table jos_ccb_posts, there is no field post_id but just id.

here the code in file components/com_ccboard/models/postlist.php
line 375

function deletePosts( $post_id )
{
$query = 'DELETE FROM #__ccb_posts WHERE post_id = ' . (int) $post_id;
$this->dbExec( $query );
$this->deleteAttachments($post_id);
}

in line 377 just replace
$query = 'DELETE FROM #__ccb_posts WHERE post_id = ' . (int) $post_id;
with
$query = 'DELETE FROM #__ccb_posts WHERE id = ' . (int) $post_id;

for my it worked.
IP Logged
 Subject :Re:unable to delete a topic.. 2011-08-04 08:09:46 
thomas
Admin
Joined: 2008-12-13 17:16:30
Posts: 2,554
Location: Aluva, India
 

Thanks for the bug fix..

Thomas

 

IP Logged
Together we can make history :star:
Page # 


Powered by ccBoard



Latest News

Latest Posts

More...


Popular Posts


Powered by Joomla!. Designed by: Joomla Template, url. Valid XHTML and CSS.

© 2008-2009 CODECLASSIC.ORG. All Rights Reserved.

) { echo