Bridge upgrade to 1.1.7 Major Problems

Started by Hagadoo, March 04, 2007, 10:13:25 PM

Previous topic - Next topic

Hagadoo

I just upgraded following the directions on Joomla 1.0.12 and smf 1.1.2. I had the 1.1.6 bridge in and all was working fine. I overwrote the files with the new ones, and could no longer see my home page, getting the following:
Warning: smf_header_include(/home/hagadooc/public_html/forum/SSI.php) [function.smf-header-include]: failed to open stream: No such file or directory in /home/hagadooc/public_html/mambots/system/SMF_header_include.php on line 70

Fatal error: smf_header_include() [function.require]: Failed opening required '/home/hagadooc/public_html/forum/SSI.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hagadooc/public_html/mambots/system/SMF_header_include.php on line 70


When I unpublish the mambot smfinclude I can get my page back, but cant get the bridge to work. I have searched for the last 2 hours and have not found a similar problem, so getting desperate :(

Hag

Orstio

When I try this:

http://www.hagadoo.com/forum

it doesn't appear that SMF is there.

If Joomla is here:

/home/hagadooc/public_html/ == http://www.hagadoo.com/

Then I think you have your path to SMF wrong in the bridge config.

Hagadoo

Using the same path as before /home/hagadooc/public_html/forum which always worked. Http://www.hagadoo.com/forum used to get me to the form page, but now it does not, if I add index.php after the forem it will connect

Hag

Orstio


Hagadoo

http://www.hagadoo.com/Forum/index.php?www this is what I just had to use to get to the forum, and if you click on a link at the forum recent posts it will take you to the forum. Did I overwrite the wrong files somewhere?

Thanks,

Hag

Hagadoo

I added you as a member so you should be able to see everything.

Hag

Orstio

Case Sensitive.

/home/hagadooc/public_html/Forum  

Hagadoo

That got the bridge to work and the page to display with the mambot published, but getting a database error now:
8: Undefined index: query
File: /home/hagadooc/public_html/templates/js_synergy1024red/mycssmenu.php
Line: 145Database Error: Table 'hagadooc_joom1.smf_sessions' doesn't exist
File: /home/hagadooc/public_html/Forum/Sources/Load.php
Line: 2006
Thanks,
Hag

Orstio

File: /home/hagadooc/public_html/templates/js_synergy1024red/mycssmenu.php
Line: 145

What is on Line 145 of that file?

Hagadoo

#9
do you count down including blanks to that line?

don't know if i can post it here, it is pretty long.

thanks again,
Hag

Orstio

Look for an array key of "query".  It'll look something like this:  $variable['query']

Hagadoo

couldn't find anything that says query, this is as close as I could find which is set query?

}

      if ($mosConfig_shownoauth) {
         $sql = "SELECT m.* FROM #__menu AS m"
         . "\nWHERE menutype='". $menutype ."' AND published='1' AND parent='0'"
         . "\nORDER BY ordering";
      } else {
         $sql = "SELECT m.* FROM #__menu AS m"
         . "\nWHERE menutype='". $menutype ."' AND published='1' AND access <= '$my->gid' AND parent='0'"
         . "\nORDER BY ordering";
      }
      $database->setQuery($sql);

   $rows = $database->loadObjectList( 'id' );
   echo $database->getErrorMsg();

  //include_once( "$mosConfig_absolute_path/templates/" . $cur_template . "/js/ie.js" );


   // I think nav-wrapper is obsolete and can be removed. See comment in suckerfiss.css
   // echo "<div id=\"nav-wrapper\">";
   echo "<div id=\"nav\">";

   $indents = array(
   // block prefix / item prefix / item suffix / block suffix
   array( "<ul>", "<li>" , "</li>", "</ul>" ),
   );

    // establish the hierarchy of the menu
   $children = array();

Hagadoo

It is probably not to big , so I will try to post the whole thing.

<?php
function mosMyCssMenu($menutype) {
   global $database, $my, $cur_template, $Itemid;
   global $mosConfig_absolute_path, $mosConfig_live_site, $mosConfig_shownoauth;
    $module = "suckerfish";
   $class_sfx = null;

    /* If a user has signed in, get their user type */
   $intUserType = 0;
   if($my->gid){
      switch ($my->usertype)
      {
         case 'Super Administrator':
         $intUserType = 0;
         break;
         case 'Administrator':
         $intUserType = 1;
         break;
         case 'Editor':
         $intUserType = 2;
         break;
         case 'Registered':
         $intUserType = 3;
         break;
         case 'Author':
         $intUserType = 4;
         break;
         case 'Publisher':
         $intUserType = 5;
         break;
         case 'Manager':
         $intUserType = 6;
         break;
      }
   }
   else
   {
      /* user isn't logged in so make their usertype 0 */
      $intUserType = 0;
   }

      if ($mosConfig_shownoauth) {
         $sql = "SELECT m.* FROM #__menu AS m"
         . "\nWHERE menutype='". $menutype ."' AND published='1' AND parent='0'"
         . "\nORDER BY ordering";
      } else {
         $sql = "SELECT m.* FROM #__menu AS m"
         . "\nWHERE menutype='". $menutype ."' AND published='1' AND access <= '$my->gid' AND parent='0'"
         . "\nORDER BY ordering";
      }
      $database->setQuery($sql);

   $rows = $database->loadObjectList( 'id' );
   echo $database->getErrorMsg();

  //include_once( "$mosConfig_absolute_path/templates/" . $cur_template . "/js/ie.js" );


   // I think nav-wrapper is obsolete and can be removed. See comment in suckerfiss.css
   // echo "<div id=\"nav-wrapper\">";
   echo "<div id=\"nav\">";

   $indents = array(
   // block prefix / item prefix / item suffix / block suffix
   array( "<ul>", "<li>" , "</li>", "</ul>" ),
   );

    // establish the hierarchy of the menu
   $children = array();

    // first pass - collect children
    foreach ($rows as $v ) {
      $pt = $v->parent;
      $list = @$children[$pt] ? $children[$pt] : array();
      array_push( $list, $v );

        $children[$pt] = $list;

    }

    // second pass - collect 'open' menus
   $open = array( $Itemid );
   $count = 20; // maximum levels - to prevent runaway loop
   $id = $Itemid;
   while (--$count) {
      if (isset($rows[$id]) && $rows[$id]->parent > 0) {
         $id = $rows[$id]->parent;
         $open[] = $id;
      } else {
         break;
      }
   }

    mosRecurseListMenu( 0, 0, $children, $open, $indents, $class_sfx );

   echo "</div>";
   //   echo "</div>"; (see note on parent div above)
}

/**
* Utility function to recursively work through a vertically indented
* hierarchial menu
*/
function mosRecurseListMenu( $id, $level, &$children, $open, &$indents, $class_sfx ) {
   global $Itemid;
   global $HTTP_SERVER_VARS, $mosConfig_live_site;

   if (@$children[$id]) {
      $n = min( $level, count( $indents )-1 );

        echo $indents[$n][0];

      foreach ($children[$id] as $row) {
      
              switch ($row->type) {
                case 'separator';
                // do nothing
                break;
         
                case 'url':
                if ( eregi( 'index.php\?', $row->link ) ) {
                    if ( !eregi( 'Itemid=', $row->link ) ) {
                       $row->link .= '&Itemid='. $row->id;
                    }
                 }
                break;
         
                default:
                   $row->link .= "&Itemid=$row->id";
         
                break;
             }

            $li =  "\n".$indents[$n][1] ;
            
            //$current_itemid = trim( mosGetParam( $_REQUEST, 'Itemid', 0 ) );

            //echo $current_itemid . "<br />";
            //echo (">>" . sefRelToAbs( substr($_SERVER['PHP_SELF'],0,-9) . $row->link) . " - " . $_SERVER['REQUEST_URI'] . "<br />");
           // echo (">>" . sefRelToAbs( substr($_SERVER['PHP_SELF'],0,-9) . $row->link) . " - " . $HTTP_SERVER_VARS['REQUEST_URI'] . "<br />");
            //echo (">>>" . $Itemid . " - " . $row->id . "<br /><br />");
            //echo (">>>>" . substr($row->link,strpos($row->link, 'Itemid')));
            error_reporting(E_ALL ^ E_NOTICE);
            $url = parse_url($row->link);
            parse_str($url['query'], $url_params);
            //print_r ($url_params['Itemid']);
            if ($Itemid == $row->id ||
                (sefRelToAbs( substr($_SERVER['PHP_SELF'],0,-9) . $row->link)) == $_SERVER['REQUEST_URI'] ||
                (sefRelToAbs( substr($_SERVER['PHP_SELF'],0,-9) . $row->link)) == $HTTP_SERVER_VARS['REQUEST_URI'] ||
                ($url_params['Itemid'] == $Itemid)) {
                     $li = "<li class='active'>";
                  }
             echo $li;
               
           
           
            echo mosGetLink( $row, $level, $class_sfx );

            //   if (in_array( $row->id, $open )) {
         mosRecurseListMenu( $row->id, $level+1, $children, $open, $indents, $class_sfx );
          //   }

            echo $indents[$n][2];

        }

      echo "\n".$indents[$n][3];

   }
}

/**
* Utility function for writing a menu link
*/
function mosGetLink( $mitem, $level=0, $class_sfx='' ) {
   global $Itemid, $mosConfig_live_site;
   $txt = '';



   $mitem->link = str_replace( '&', '&amp;', $mitem->link );

   if (strcasecmp(substr($mitem->link,0,4),"http")) {
      $mitem->link = sefRelToAbs($mitem->link);
   }

    switch ($mitem->browserNav) {
      // cases are slightly different
      case 1:
      // open in a new window
        if ($mitem->cnt > 0) {
         $txt = "<a class=\"daddy\" target=\"_window\"  href=\"$mitem->link\">$mitem->name</a>";
      } else {
            $txt = "<a href=\"$mitem->link\" target=\"_window\" >$mitem->name</a>\n";
      }
      break;

      case 2:
      // open in a popup window
        if ($mitem->cnt > 0) {
         $txt = "<a href=\"#\" class=\"daddy\" onClick=\"javascript: window.open('$mitem->link', '', 'toolbar=               no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'            );\" class=\"$menuclass\">$mitem->name</a>\n";
      } else {
          $txt = "<a href=\"#\" onClick=\"javascript: window.open('$mitem->link', '', 'toolbar=               no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'            );\" class=\"$menuclass\">$mitem->name</a>\n";
      }

      break;

      case 3:
      // don't link it
         if ($mitem->cnt > 0) {
         $txt = "<a class=\"daddy\" >$mitem->name</a>\n";
      } else {
            $txt = "<a>$mitem->name</a>\n";
      }

      break;

      default:   // formerly case 2
      // open in parent window
      if (isset($mitem->cnt) && $mitem->cnt > 0) {
          if ($level == 0) {
                $txt = "<a class=\"topdaddy\" href=\"$mitem->link\">$mitem->name</a>";
         } else {
                $txt = "<a class=\"daddy\" href=\"$mitem->link\">$mitem->name</a>";
         }
      } else {
         $txt = "<a href=\"$mitem->link\">$mitem->name</a>";
      }
        break;
   }
    return $txt;
}
?>


Thanks again, I really appreciate the help, more than you can imagine!!!

Hag

Orstio

            $url = parse_url($row->link);
            parse_str($url['query'], $url_params);


Comment out those two lines.  That template is heavy with things that shouldn't be done in a template, and don't need to be done in the template.  It's reproducing a lot of things that are already done in Joomla.

Hagadoo

Now I get a new error line 150

8: Undefined variable: url_params
File: /home/hagadooc/public_html/templates/js_synergy1024red/mycssmenu.php
Line: 150Database Error: Table 'hagadooc_joom1.smf_sessions' doesn't exist
File: /home/hagadooc/public_html/Forum/Sources/Load.php
Line: 2006

Hagadoo

I ended up uninstalling 1.1.7 and then re-installed 1.1.6 and it works fine. Must be an issue with 1.1.7 and my template.

Thanks for the help

Hag

Orstio

If I were you, I would just switch to a better-written template.  It seems you don't have the ability to read the error message and deduce what it is saying to you, and I can't spend the time running through all the problems in that template.

Hagadoo

Thanks for the help, new template was defiantely the way to go!!


Thanks again,

Hag

Advertisement: