Author |
Message |
neralex
Site Admin
Joined: Aug 22, 2007
Posts: 1774
|
Posted:
Tue Jul 10, 2012 8:08 am |
|
Hey guys!
I have found an issue, if i try to delete an forum posting. In the confirm section (YES/NO) was loaded after the nuke footer an empty posting formular and i don't found the solution to delete this formular. I get this problem in all themes of the RN25 package.
raven25/modules.php?name=Forums&file=posting&mode=delete&p=5
|
Last edited by neralex on Wed Jul 11, 2012 2:03 pm; edited 3 times in total |
|
|
|
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm
Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Tue Jul 10, 2012 7:19 pm |
|
WOW! I didn't notice that until now. you are right!
I think it is the QUICK_REPLY_FORM which is not in the correct place. I am searching on viewtopic_body.tpl |
|
|
|
|
neralex
|
Posted:
Wed Jul 11, 2012 1:35 pm |
|
Idea was good, but not the solution
|
|
|
|
|
neralex
|
Posted:
Wed Jul 11, 2012 2:02 pm |
|
next try:
open: modules/Forums/posting.php
find:
Code:$template->pparse('body');
|
replace it:
Code:if( $mode != 'delete' ) {
$template->pparse('body');
}
|
I hope it works in all functions... |
|
|
|
|
hicuxunicorniobestbuildpc
|
Posted:
Wed Jul 11, 2012 4:48 pm |
|
neralex, the problem has been solved. Thanks buddy. We need to do this steps to all the themes. |
|
|
|
|
montego
Site Admin
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sat Jul 14, 2012 10:22 am |
|
|
|
|
Palbin
Site Admin
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Sun Jul 15, 2012 4:54 pm |
|
The proper thing to do is add an exit after line 475.
Code:
include_once("modules/Forums/includes/page_tail.php");
exit;
}
|
|
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
|
hicuxunicorniobestbuildpc
|
Posted:
Sun Jul 15, 2012 5:25 pm |
|
Palbin, this doesn't work. I get a blank page when I delete a forum. I look on the file posting.php and there are 2 lines which contains this
Code:include_once("modules/Forums/includes/page_tail.php");
| This one is around 653, I added your code but no luck.
At the end we also have the same and it doesn't work neither. |
|
|
|
|
Palbin
|
Posted:
Sun Jul 15, 2012 6:21 pm |
|
Are you sure you just added the "exit;" and nothing else? Make sure you did not add a trailing "}". Your file should look like this: [ Only registered users can see links on this board! Get registered or login! ] |
|
|
|
|
hicuxunicorniobestbuildpc
|
Posted:
Sun Jul 15, 2012 6:49 pm |
|
yes I'm very sure, it is not working |
|
|
|
|
montego
|
Posted:
Sat Jul 21, 2012 10:19 am |
|
how about
die();
instead of:
exit; |
|
|
|
|
hicuxunicorniobestbuildpc
|
Posted:
Sat Jul 21, 2012 2:00 pm |
|
palbin, after taking a look on your file I must say it is working. The problem was I commented this code out. It is working find exit;
Code://$template->pparse('body');
| ]
It should be in the bottom like this
Code:$template->pparse('body');
include_once("modules/Forums/includes/page_tail.php");
|
your trick works
Code: $template->pparse('confirm_body');
include_once("modules/Forums/includes/page_tail.php");
exit;
}
else if ( $mode == 'vote' )
{
|
|
|
|
|
|
neralex
|
Posted:
Sun Jul 22, 2012 3:57 am |
|
|
|
|
neralex
|
Posted:
Sat Jan 19, 2013 7:27 am |
|
I have found the same issue in the Private Messages module, when i'm trying to delete all messages.
open modules/Private_Messages/index.php:
search:
Code: if ( !$confirm ) {
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
$s_hidden_fields .= ( isset($HTTP_POST_VARS['delete']) ) ? '<input type="hidden" name="delete" value="true" />' : '<input type="hidden" name="deleteall" value="true" />';
$s_hidden_fields .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
for($i = 0; $i < count($mark_list); $i++) {
$s_hidden_fields .= '<input type="hidden" name="mark[]" value="' . intval($mark_list[$i]) . '" />';
}
//
// Output confirmation page
//
include_once($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'confirm_body' => 'confirm_body.tpl')
);
$template->assign_vars(array(
'MESSAGE_TITLE' => $lang['Information'],
'MESSAGE_TEXT' => ( count($mark_list) == 1 ) ? $lang['Confirm_delete_pm'] : $lang['Confirm_delete_pms'],
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
'S_CONFIRM_ACTION' => append_sid("privmsg.$phpEx?folder=$folder"),
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
$template->pparse('confirm_body');
include_once($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
|
search in this part the last include_once and add exit; after this line:
Code: if ( !$confirm ) {
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
$s_hidden_fields .= ( isset($HTTP_POST_VARS['delete']) ) ? '<input type="hidden" name="delete" value="true" />' : '<input type="hidden" name="deleteall" value="true" />';
$s_hidden_fields .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
for($i = 0; $i < count($mark_list); $i++) {
$s_hidden_fields .= '<input type="hidden" name="mark[]" value="' . intval($mark_list[$i]) . '" />';
}
//
// Output confirmation page
//
include_once($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'confirm_body' => 'confirm_body.tpl')
);
$template->assign_vars(array(
'MESSAGE_TITLE' => $lang['Information'],
'MESSAGE_TEXT' => ( count($mark_list) == 1 ) ? $lang['Confirm_delete_pm'] : $lang['Confirm_delete_pms'],
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
'S_CONFIRM_ACTION' => append_sid("privmsg.$phpEx?folder=$folder"),
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
$template->pparse('confirm_body');
include_once($phpbb_root_path . 'includes/page_tail.'.$phpEx);
exit; // neralex 190113
}
|
|
|
|
|
|
hicuxunicorniobestbuildpc
|
Posted:
Sat Jan 19, 2013 5:52 pm |
|
OMG, are u kidding me? I can't believe this. I'm gonna check this right now.
Hi, I just tried to delete all messages and everything went smooth. I am not able to reproduce this error. I don't get it. |
|
|
|
|
neralex
|
Posted:
Sat Jan 19, 2013 7:51 pm |
|
Believe what do you want... i can only say what i have seen. I have here 4 local installations and with the core package without any mods i get this error. Try it again an scroll down, when you get the question: YES or NO |
|
|
|
|
|