Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Undefined Variable
#1
Hi!

when I try to load the index page with flag debug actived I obtain:

Notice: Undefined variable: inter in /var/www/getsimple/admin/inc/theme_functions.php on line 96
Notice: Undefined variable: slugs in /var/www/getsimple/admin/inc/theme_functions.php on line 235
Notice: Undefined variable: slugs in /var/www/getsimple/admin/inc/theme_functions.php on line 238

the only code i have written is:

Code:
<head>
  
  <?php get_header(); ?>
  
  
</head>
<body>
  
  <?php $data = menu_data(); ?>
  
</body>
</html>

I can't run this function http://get-simple.info/forum/viewtopic.php?id=235 because the variable slug is always empty and url lacks of slug. I try to print the array with this code:

Code:
<head>
  
  <?php get_header(); ?>
  
  
</head>
<body>
  
  <?php $data = menu_data(); print("<pre>".print_r($data,true)."</pre>"); ?>
  
</body>

and this is tue output:

Code:
Array
(
    [0] => Array
        (
            [slug] =>
            [url] => http://192.168.0.2/getsimple/index.php?id=
            [parent_slug] => rooms
            [title] => Room A
            [menu_priority] => 0
            [menu_text] => Room A
            [menu_status] =>
            [private] =>
            [pub_date] => Wed, 03 Feb 2010 15:31:11 +0100
        )

    [1] => Array
        (
            [slug] =>
            [url] => http://192.168.0.2/getsimple/index.php?id=
            [parent_slug] =>
            [title] => Choose Your Room
            [menu_priority] => 0
            [menu_text] => Rooms
            [menu_status] => Y
            [private] =>
            [pub_date] => Wed, 03 Feb 2010 15:30:15 +0100
        )

    [2] => Array
        (
            [slug] =>
            [url] => http://192.168.0.2/getsimple/index.php?id=
            [parent_slug] =>
            [title] => Index
            [menu_priority] => 1
            [menu_text] => Home
            [menu_status] =>
            [private] =>
            [pub_date] => Wed, 03 Feb 2010 16:31:01 +0100
        )

)

The field 'slug' is always blank. The structure of pages is like:

+--index
|
---rooms
|
---room A

rooms ha slug 'rooms' and room a has slug 'room-a'

I cant' solve this problem, could you help me?

I'm running on Getsimple 2.0



Thank you

Pole
Reply


Messages In This Thread
Undefined Variable - by daniele.polencic - 2010-02-04, 03:55:42
Undefined Variable - by ccagle8 - 2010-02-04, 10:49:50
Undefined Variable - by daniele.polencic - 2010-02-04, 19:26:39
Undefined Variable - by daniele.polencic - 2010-02-07, 04:20:23
Undefined Variable - by ccagle8 - 2010-02-07, 04:43:09
Undefined Variable - by colmag - 2010-08-16, 23:55:35
Undefined Variable - by Zegnåt - 2010-08-18, 02:42:33



Users browsing this thread: 1 Guest(s)