Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Maxtor Posted October 19, 2017 Posted October 19, 2017 OutOfRangeException: (0) #0 /home/maxtor99/public_html/applications/core/modules/front/system/ajax.php(363): IPS\Patterns\_ActiveRecord::load(159209) #1 /home/maxtor99/public_html/system/Dispatcher/Controller.php(85): IPS\core\modules\front\system\_ajax->instantNotifications() #2 /home/maxtor99/public_html/system/Dispatcher/Dispatcher.php(146): IPS\Dispatcher\_Controller->execute() #3 /home/maxtor99/public_html/index.php(12): IPS\_Dispatcher->run() #4 {main} BACKTRACE #0 /home/maxtor99/public_html/init.php(523): IPS\_Log::log('OutOfRangeExcep...', 'uncaught_except...') #1 [internal function]: IPS\IPS::exceptionHandler(Object(OutOfRangeException)) #2 {main} After doing Mass PM remove, all pm system is messed up . my members get this error at system logs, and pms never loads. what to do next?
Aiwa Posted October 19, 2017 Posted October 19, 2017 Lets keep this accurate... You're getting this error after mass deleting PM's via query, not after using Mass PM.
Maxtor Posted October 19, 2017 Author Posted October 19, 2017 2 hours ago, Aiwa said: Lets keep this accurate... You're getting this error after mass deleting PM's via query, not after using Mass PM. yes sure. is there a quick tip or fix? i dont want to remove all pms.
CodingJungle Posted October 19, 2017 Posted October 19, 2017 2 hours ago, Maxtor said: yes sure. is there a quick tip or fix? i dont want to remove all pms. it would seem the table 'core_message_topic_user_map' still contains the reference to the PM's that were mass deleted, so it would appear whatever you did to do the mass removal, was incomplete.
Faqole Posted October 19, 2017 Posted October 19, 2017 7 hours ago, Maxtor said: yes sure. is there a quick tip or fix? i dont want to remove all pms. How exactly did you try to remove the mass pm's?
Maxtor Posted October 19, 2017 Author Posted October 19, 2017 2 hours ago, Faqole said: How exactly did you try to remove the mass pm's? I run this: DELETE FROM `ipm_core_message_posts` WHERE `msg_post` LIKE '%message contents%' DELETE FROM `ipm_core_message_topics` WHERE `mt_title` LIKE '%message title%' DELETE FROM `ipm_core_message_topic_user_map` WHERE `map_user_id` = 173418 map_user_id=173418 is the user i used at Mass PM for senting pms. problem is still there.
Aiwa Posted October 19, 2017 Posted October 19, 2017 That's the problem. You only deleted the map for the user sending, you didn't delete the map for the user receiving. There are 2 entries and they are tied together based on the topic ID. I go back to the query I gave you in your other topic. It would delete entries from all 3 of those tables, tieing them together from the topic ID, based solely on the where clause you gave it. So if you said where starter_id = 173418, you'd have gotten everything in one shot. But instead you have a LOT of orphaned data that you can ONLY get rid of by looking for a delta of topic ID's that exist in the topic user map but don't exist in _topics. If I were you, I'd restore those 3 tables from a backup and run the query I gave you in the other topic. Or come up with a query to identify and remove the now orphaned data in the topic_user_map table. DELETE FROM core_message_topics, core_message_posts, core_message_topic_user_map USING core_message_topics LEFT JOIN core_message_topic_user_map ON core_message_topics.mt_id=core_message_topic_user_map.map_topic_id LEFT JOIN core_message_posts ON core_message_topics.mt_id=core_message_posts.msg_topic_id WHERE core_message_topics.mt_starter_id=173418
Maxtor Posted October 19, 2017 Author Posted October 19, 2017 can i remove all pms at once? will this solve my problem?
Aiwa Posted October 19, 2017 Posted October 19, 2017 DELETE FROM core_message_topics, core_message_posts, core_message_topic_user_map USING core_message_topics LEFT JOIN core_message_topic_user_map ON core_message_topics.mt_id=core_message_topic_user_map.map_topic_id LEFT JOIN core_message_posts ON core_message_topics.mt_id=core_message_posts.msg_topic_id WHERE core_message_topics.mt_starter_id='173418'; Try that... If not, what syntax error are you getting? I have a client that runs this exact query, except it also factors in the time of the message to prune any older than 12 hours or so in the where clause... Also, this query will only work if you're restored all 3 of the tables from before you manually deleted partial bits of data.
Maxtor Posted October 19, 2017 Author Posted October 19, 2017 4 minutes ago, Aiwa said: DELETE FROM core_message_topics, core_message_posts, core_message_topic_user_map USING core_message_topics LEFT JOIN core_message_topic_user_map ON core_message_topics.mt_id=core_message_topic_user_map.map_topic_id LEFT JOIN core_message_posts ON core_message_topics.mt_id=core_message_posts.msg_topic_id WHERE core_message_topics.mt_starter_id='173418'; Try that... If not, what syntax error are you getting? I have a client that runs this exact query, except it also factors in the time of the message to prune any older than 12 hours or so in the where clause... Also, this query will only work if you're restored all 3 of the tables from before you manually deleted partial bits of data. query finally run, my db has a prefix ipm_ thats why had a problem. my question is if i drop those three tables , problem will solve? i want to clear all pms.
Aiwa Posted October 19, 2017 Posted October 19, 2017 Without restoring data, this might work, you might want to run it as a select before a delete to make sure it's returning what you expect. DELETE FROM core_message_topic_user_map LEFT JOIN core_message_topics ON core_message_topics.mt_id=core_message_topic_user_map.map_topic_id WHERE core_message_topics.mt_id IS NULL; If you want to delete ALL pm's in the database regardless of user, you can simply truncate the tables and you're back at square 1 with no user having any PM's... If you want to only delete PM's based on that specific user that started them, you can restore those 3 tables and use the first query, or try the second query and see if it finds the orphaned user_map data so you can delete it.
Maxtor Posted October 19, 2017 Author Posted October 19, 2017 3 minutes ago, Aiwa said: Without restoring data, this might work, you might want to run it as a select before a delete to make sure it's returning what you expect. DELETE FROM core_message_topic_user_map LEFT JOIN core_message_topics ON core_message_topics.mt_id=core_message_topic_user_map.map_topic_id WHERE core_message_topics.mt_id IS NULL; this will remove all pms?
Aiwa Posted October 19, 2017 Posted October 19, 2017 No, that would only find the orphaned data if you didn't restore those 3 tables from a backup. To delete all PM's for EVERY user in the database, just truncate those 3 tables. PMA should have a built in tool to truncate without having to do a manual query.
Maxtor Posted October 19, 2017 Author Posted October 19, 2017 17 minutes ago, Aiwa said: No, that would only find the orphaned data if you didn't restore those 3 tables from a backup. To delete all PM's for EVERY user in the database, just truncate those 3 tables. PMA should have a built in tool to truncate without having to do a manual query. #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN ipm_core_message_topics ON ipm_core_message_topics.mt_id=ipm_core_mess' at line 2
Aiwa Posted October 19, 2017 Posted October 19, 2017 DELETE t1 FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.id IS NULL; https://dev.mysql.com/doc/refman/5.7/en/delete.html
Maxtor Posted October 19, 2017 Author Posted October 19, 2017 12 minutes ago, Aiwa said: DELETE t1 FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.id IS NULL; https://dev.mysql.com/doc/refman/5.7/en/delete.html for removing all pms i use empty or drop?
Maxtor Posted October 19, 2017 Author Posted October 19, 2017 56 minutes ago, Aiwa said: Empty. emptying those 3 tables problem is solved!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.