• Resolved violacase

    (@violacase)


    Theme TwentyFourteen with active DEBUG says:
    Notice: Undefined variable: genericon_rotate in /path/to/genericons.php on line 116

    TIP: It’s a silly little bug. Better test your plugins fully with debugger before publishing.

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Irony? I’m on the plugin review team and I did! Just pushed the wrong file. I’ll fix this today *sigh*

    See? Nobody’s perfect!

    Thread Starter violacase

    (@violacase)

    πŸ˜‰

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Huh… That’s so weird that I DON’T see that error with Debug on.

    But still, I see where that would be caused. There’s no fall back for it.

    Version 3.0.3.3 coming in a moment.

    Thread Starter violacase

    (@violacase)

    Sure you don’t run any cache services? Otherwise you really have to rethink your WordPress setup.

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    On MAMP? Naaah. I always dev on localhost with no caching, then I go to a live site and test uploading. THEN it goes into real sites.

    (I also don’t run caching on my live sites like most people mean – no WP Super Cache or W3 Total Cache. Memcached, PHP ZendOptimizerPlus, and Varnish for the most part.)

    Thread Starter violacase

    (@violacase)

    Well, I’ve noticed you defined the var genericon_rotate in the last update.

    Still it’s odd you couldn’t see the debugger notice.
    I also do my tests without any cacheing on the server side. For WordPress I’ve installed the famous Debug Bar plugin and Kint Debug.

    For Chrome I use the very handy Clear Cache add on.

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Yeah, not having a default was certainly not correct (now it’s ‘normal’).

    I have that add-on as well. I even went and spun up a VVV install (just figured that out today) and couldn’t catch it. What version of PHP are you using? I tested on 5.4 and 5.3.

    Thread Starter violacase

    (@violacase)

    Hi Mika,

    The site that showed the bug runs on PHP 5.3.3 Apache mode.
    Last idea: did you actually test some code with any undefined var(s)?
    A good debug setup MUST inform you. What’s the use of debugging otherwise?

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Nup, had a totally naked site, never installed the plugin, fresh DB. That’s why I love Vagrant. Well I’ll keep banging on that. What page did you get the notice on? On display? On every page?

    Thread Starter violacase

    (@violacase)

    Mika,

    First things first:
    1. Deactivate your plugin.
    2. Deliberately put some errors in your plugin code.
    3. Activate your plugin and see what happens. Check debug console.
    4. Call your code on any page/post/function and see what happens. Check debug console.

    If debugger catches all errors problem is solved.

    If not, notice me. My debugging practice is simple but works. I can explain my debug setup in more detail but please first try yourself.

    NOTA: Are you sure you have Debug Bar plugin running? Standard WP_DEBUG doesn’t show Warnings and Notices.

    I’ve just installed & activated the plugin on one of my local server sites (PHP 5.3.3 Apache) – the one that’s set up to log every warning and error to hell & back for theme reviews. I couldn’t see any error messages – not in the front end or the back end. Nada. Zilch.

    HTH

    Thread Starter violacase

    (@violacase)

    @esmi:

    The plugin has been updated and works fine now. This topic already was marked as ‘resolved’. @mika and I are just exchanging some afterthoughts now. Perhaps not the best place. Sorry…

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Nah, it’s fine πŸ™‚

    violacase – “Check debug console.”

    WHICH console? This may be the actual answer to everything. The browser’s console or WPs (which you can only get if you have a debug bar type plugin)

    Thread Starter violacase

    (@violacase)

    Well, you can choose whatever setup you’d like. There are Chrome add-ons for PHP, independent system watchers, etc.

    Whatever you set up: there’s always SOME kind of console to watch the debugging info. I’ll give you my setup:

    On the server side:
    In wp-config.php: define('WP_DEBUG', true);
    Installed WordPress plugins: Debug Bar and Kint Debugger.
    On the client side (Win8) Chrome with its great Inspector. Here I can closely watch and trace HTML, CSS and Javascript on the fly. Above this 8 extensions that do their own great work. Google on DevTools

    That’s all. Works fine for me. I think this should be enough info.
    Happy coding!

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Right. I get you think you’re being helpful, but if you don’t tell me what one you happened to be looking at when you saw that specific error, it’s really not useful.

    I know how to test, and use a debugger, and using the debug bar and define, I still don’t get THAT specific error. So for you to really be helpful you could explain something like “When I have chrome inspector open and visit a post where I’m using a genericon, I see this error…”

    Instead, you’ve been maddeningly vague. Again, I know you have good intentions, but it’s really not the sort of information I need to understand how to reproduce your error. A good bug report has specific directions to reproduce, maybe a screenshot if you’re not sure how to describe it πŸ™‚ this just happened to be one I could see as non optimal code, so you were lucky.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Debugger notice’ is closed to new replies.