https://www.icyphoenix.com/viewtopic.php?f=29&t=725
-----------------------------------
tormentor
Tue 19 Dec, 2006 07:16

While Merging Two Topics...
-----------------------------------
P.S.  Ok, I found another topic about it, sorry


While merging two topics I hjad this error and the old topic was not deleted

Could not delete topic reads

DEBUG MODE

SQL Error : 1196 Warning: Some non-transactional changed tables couldn't be rolled back

DELETE FROM phpbb_upi2db_unread_posts WHERE topic_id IN ()

Line : 846
File : modcp.php


-----------------------------------
TheSteffen
Tue 19 Dec, 2006 08:27

Re: While Merging Two Topics...
-----------------------------------
Which version of phpBBXS do you use?

Did you update to UPI2DB v3.0.7 ?
http://www.icyphoenix.com/viewtopic.php?t=693&highlight=

I have updated and get the same error.  :roll: 

Here in this forum you can merge without errors.


-----------------------------------
TheSteffen
Tue 19 Dec, 2006 08:50

Re: While Merging Two Topics...
-----------------------------------
OK,

find in 

OPEN [b]modcp.php[/b]
FIND
[codeblock]
//<!-- BEGIN Unread Post Information to Database Mod -->
								if($userdata['upi2db_access'])
								{
									$sql = "DELETE FROM " . UPI2DB_UNREAD_POSTS_TABLE . "
										WHERE topic_id IN ($topic_id_sql)";

									if ( !$db->sql_query($sql) )
									{
										message_die(GENERAL_ERROR, 'Could not delete topic reads', '', __LINE__, __FILE__, $sql);
									}

									$sql = "DELETE FROM " . UPI2DB_LAST_POSTS_TABLE . "
										WHERE topic_id IN ($topic_id_sql)";

									if ( !$db->sql_query($sql) )
									{
										message_die(GENERAL_ERROR, 'Could not delete topic reads', '', __LINE__, __FILE__, $sql);
									}
								}
//<!-- END Unread Post Information to Database Mod -->
[/codeblock]
REPLACE WITH
[codeblock]
//<!-- BEGIN Unread Post Information to Database Mod -->
					if($userdata['upi2db_access'])
					{
						/*
						$sql = "DELETE FROM " . UPI2DB_UNREAD_POSTS_TABLE . "
							WHERE topic_id IN ($topic_id_sql)";
						*/
						$sql = "DELETE FROM " . UPI2DB_UNREAD_POSTS_TABLE . "
							WHERE topic_id IN ($topic_id_list[$i])";

						if ( !$db->sql_query($sql) )
						{
							message_die(GENERAL_ERROR, 'Could not delete topic reads', '', __LINE__, __FILE__, $sql);
						}

						/*
						$sql = "DELETE FROM " . UPI2DB_LAST_POSTS_TABLE . "
							WHERE topic_id IN ($topic_id_sql)";
						*/
						$sql = "DELETE FROM " . UPI2DB_LAST_POSTS_TABLE . "
							WHERE topic_id IN ($topic_id_list[$i])";

						if ( !$db->sql_query($sql) )
						{
							message_die(GENERAL_ERROR, 'Could not delete topic reads', '', __LINE__, __FILE__, $sql);
						}
					}
//<!-- END Unread Post Information to Database Mod -->
[/codeblock]

For me it's working.

I have updated this http://www.phpbbxs.eu/viewtopic.php?t=693


-----------------------------------
hpl
Tue 19 Dec, 2006 22:45

Re: While Merging Two Topics...
-----------------------------------
[url=http://www.icyphoenix.com/viewtopic.php?p=5623#p5623]SOLUTION  :roll:  :roll:  :roll:  :roll:


-----------------------------------
Mighty Gorgon
Sun 24 Dec, 2006 21:40

Re: While Merging Two Topics...
-----------------------------------
This has been already fixed at least twice... please use the search function... :wink:

Locking...


