• Resolved mewcrazy

    (@mewcrazy)


    Hello,

    I’m getting the following Fatal Error on all pages where I use widgets. Maybe even on pages without any widgets, I haven’t tested that since all my pages and subpages have an active sidebar.

    Currently I’m using only the following logics:

    is_user_logged_in()

    !is_user_logged_in()

    Are they okay to use in widget logic like that? They work fine.

    But each page visit my hhvm error.log shows 20! new Fatal errors, all like this one:

    [Sat Jul 4 17:20:21 2015] [hphp] [21253:7f4c87fff700:12:000017] [] \nFatal error: syntax error, unexpected T_GLOBAL in /var/www/247camming.com/htdocs/assets/plugins/widget-logic/widget_logic.php(286) : eval()’d code on line 1

    Weird thing is, the page gets shown fine.

    Any ideas what’s causing this? And even more important, how to debug or fix it? I appreciate any help.

    Kind Regards,
    Dennis

    https://www.ads-software.com/plugins/widget-logic/

Viewing 3 replies - 1 through 3 (of 3 total)
  • a way to debug is to use the “Export options”, so save your setup, and then do something like blank each widget logic in turn until the error goes. That should direct your attention to which widget was the source of the problem

    You can then re-import the original options and correct the problem you found.

    Thread Starter mewcrazy

    (@mewcrazy)

    Well, but the syntax of the logic should be fine right? And those 2 logic’s are the only ones I use in the whole website.

    So I’m not sure if I can debug anything there. If the above logics are right and shouldn’t cause any errors, then the next cause would be some other incompatibility. Like plugins or custom functions in my functions.php

    Well I removed every function of my functions.php and still the same, it seems like its some other plugin causing this. Well I don’t have time to debug this right now, I’ll just deactivate Widget Logic for now :/

    It might be that is_user_logged_in() can only be invoked late in the wordpress page loading process.

    see if the errors go when you change the “Load logic” setting under the options to one of the ‘late load’ options instead of the default

    https://www.ads-software.com/plugins/widget-logic/installation/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal errors on each page visit’ is closed to new replies.