Initialisation bug (including fix) in latest version
-
Hi,
As others have also pointed out, the plugin seems to not work properly, at its latest version (currently at v2.3.1).
I had the chance to troubleshoot and ultimately fix the issue, since I needed to use the plugin, so I’m sharing it here for others, and the plugin author as well.
Short answer:
Replace- 1
with20
in debug-objects.php:225Long answer:
It seems that the root cause is an error in the plugin’s initialisation sequence:1. The static
Debug_Objects::get_object()
method is hooked atplugins_loaded
with priority 10 (default), at debug-objects.php:28.2. When it runs, it calls the constructor of
Debug_Objects
(debug-objects.php:86).3. The constructor calls the
Debug_Objects:init_classes()
method (debug-objects.php:127).4. The
init_classes
method schedules the intialisation of further classes, by hooking onplugins_loaded
with priority-1
.Now, since the whole sequence was triggered by the
plugins_loaded
hook having already reached priority 10 (see Step 1), any action callbacks added to that hook with priority less than 11, are never executed.A quick solution is to increase that priority to a number greater than 10 (see
Short answer
). That restored full plugin functionality in my case.
- The topic ‘Initialisation bug (including fix) in latest version’ is closed to new replies.