• Resolved parhaggstrom

    (@parhaggstrom)


    Your plugin causes load order issues when activated. To replicate:

    1. have a plugin with a get function that returns an array with data and a simple filter function for that data. For example an array with post types that you want to register

    2. Create a filter in the theme functions and extend or alter that array.

    3. Run a function in the plugin on the ‘init’ hook that registers those post types.

    4. Trigger a few get requests on different positions of the page load to access your array of post types before and after your own plugin loads

    This will work if your get function executes the filter every time its get called.
    BUT if you cache the first execution of the get function and the filters inside it your data will no longer get extended by the theme.

    This is a big issue for themes in need of modifying data and where the plugins are caching their data after first execution.

    Deactivating your plugin solves the issue and accepts theme functions filters to modify even the first get call and therefor returns the correct data even when cached

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter parhaggstrom

    (@parhaggstrom)

    To further explain the problem. Normally a WP load will go over everything and queue up actions and filters to be fired at the correct time then initiate them in the correct order.

    Somehow your plugin breaks the initial enqueue run and only runs the functions.php on the last initiate run, meaning all the early hooks wont get queued up correctly.

    It also means that even if I stated that it “works” if the filter fires every time the function gets called. It will still return different results every time and the modifications added by the functions.php will only show up at the very last calls to the function crippling the entire filter and action system in WP

    This is a major issue and should be considered a a high priority since it creates problems and issues in all other parts of WP resulting in other plugin and theme developers probably getting error reports because of your plugin breaking theirs

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @parhaggstrom

    Unless it’s spam, abuse or something broken in the forums please do not report topics again.

    It is not a means to get faster support, it only gets forum moderators attention and no one else.

    Plugin Author mppellicer

    (@mppellicer)

    Hello @parhaggstrom

    From now on we didn’t receive any other related report with the same issue. Yours is the first, so we don’t think this is a generalised major issue but something related to your specific site or theme.

    Might you please share some specific code and case helping us to identify the problem?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Load order gets messed up and ignoring functions.php’ is closed to new replies.