Author |
Message |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sun Apr 22, 2012 6:10 am |
|
When in the blocks administration area and a block is not active, clicking the 'show' link exposes an error;
Missing argument 3 for blockfileinc(), called in /path/to/admin/modules/blocks.php on line 433 and defined in /path/to/mainfile.php on line 843
Pretty sure this worked in earlier versions of RN, even if the block was not active. The original purpose of 'show' was to see what the block looked like before deciding whether to activate it or not.
Looks like blockfileinc() is needing a value for $side in this instance |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fkelly
Former Moderator in Good Standing
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Sun Apr 22, 2012 7:50 am |
|
@Guardian: are you sure you have a current /admin/modules/blocks.php file? The versions I am looking at have $bposition as the third parameter in the call to blockfileinc(). This error may have been present at some stage in the evolution of the file but I'm pretty sure it was eliminated before 2.5 was released. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Sun Apr 22, 2012 9:14 am |
|
fkelly, you committed code for this at the end of Feb, and there is an issue under 2.51 in mantis (#1974), so the issue does exist in 2.5. Not sure if the changes were merged into 3.0 yet. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fkelly
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Apr 22, 2012 9:31 am |
|
@spasticdonkey: thanks for looking into this. I'm not quite sure what we are doing with 2.51 or in what form it will be released. Guardian has access to the svn so can get the fix but others are out of luck the way things stand. I would prefer to see a "patch" release only or some other way to make patches to critical bugs available to 2.5 users without necessarily loading a full new 2.51 distribution. As long as there are no database changes that should be feasible. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Apr 22, 2012 4:26 pm |
|
Issue was in the RN 2.5 distro downloaded from here.
As this is a public forum, I'll just say I don't have SVN access; I'm assuming my old account is no longer valid but I don't have the details any more. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fkelly
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Apr 22, 2012 4:32 pm |
|
Okay Guardian, sorry. Here is the block_show function. Replace yours and see if this works for you ...
Code:function block_show($bid) {
if(!defined('BLOCK_FILE')) {define('BLOCK_FILE', true);}
global $prefix, $db, $admin_file;
include_once('header.php');
GraphicAdmin();
title(_BLOCKSADMIN);
OpenTable2();
$bid = intval($bid);
$row = $db->sql_fetchrow($db->sql_query('select bid, bkey, title, content, url, bposition, blockfile, max_rss_items from '.$prefix.'_blocks where bid=\''.$bid.'\''));
$bid = $row['bid'];
$bkey = $row['bkey'];
$title = $row['title'];
$content = $row['content'];
$url = $row['url'];
$bposition = $row['bposition'];
$blockfile = $row['blockfile'];
$maxrss = $row['max_rss_items'];
if ($bkey == 'admin') {
adminblock();
} elseif ($bkey == 'category') {
category();
} elseif ($bkey == 'userbox') {
userblock();
} elseif (empty($bkey)) {
if (empty($url)) {
if (empty($blockfile)) {
if ($bposition == 'c') {
themecenterbox($title, $content);
} else {
themesidebox($title, $content);
}
} else {
if ($bposition == 'c') {
blockfileinc($title, $blockfile, $bposition);
} else {
blockfileinc($title, $blockfile, $bposition);
}
}
} else {
headlines($bid);
}
}
CloseTable2();
echo '<br />';
OpenTable();
echo '<p style="text-align: center;" class="option"><span class="thick">'._BLOCKSADMIN.': '._FUNCTIONS.'</span><br />'
.'[ <a class="rn_csrf" href="'.$admin_file.'.php?op=ChangeStatus&bid='.$bid.'">'._ACTIVATE.'</a> | <a class="rn_csrf" href="'.$admin_file.'.php?op=BlocksEdit&bid='.$bid.'">'._EDIT.'</a> | ';
if (empty($bkey)) {
echo '<a class="rn_csrf" href="'.$admin_file.'.php?op=BlocksDelete&bid='.$bid.'">'._DELETE.'</a> | ';
} else {
echo _DELETE.' | ';
}
echo '<a href="'.$admin_file.'.php?op=BlocksAdmin">'._BLOCKSADMIN.'</a> ]</p>';
CloseTable();
include_once('footer.php');
}
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|