Maxtor Posted October 17, 2017 Posted October 17, 2017 Hello, after using Mass PM from marketplace, i have tried to remove some pms to reduce sql size. My question is when a pm is created , what is changed in DB? I have removed pm contents with this query: DELETE FROM `ipm_core_message_posts` WHERE `msg_post` LIKE '%message contents%' and for message titles this query: DELETE FROM `ipm_core_message_topics` WHERE `mt_title` LIKE '%message title%' is there anywhere else contents of pms?
Daniel F Posted October 18, 2017 Posted October 18, 2017 There also the core_message_topic_user_map table which stores the mapping between the members and their PMs
Aiwa Posted October 18, 2017 Posted October 18, 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.msg_post LIKE '%message contents%' Provided with no warranties. Will delete messages from ALL linked PM tables in one shot based on your WHERE clause.
Maxtor Posted October 18, 2017 Author Posted October 18, 2017 im getting this error after i removed manually pms: OutOfRangeException: (0) #0 /home/maxtor99/public_html/applications/core/modules/front/messaging/messenger.php(394): IPS\Patterns\_ActiveRecord::load(NULL) #1 /home/maxtor99/public_html/system/Dispatcher/Controller.php(96): IPS\core\modules\front\messaging\_messenger->manage() #2 /home/maxtor99/public_html/system/Content/Controller.php(50): IPS\Dispatcher\_Controller->execute() #3 /home/maxtor99/public_html/applications/core/modules/front/messaging/messenger.php(71): IPS\Content\_Controller->execute() #4 /home/maxtor99/public_html/system/Dispatcher/Dispatcher.php(146): IPS\core\modules\front\messaging\_messenger->execute() #5 /home/maxtor99/public_html/index.php(12): IPS\_Dispatcher->run() #6 {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} Some members cannot view their pms. what to do next?
Aiwa Posted October 19, 2017 Posted October 19, 2017 You don't appear to have deleted everything. A row is still being returned by the query to load PM's, but the entry from the _topics table for mt_id is missing.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.