Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sun Apr 22, 2012 6:10 am Reply with quote

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
 
View user's profile Send private message Send e-mail
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sun Apr 22, 2012 7:50 am Reply with quote

@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.
 
View user's profile Send private message Visit poster's website
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Sun Apr 22, 2012 9:14 am Reply with quote

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.
 
View user's profile Send private message Visit poster's website
fkelly







PostPosted: Sun Apr 22, 2012 9:31 am Reply with quote

@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.
 
Guardian2003







PostPosted: Sun Apr 22, 2012 4:26 pm Reply with quote

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.
 
fkelly







PostPosted: Sun Apr 22, 2012 4:32 pm Reply with quote

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&amp;bid='.$bid.'">'._ACTIVATE.'</a> | <a class="rn_csrf" href="'.$admin_file.'.php?op=BlocksEdit&amp;bid='.$bid.'">'._EDIT.'</a> | ';
   if (empty($bkey)) {
      echo '<a class="rn_csrf" href="'.$admin_file.'.php?op=BlocksDelete&amp;bid='.$bid.'">'._DELETE.'</a> | ';
   } else {
      echo _DELETE.' | ';
   }
   echo '<a href="'.$admin_file.'.php?op=BlocksAdmin">'._BLOCKSADMIN.'</a> ]</p>';
   CloseTable();
   include_once('footer.php');
}
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©