Undefined Variable - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: Undefined Variable (/showthread.php?tid=358) |
Undefined Variable - daniele.polencic - 2010-02-04 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> 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> and this is tue output: Code: Array 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 Undefined Variable - ccagle8 - 2010-02-04 does the same thing happen when you have fancy urls turned ON? Undefined Variable - daniele.polencic - 2010-02-04 ccagle8 Wrote:does the same thing happen when you have fancy urls turned ON?It works with fancy urls turned on. Thank You Pole Undefined Variable - daniele.polencic - 2010-02-07 daniele.polencic Wrote:ccagle8 Wrote:does the same thing happen when you have fancy urls turned ON?It works with fancy urls turned on. The "bug" is here: Code: if ($PRETTYURLS == '1') { And I changed it to: Code: if ($slug == 'index' ) { $slugs = ''; } else { $slugs = $slug; } And it works. Thank you Pole Undefined Variable - ccagle8 - 2010-02-07 Thanks! I will add it in and test it... Undefined Variable - colmag - 2010-08-16 Hello, I started using GetSimple CMS as of yesterday and really like it, so far. However, when building my own menu via the menu_data() function I got the same error mentioned in the opening post. When I looked for a solution I looked at the line specified by the PHP error output and saw that all I had to do was to change $slugs into $slug to make the function not return any erros but the slugs instead :-) I don't know if that is all there is to it but it works for me and you might want to fix that bug (if it is one) in your next release. Thanks for an awesome piece of software, Jan Undefined Variable - Zegnåt - 2010-08-18 It should already be fixed in the last beta version, the next stable release is close so the bug will not exist once that one gets out. Thanks for noticing. |