Support » Plugin: Widgets on Pages » v.1.x.x not playing nice with WPAlchemy

  • Hi there!

    I’m using WPAlchemy to provide metaboxes on the the edit panel on a site where the client installed this plugin. I went in a few days ago to make sure everything was updated, etc, and updated from a pre-1.x.x version to 1.0.4.

    After doing that, the metaboxes in the edit panel disappeared. No PHP Error, just not getting parsed into the page. (I’m not 100% that this plugin was doing what it’s intended to do; I really don’t know what the client’s intention was there and we are about to do a total rebuild soon.)

    I rolled back version by version until I found one without the issue (0.0.12). I did try the beta version as well.

    I’m doing most of this testing in my dev env, so I tried a few versions of PHP with 1.0.4 to no avail.

    My next step is to do a compare between 0.0.12 and 1.0.0, but it looks like it’s a full rewrite, so I doubt I’ll be able to find this needle in a haystack.

    Willing to help debug this, cos I like to keep my code current, but might need some guidance as I am completely unfamiliar with the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author toddhalfpenny

    (@toddhalfpenny)

    Sorry to hear this @foxydot.

    I’ve not used WPAlchemy before, so I have no immediate ideas.
    my recommendation would be to sit back on v0.0.12, until I get investigate and get you an update.

    Yes, v1.x was a full rewrite… Good fun.

    I shall have a look into this and see what’s up.

    Oh, and thanks for the offer in helping to debug.

    As I expected, the diff was kind of useless because of the full rebuild. I’m switching back to beta in my dev env and going to start some incremental tests . ;D

    I’ll let you know if I find anything that seems to be useful.

    ok, I need to move on from this, but here’s what I found so far:

    Widgets_On_Pages_Admin::wop_register_sidebar() $loop seems to be hijacking the page type in the admin screen. I’m not sure exactly how, but if I change the params on my Metabox generator to include ‘turbo-sidebar-cpt’, my metaboxes show up on the admin screen again. (of course they also show up on the edit panel for each turbo-sidebar-cpt as well, not)

    So whatever is going on with the loop, it’s somehow fooling this custom method in WPAlchemy (https://github.com/farinspace/wpalchemy/blob/master/wp-content/wpalchemy/MetaBox.php#L1001) into thinking that the “post” is now a “turbo-sidebar-cpt”.

    One thing you might want to add, although it didn’t help fix this issue, is a wp_reset_postdata() after your while statement. I thought it should fix that problem, but it did not.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘v.1.x.x not playing nice with WPAlchemy’ is closed to new replies.