notice: Undefined index

emmajane - September 3, 2008 - 14:38
Project:Teleport
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Great module, thanks!!

Unfortunately each time I teleport to a new page I get the following error message:

# notice: Undefined index: node in /home/emmajane/websites/drupal/drupal-6/sites/all/modules/teleport/teleport.module on line 296.
# notice: Undefined index: rss.xml in /home/emmajane/websites/drupal/drupal-6/sites/all/modules/teleport/teleport.module on line 296.
# notice: Undefined index: admin in /home/emmajane/websites/drupal/drupal-6/sites/all/modules/teleport/teleport.module on line 296.
# notice: Undefined index: logout in /home/emmajane/websites/drupal/drupal-6/sites/all/modules/teleport/teleport.module on line 296.
# notice: Undefined index: search in /home/emmajane/websites/drupal/drupal-6/sites/all/modules/teleport/teleport.module on line 296.
(etc)

I've tried clearing the cache, but that doesn't help. Refreshing the page gets rid of the error message. I also have the devel module installed (not sure if that makes a difference or not, but it is an additional piece of information).

I'll try upgrading to the -dev version, but I thought I'd let you know this issue is remaining in the "stable" version.

#1

emmajane - September 3, 2008 - 14:47

With the dev version I get the same error message except one line later:

# notice: Undefined index: node in /home/emmajane/websites/drupal/drupal-6/sites/all/modules/teleport/teleport.module on line 297.
# notice: Undefined index: rss.xml in /home/emmajane/websites/drupal/drupal-6/sites/all/modules/teleport/teleport.module on line 297.
# notice: Undefined index: admin in /home/emmajane/websites/drupal/drupal-6/sites/all/modules/teleport/teleport.module on line 297.
# notice: Undefined index: logout in /home/emmajane/websites/drupal/drupal-6/sites/all/modules/teleport/teleport.module on line 297.

#2

incidentist - October 13, 2008 - 04:06

The most recent version (1.2) has a few fixes along these lines, and also has an uninstaller. Reinstalling it may help the problem. Keep in mind that the default hotkey changed to Ctrl-M.

#3

dman - August 30, 2009 - 12:34

I'm getting a million of these. As a developer, I have PHP strict notices on, and trying out this module gave me reams of notices.
DRUPAL-6--1-3

// $Id: teleport.module,v 1.1.2.16 2008/10/23 16:16:00 incidentist Exp $

notice: Undefined index: admin/content/taxonomy/%/add/term in /Library/WebServer/Documents/drupal6/sites/all/modules/contributions/teleport/teleport.module on line 299.

My fix: Just an extra isset()

Index: teleport.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/teleport/teleport.module,v
retrieving revision 1.1.2.16
diff -u -p -r1.1.2.16 teleport.module
--- teleport.module     23 Oct 2008 16:16:00 -0000      1.1.2.16
+++ teleport.module     30 Aug 2009 12:34:01 -0000
@@ -296,7 +296,7 @@ function _teleport_matches_menu_items($q
   // add menu results
   $menus = menu_router_build();
   foreach ($menus as $path => $item) {
-    if (_teleport_should_include_menu_item($item, $path, $query, $aliases[$path] ? $aliases[$path] : $path)) {
+    if (_teleport_should_include_menu_item($item, $path, $query, !empty($aliases[$path]) ? $aliases[$path] : $path)) {
       _teleport_add_to_matches($path, $item['title'], $matches);
     }
   }

 
 

Drupal is a registered trademark of Dries Buytaert.