-
Improvement
-
Resolution: Won't Fix
-
Minor
-
3.0.11
-
None
-
PHP 5.4.7
Current scenario:
- Alice reads a post
- Alice clicks the "PM" button to quote the post and having the post author as pre-filled recipient
- Alice adds text to the PM
- Bob deletes that post
- Alice clicks "Preview" or "Submit" or wants to add another recipient and hits "Add"
- Alice gets the error "Private message could not be found"
Improvement: while I understand, that step #2 should fail if the post is already not available anymore, it is quite annoying after typing a long PM and later get that halfway misleading message - your only chance is to compose a new PM, which means filling in all recipients, the subject, the post text and adjusting all settings anew. Just because the refering post doesn't exist anymore.
As a consquence, I suggest to not throw an error message once the PM has been shown in the editor, which means upon each HTTP POST request or certain HTTP GET requests it shouldn't been shown anymore.
Open /includes/ucp/ucp_pm_compose.php and find:
case 'reply':
|
case 'quote':
|
case 'forward':
|
case 'quotepost':
|
/*** 2013-06-12 BEGIN AmigoJack
|
Submitting a PM when post no longer exists ***/
|
//if (!$msg_id)
|
if( !$msg_id
|
&&( $action!= 'quotepost' // Allow this action...
|
||( !$submit // ...upon POST or certain GETs
|
&& !$refresh
|
)
|
)
|
)
|
/*** 2013-06-12 END ***/
|
Find:
if ($post)
|
{
|
trigger_error('NO_EDIT_READ_MESSAGE');
|
}
|
}
|
/*** 2013-06-12 BEGIN AmigoJack
|
Do not freak out if we already wrote something ***/
|
if( $action== 'quotepost' // Allow this action...
|
&&( $submit // ...upon POST or certain GETs
|
|| $preview
|
|| $refresh
|
)
|
) {
|
// nothing
|
} else
|
/*** 2013-06-12 END ***/
|