Forum

Whether it's a plugin thats causing issues, a theme, or just needed help with styling your site...We can help! Live Person Support for all your Wordpress Needs!

Welcome Guest

Pages: 1
"An error occured", "mingleforum": Cant create new topic!
msossiPostMar 07 2012, 08:04 AM

Newbie
Posts: 9
Registered:
Mar 07 2012, 02:59 PM
Hot topic"An error occured", "mingleforum": Cant create new topic!

Hey there, I did install mingleforum and everything works fine so far, but I can not create a new topic. When I submit the topic the following message is shown:

setup_linksdk($_POST['add_topic_plink']); $options = get_option("mingleforum_options"); //Checking if current categories have been disabled to admin posting only $the_forum_id = false; if(isset($_POST['add_topic_forumid']) && !empty($_POST['add_topic_forumid'])) $the_forum_id = $mingleforum->check_parms($_POST['add_topic_forumid']); if(isset($_POST['add_post_forumid']) && !empty($_POST['add_post_forumid'])) { $the_thread_id = $mingleforum->check_parms($_POST['add_post_forumid']); $the_forum_id = $wpdb->get_var("SELECT `parent_id` FROM {$mingleforum->t_threads} WHERE `id` = {$the_thread_id}"); } if(is_numeric($the_forum_id)) { $the_cat_id = $wpdb->get_var("SELECT `parent_id` FROM {$mingleforum->t_forums} WHERE `id` = {$the_forum_id}"); if(in_array($the_cat_id, $options['forum_disabled_cats']) && !current_user_can('administrator') && !is_super_admin($user_ID)) wp_die(__("Oops only Administrators can post in this Forum!", "mingleforum")); } //End Check function mf_u_key() { $pref = ""; for ($i = 0; $i < 5; $i++) { $d = rand(0,1); $pref .= $d ? chr(rand(97, 122)) : chr(rand(48, 57)); } return $pref."-"; } function MFAttachImage($temp, $name) { //GET USERS UPLOAD PATH $upload_dir = wp_upload_dir(); $path = $upload_dir['path']."/"; $url = $upload_dir['url']."/"; $u = mf_u_key(); $name = sanitize_file_name($name); if(!empty($name)) move_uploaded_file($temp, $path.$u.$name); return "\nImage"; } function MFGetExt($str) { //GETS THE FILE EXTENSION BELONGING TO THE UPLOADED FILE $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } function mf_check_uploaded_images() { $valid = array('im1' => true, 'im2' => true, 'im3' => true); if($_FILES["mfimage1"]["error"] > 0 && !empty($_FILES["mfimage1"]["name"])) $valid['im1'] = false; if($_FILES["mfimage2"]["error"] > 0 && !empty($_FILES["mfimage2"]["name"])) $valid['im2'] = false; if($_FILES["mfimage3"]["error"] > 0 && !empty($_FILES["mfimage3"]["name"])) $valid['im3'] = false; if(!empty($_FILES["mfimage1"]["name"])) { $ext = strtolower(MFGetExt(stripslashes($_FILES["mfimage1"]["name"]))); if($ext != "jpg" && $ext != "jpeg" && $ext != "bmp" && $ext != "png" && $ext != "gif") $valid['im1'] = false; } else $valid['im1'] = false; if(!empty($_FILES["mfimage2"]["name"])) { $ext = strtolower(MFGetExt(stripslashes($_FILES["mfimage2"]["name"]))); if($ext != "jpg" && $ext != "jpeg" && $ext != "bmp" && $ext != "png" && $ext != "gif") $valid['im2'] = false; } else $valid['im2'] = false; if(!empty($_FILES["mfimage3"]["name"])) { $ext = strtolower(MFGetExt(stripslashes($_FILES["mfimage3"]["name"]))); if($ext != "jpg" && $ext != "jpeg" && $ext != "bmp" && $ext != "png" && $ext != "gif") $valid['im2'] = false; } else $valid['im3'] = false; return $valid; } //--weaver-- check if guest filled in form if (!isset($_POST['edit_post_submit'])) { $errormsg = apply_filters('wpwf_check_guestinfo',""); if ($errormsg != "") { $error = true; wp_die($errormsg); //plugin failed } } //--weaver-- end guest form check if($options['forum_captcha'] == true && !$user_ID){ include_once(WPFPATH."captcha/shared.php"); $wpf_code = wpf_str_decrypt($_POST['wpf_security_check']); if(($wpf_code == $_POST['wpf_security_code']) && (!empty($wpf_code))) { //It passed } else { $error = true; $msg = __("Security code does not match", "mingleforum"); wp_die($msg); } } $cur_user_ID = apply_filters('wpwf_change_userid', $user_ID); // --weaver-- use real id or generated guest ID //ADDING A NEW TOPIC? if(isset($_POST['add_topic_submit'])){ $myReplaceSub = array("'", "\\"); $subject = str_replace($myReplaceSub, "", $mingleforum->input_filter($_POST['add_topic_subject'])); $content = $mingleforum->input_filter($_POST['message']); $forum_id = $mingleforum->check_parms($_POST['add_topic_forumid']); if($subject == ""){ $msg .= "
".__("An error occured", "mingleforum")."
"; $msg .= ("

".__("You must enter a subject", "mingleforum")."
"); $error = true; } elseif($content == ""){ $msg .= "
".__("An error occured", "mingleforum")."
"; $msg .= ("

".__("You must enter a message", "mingleforum")."
"); $error = true; } else{ $date = $mingleforum->wpf_current_time_fixed('mysql', 0); $sql_thread = "INSERT INTO $mingleforum->t_threads (last_post, subject, parent_id, `date`, status, starter) VALUES(%s, %s, %d, %s, 'open', %d)"; $wpdb->query($wpdb->prepare($sql_thread, $date, $subject, $forum_id, $date, $cur_user_ID)); $id = $wpdb->insert_id; //Add to mingle board $myMingID = -1; if(!function_exists('is_plugin_active')) require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if(is_plugin_active('mingle/mingle.php') and is_user_logged_in()) { $board_post =& MnglBoardPost::get_stored_object(); $myMingID = $board_post->create( $cur_user_ID, $cur_user_ID, "".__("created the forum topic:", "mingleforum")." " . $mingleforum->output_filter($subject) . "" ); } //End add to mingle board //MAYBE ATTACH IMAGES $images = mf_check_uploaded_images(); if($images['im1'] || $images['im2'] || $images['im3']) { if($images['im1']) $content .= MFAttachImage($_FILES["mfimage1"]["tmp_name"], stripslashes($_FILES["mfimage1"]["name"])); if($images['im2']) $content .= MFAttachImage($_FILES["mfimage2"]["tmp_name"], stripslashes($_FILES["mfimage2"]["name"])); if($images['im3']) $content .= MFAttachImage($_FILES["mfimage3"]["tmp_name"], stripslashes($_FILES["mfimage3"]["name"])); } $sql_post = "INSERT INTO $mingleforum->t_posts (text, parent_id, `date`, author_id, subject) VALUES(%s, %d, %s, %d, %s)"; $wpdb->query($wpdb->prepare($sql_post, $content, $id, $date, $cur_user_ID, $subject)); $new_post_id = $wpdb->insert_id; //UPDATE PROPER Mngl ID $sql_thread = "UPDATE $mingleforum->t_threads SET mngl_id = %d WHERE id = %d"; $wpdb->query($wpdb->prepare($sql_thread, $myMingID, $id)); //END UPDATE PROPER Mngl ID } if(!$error){ $mingleforum->notify_forum_subscribers($id, $subject, $content, $date, $forum_id); $mingleforum->notify_admins($id, $subject, $content, $date); $unused = apply_filters('wpwf_add_guest_sub', $id); //--weaver-- Maybe add a subscription header("Location: ".html_entity_decode($mingleforum->get_threadlink($id)."#postid-".$new_post_id)); exit; } else wp_die($msg); } //ADDING A POST REPLY? if(isset($_POST['add_post_submit'])){ $myReplaceSub = array("'", "\\"); $subject = str_replace($myReplaceSub, "", $mingleforum->input_filter($_POST['add_post_subject'])); $content = $mingleforum->input_filter($_POST['message']); $thread = $mingleforum->check_parms($_POST['add_post_forumid']); //GET PROPER Mngl ID $MngBID = $wpdb->get_var($wpdb->prepare("SELECT mngl_id FROM $mingleforum->t_threads WHERE id = %d", $thread)); //END GET PROPER Mngl ID if($subject == ""){ $msg .= "
".__("An error occured", "mingleforum")."
"; $msg .= ("

".__("You must enter a subject", "mingleforum")."
"); $error = true; } elseif($content == ""){ $msg .= "
".__("An error occured", "mingleforum")."
"; $msg .= ("

".__("You must enter a message", "mingleforum")."
"); $error = true; } else{ $date = $mingleforum->wpf_current_time_fixed('mysql', 0); //Add to mingle board if(!function_exists('is_plugin_active')) require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if(is_plugin_active('mingle/mingle.php') and is_user_logged_in() and $MngBID > 0) { $board_post =& MnglBoardPost::get_stored_object(); $mngl_board_comment->create( $MngBID, $cur_user_ID, "".__("replied to the forum topic:", "mingleforum")." " . $mingleforum->output_filter($subject) . "" ); } //End add to mingle board //MAYBE ATTACH IMAGES $images = mf_check_uploaded_images(); if($images['im1'] || $images['im2'] || $images['im3']) { if($images['im1']) $content .= MFAttachImage($_FILES["mfimage1"]["tmp_name"], stripslashes($_FILES["mfimage1"]["name"])); if($images['im2']) $content .= MFAttachImage($_FILES["mfimage2"]["tmp_name"], stripslashes($_FILES["mfimage2"]["name"])); if($images['im3']) $content .= MFAttachImage($_FILES["mfimage3"]["tmp_name"], stripslashes($_FILES["mfimage3"]["name"])); } $sql_post = "INSERT INTO $mingleforum->t_posts (text, parent_id, `date`, author_id, subject) VALUES(%s, %d, %s, %d, %s)"; $wpdb->query($wpdb->prepare($sql_post, $content, $thread, $date, $cur_user_ID, $subject)); $new_id = $wpdb->insert_id; $wpdb->query($wpdb->prepare("UPDATE $mingleforum->t_threads SET last_post = %s WHERE id = %d", $date, $thread)); } if(!$error){ $mingleforum->notify_thread_subscribers($thread, $subject, $content, $date); $mingleforum->notify_admins($thread, $subject, $content, $date); $unused = apply_filters('wpwf_add_guest_sub', $thread); //--weaver-- Maybe add a subscription header("Location: ".html_entity_decode($mingleforum->get_paged_threadlink($thread)."#postid-".$new_id)); exit; } else wp_die($msg); } //EDITING A POST? if(isset($_POST['edit_post_submit'])) { $myReplaceSub = array("'", "\\"); $subject = str_replace($myReplaceSub, "", $mingleforum->input_filter($_POST['edit_post_subject'])); $content = $mingleforum->input_filter($_POST['message']); $thread = $mingleforum->check_parms($_POST['thread_id']); $edit_post_id = $_POST['edit_post_id']; if($subject == "") { $msg .= "
".__("An error occured", "mingleforum")."
"; $msg .= ("

".__("You must enter a subject", "mingleforum")."
"); $error = true; } if($content == "") { $msg .= "
".__("An error occured", "mingleforum")."
"; $msg .= ("

".__("You must enter a message", "mingleforum")."
"); $error = true; } //Major security check here, prevents hackers from editing the entire forums posts if(!current_user_can('administrator') && !is_super_admin($user_ID) && $user_ID != $mingleforum->get_post_owner($edit_post_id)) { $msg .= "
".__("An error occured", "mingleforum")."
"; $msg .= ("

".__("You do not have permission to edit this post!", "mingleforum")."
"); $error = true; } if ($error) wp_die($msg); $sql = ("UPDATE $mingleforum->t_posts SET text = %s, subject = %s WHERE id = %d"); $wpdb->query($wpdb->prepare($sql, $content, $subject, $edit_post_id)); $ret = $wpdb->get_results("select id from $mingleforum->t_posts where parent_id = $thread order by date asc limit 1"); if ($ret[0]->id == $edit_post_id) { $sql = ("UPDATE $mingleforum->t_threads set subject = %s where id = %d"); $wpdb->query($wpdb->prepare($sql, $subject, $thread)); } header("Location: ".html_entity_decode($mingleforum->get_paged_threadlink($thread)."#postid-".$edit_post_id)); exit; } ?>

_________________
http://www.rtm-sport.de



Shrink, Track, Share, Control ... Dominate
msossiPostMar 10 2012, 01:38 AM

Newbie
Posts: 9
Registered:
Mar 07 2012, 02:59 PM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

Please, can anybody help me?! I'm gonna desperate with the search of any forum-plugin :-( mingleforum looks like a great plugin, but it doesn't work :-) Who can tell me, what's wrong with the described issue?!

_________________
http://www.rtm-sport.de

tropicalfishnetworkPostMar 10 2012, 05:06 AM

Advanced
Posts: 65
Registered:
Mar 03 2012, 11:21 AM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

whats your site URL?

msossiPostMar 10 2012, 05:58 AM

Newbie
Posts: 9
Registered:
Mar 07 2012, 02:59 PM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

This is my site URL: http://www.rtm-sport.de

and here you come to mingleforum: http://www.rtm-sport.de/community/forum/

_________________
http://www.rtm-sport.de

tropicalfishnetworkPostMar 10 2012, 06:08 AM

Advanced
Posts: 65
Registered:
Mar 03 2012, 11:21 AM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

Registration is not currently allowed.
Very nice looking site.
If you enable registration I will try to post and help you figure out the problem.

msossiPostMar 10 2012, 06:37 AM

Newbie
Posts: 9
Registered:
Mar 07 2012, 02:59 PM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

Hi, I sent you an email with login data's. I'm looking forward to hear from you soon!

_________________
http://www.rtm-sport.de

tropicalfishnetworkPostMar 10 2012, 06:57 AM

Advanced
Posts: 65
Registered:
Mar 03 2012, 11:21 AM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

Not sure what the problem is but the message you are getting is part of the source for your wpf-insert.php file.
check you have not deleted wp-load.php in your wordpress root folder and check that it looks something like this...

<?php
/**
 * Bootstrap file for setting the ABSPATH constant
 * and loading the wp-config.php file. The wp-config.php
 * file will then load the wp-settings.php file, which
 * will then set up the WordPress environment.
 *
 * If the wp-config.php file is not found then an error
 * will be displayed asking the visitor to set up the
 * wp-config.php file.
 *
 * Will also search for wp-config.php in WordPress' parent
 * directory to allow the WordPress directory to remain
 * untouched.
 *
 * @internal This file must be parsable by PHP4.
 *
 * @package WordPress
 */

/** Define ABSPATH as this files directory */
define( 'ABSPATH', dirname(__FILE__) . '/' );

error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );

if ( file_exists( ABSPATH . 'wp-config.php') ) {

	/** The config file resides in ABSPATH */
	require_once( ABSPATH . 'wp-config.php' );

} elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) {

	/** The config file resides one level above ABSPATH but is not part of another install*/
	require_once( dirname(ABSPATH) . '/wp-config.php' );

} else {

	// A config file doesn't exist

	// Set a path for the link to the installer
	if ( strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false )
		$path = '';
	else
		$path = 'wp-admin/';

	require_once( ABSPATH . '/wp-includes/load.php' );
	require_once( ABSPATH . '/wp-includes/version.php' );
	define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
	wp_check_php_mysql_versions();

	// Die with an error message
	require_once( ABSPATH . '/wp-includes/class-wp-error.php' );
	require_once( ABSPATH . '/wp-includes/functions.php' );
	require_once( ABSPATH . '/wp-includes/plugin.php' );
	$text_direction = /*WP_I18N_TEXT_DIRECTION*/'ltr'/*/WP_I18N_TEXT_DIRECTION*/;
	wp_die(sprintf(/*WP_I18N_NO_CONFIG*/"<p>There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started.</p> <p>Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>.</p> <p>You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.</p><p><a href='%ssetup-config.php' class='button'>Create a Configuration File</a></p>"/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/'WordPress › Error'/*/WP_I18N_ERROR_TITLE*/, array('text_direction' => $text_direction));

}

?>

Other than that I have no idea. I am a very novice coder trying to help where he can :)

Hope you get it solved soon, your website looks great :)

tropicalfishnetworkPostMar 10 2012, 07:09 AM

Advanced
Posts: 65
Registered:
Mar 03 2012, 11:21 AM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

Maybe you don't have a required module or your php version is too low.

Run phpinfo() and compare required version and modules.

<?php

phpinfo();
phpinfo(INFO_MODULES);

?>
msossiPostMar 10 2012, 09:14 AM

Newbie
Posts: 9
Registered:
Mar 07 2012, 02:59 PM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

Thank you so much for trying to help me! This is my wp-load.php looks like:

<?php
/**
 * Bootstrap file for setting the ABSPATH constant
 * and loading the wp-config.php file. The wp-config.php
 * file will then load the wp-settings.php file, which
 * will then set up the WordPress environment.
 *
 * If the wp-config.php file is not found then an error
 * will be displayed asking the visitor to set up the
 * wp-config.php file.
 *
 * Will also search for wp-config.php in WordPress' parent
 * directory to allow the WordPress directory to remain
 * untouched.
 *
 * @internal This file must be parsable by PHP4.
 *
 * @package WordPress
 */

/** Define ABSPATH as this files directory */
define( 'ABSPATH', dirname(__FILE__) . '/' );

error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );

if ( file_exists( ABSPATH . 'wp-config.php') ) {

	/** The config file resides in ABSPATH */
	require_once( ABSPATH . 'wp-config.php' );

} elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) {

	/** The config file resides one level above ABSPATH but is not part of another install*/
	require_once( dirname(ABSPATH) . '/wp-config.php' );

} else {

	// A config file doesn't exist

	// Set a path for the link to the installer
	if ( strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false )
		$path = '';
	else
		$path = 'wp-admin/';

	require_once( ABSPATH . '/wp-includes/load.php' );
	require_once( ABSPATH . '/wp-includes/version.php' );
	define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
	wp_check_php_mysql_versions();

	// Die with an error message
	require_once( ABSPATH . '/wp-includes/class-wp-error.php' );
	require_once( ABSPATH . '/wp-includes/functions.php' );
	require_once( ABSPATH . '/wp-includes/plugin.php' );
	$text_direction = /*WP_I18N_TEXT_DIRECTION*/'ltr'/*/WP_I18N_TEXT_DIRECTION*/;
	wp_die(sprintf(/*WP_I18N_NO_CONFIG*/'<p>Es scheint so, als wäre die Datei <code>wp-config.php</code> nicht vorhanden. Diese Datei wird aber benötigt um, fortzufahren.</p><p> Benötigst du weitere Hilfe? <a href=\'http://codex.wordpress.org/Editing_wp-config.php\'>Hier findest du sie</a>.</p><p>Du kannst die Datei <code>wp-config.php</code> über ein Web-Interface erstellen, das funktioniert allerdings nicht unter allen Systemen. Am sichersten ist es, wenn die Datei manuell erstellt wird.</p><p><a href=\'%ssetup-config.php\' class=\'button\'>Konfigurationsdatei erstellen</a></p>'/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/'WordPress › Fehler'/*/WP_I18N_ERROR_TITLE*/, array('text_direction' => $text_direction));

}

?>

_________________
http://www.rtm-sport.de

msossiPostMar 10 2012, 09:16 AM

Newbie
Posts: 9
Registered:
Mar 07 2012, 02:59 PM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

And here you can have a look on my php version:

http://www.rtm-sport.de/php_info.php

_________________
http://www.rtm-sport.de

msossiPostMar 14 2012, 06:12 AM

Newbie
Posts: 9
Registered:
Mar 07 2012, 02:59 PM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

Please - I still need help to this topic!

_________________
http://www.rtm-sport.de

msossiPostMay 07 2012, 05:17 AM

Newbie
Posts: 9
Registered:
Mar 07 2012, 02:59 PM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

I still can not use the forum cause of the same problem :-( Is there anybody who can help me? Otherwise I have to use another extern forum!

_________________
http://www.rtm-sport.de

Ned_MayhemPostAug 20 2012, 10:14 AM

Newbie
Posts: 1
Registered:
Aug 20 2012, 04:11 PM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

I just encountered and fixed this problem on my installation. Under the "Mingle Forum ==> General Options" menu, if you have "Require registration to post" and "use captcha for unregistered visitors" enabled at the same time, you get this error message whenever anyone tries to create a new topic or post. If you require registration, uncheck the "use captcha" box and it ought to work.

msossiPostAug 23 2012, 12:46 AM

Newbie
Posts: 9
Registered:
Mar 07 2012, 02:59 PM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

It's still not solved :-( Still the same error. Thanx for trying, Ned. Support in mingleforum is too bad, I will never get solved this problem and so I will never use mingleforum. Sad :-(

_________________
http://www.rtm-sport.de

adrina0PostDec 28 2012, 01:56 PM

Newbie
Posts: 1
Registered:
Dec 28 2012, 08:50 PM
Hot topicRe: "An error occured", "mingleforum": Cant create new topic!

Global Promotion advertisers or marketing otherwise what is advertising through internet marketing.
Make link from this topic to the following address: http://globalpromotionalliance.com

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.279 seconds.


Shrink, Track, Share, Control ... Dominate