Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional Logic Issue 1.6.4: Postbox-container incorrectly being hidden on load #1300

Open
wgstjf opened this issue Jan 22, 2019 · 0 comments

Comments

@wgstjf
Copy link

wgstjf commented Jan 22, 2019

Hi guys,

We've got an issue that has arisen since updating Conditional Logic to 1.6.4. The issue is that metaboxes which are visible or hidden based on logic no longer show when they're supposed to. They worked perfectly before the 1.6.4 update.

Here's an example of a situation which no longer works...worth noting we are mainly reliant on the 'page_template' value for deciding visibility

$meta_boxes[] = array(
	'id'       => 'page-panel-primary',
	'title'    => 'Primary Content Panel Setup',
	'pages'    => array( 'page','product'),
	'context'  => 'normal',
	'priority' => 'high',
	'visible' => [
	    'when' => [
	        ['page_template', 'in', ['default','page_templates/template-contact-page.php']],
	        ['post_type', 'in', ['product']]
	    ],
	    'relation' => 'or'
	],
	'fields' => array( etc......

The above shows that, if we're editing or creating a Page and the template is 'default' then the postbox-container should be visible. Since 1.6.4 this is no longer the case by default (though it can be forced to show by going into 'Screen Options' and either selecting or deselecting then re-selecting the 'Primary Content Panel' checkbox).

The image below shows a New Page with the 'Primary Content Panel Setup' metaboxes not showing and this is even though the 'Screen Options' checkbox for it is ticked.

image

In Dev Tools we can see that it is being set to 'display:none'

image

It's worth noting that (since 1.6.4 I believe) Conditional Logic is now logging multiple entries in the Console (presumably for debug purposes). Whether it's supposed to be there it does seem to confirm that the logic is being correctly interpreted by the plugin

image

I'd really appreciate some help as soon as possible on this as it is making client sites rather difficult to manage now.

Cheers,

Will

WP: 5.0.3
MB Plugins: All running on latest versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant