URGENT: Unable to make the Conditional Plugin work after activation ;(
Support › MB Conditional Logic › URGENT: Unable to make the Conditional Plugin work after activation ;(
- This topic has 12 replies, 2 voices, and was last updated 9 years, 6 months ago by
jsm.
-
AuthorPosts
-
October 19, 2015 at 4:55 PM #1579
jsm
ParticipantI am unable to make it work.
It isn't working on localhost nor on my production server online ;(
The MB Tabs plugin, that I have purchased previously, is working nice on both localhost and online on the production server.
I have followed the docs and after activation of the plugin (I have slelected the zip file when selecting a plugin fiel and then click on activate, everything went well and now the plugin MB Conditional Logic is activated and the background is blue.
Version of Meta Box is:
4.5.7Version of MB Conditional Logic:
1.0.7WordPress version:
4.3.1After I have tried all combinations from the documentation including hidden, vissible, I tried to set same string for opion and value to reduce the error possibility like:
array( 'name' => 'Test me now:', 'id' => "test_me_now", 'type' => 'select', 'options' => array( 'abc' => 'abc', 'def' => 'def', 'ghi' => 'ghi' ) ),
and then checking it for the field I want to show/hide based on the option selected:
array( 'name' => 'Test price:', 'id' => "my_test_price", 'type' => 'text', 'visible' => array( 'test_me_now', '=', 'ghi' ) ),
But nothing! I can select anything, everything is shown, nothing is hidden.
I have tried hidden and != as an operator but nothing works ;(
I have tried other fields and when nothing wokred I tried your example from docs:
array( 'id' => 'brand', 'name' => 'Brand', 'desc' => 'Pick Your Favourite Brand', 'type' => 'select', 'options' => array( 'Apple' => 'Apple', 'Google' => 'Google', 'Microsoft' => 'Microsoft' ) ), array( 'id' => 'apple_products', 'name' => 'Which Apple product that you love?', 'type' => 'radio', 'options' => array( 'iPhone' => 'iPhone', 'iPad' => 'iPad', 'Macbook' => 'Macbook', 'iWatch' => 'iWatch' ), // Conditional Logic can applied to fields // In this example: Show this field by default, // hide it when user selected different value than 'Apple' on brand select field 'hidden' => array( 'brand', '!=', 'Apple' ) )
However, nothing happened. The radio buttons are shown all the time from the beginning. I can select Apple, Google, Microsoft but nothing is happening ;(
I don't get it, because the tabs plugin is working. Why is the conditional logic not working?
Even the exact doc example is not working ;(
Is there any way how can I turn it on? Thank you for your help.
Btw. I have turned to show all php errors in my plugin with:
error_reporting(E_ALL);
and also
I do not see any errors or warnings for JS or CSS in my browser debugger.
October 19, 2015 at 5:23 PM #1580jsm
ParticipantMy PHP version is 5.5.12 on localhost. Do I need to have some special PHP extensions activated?
October 19, 2015 at 5:52 PM #1581jsm
ParticipantI have checkd the js file in assets and is this normal?
;(function($) { 'use strict'; var conditions = window.conditions;
Or is it an error?
Could you please provide some earlier versions of this plugin to check if it's working? Maybe you have made some mistake and the code is broken in the latest version?
October 19, 2015 at 6:00 PM #1582Tan Nguyen
ParticipantHmm, it's so weird. I have just tested with your registered fields and it works on my machine. Can you please give me full code which you used to register your meta box, or better give me a credential to your production server via contact form?
Btw, Conditional Logic just require WP 3.5+, your PHP version is good for install.October 19, 2015 at 6:04 PM #1583jsm
ParticipantOK, so it should be OK. I have just learned that that semicolon results in a minification of the js code and the "use_strict" is for not allowing to use undeclared variables in the function code.
Hmm, still something is wrong with the plugin. The MB Tabs plugin is working fine.
Is there any specific part of the code in COndition Logic that could make it prohibit from running?
My Firefox is 41.0.2 and Chrome is the latest version. But I don't think that the browser could be a problem. I don't have adblocker in Firefox installed and only in Chrome and I have turned it off on the domain where is this plugin.
October 19, 2015 at 6:13 PM #1584Tan Nguyen
ParticipantYes, we declare 'use strict'; to force browser uses strict mode, therefore make sure that it can run on old browsers. It's will be good for us if I can access your website and test.
October 19, 2015 at 6:20 PM #1585Tan Nguyen
ParticipantBtw, can you please try to change ID of 'test_me_now' and 'my_test_price' to some dummy text. For example 'f0310_tmn' and 'r01944_mtp'. Perhaps your ID is defined somewhere else?
October 19, 2015 at 6:21 PM #1586jsm
ParticipantI have send you email with the login credentials and info.
October 19, 2015 at 6:31 PM #1587Tan Nguyen
ParticipantSorry, did you sent via Contact Form? Or what receiver email did you sent to? I haven't received any email yet.
October 19, 2015 at 6:40 PM #1588jsm
ParticipantI have sent it again via the Contact form on your page https://metabox.io/contact/ . Previously I tried to send reply to your emails with the download link from my gmail email account. but maybe there is some noreply filter and it was refused or something.
October 19, 2015 at 7:36 PM #1589jsm
ParticipantDid you receive the email now?
October 19, 2015 at 8:55 PM #1590Tan Nguyen
ParticipantHi Jan,
Please view your website and see the magic 😉 I've just updated code in your
pemtec/includes/custom-post-fields.php
I have checked your code and see that you're not register meta boxes by
rwmb_meta_boxes
filter. So Conditional Logic can't get these fields. Please see example at:https://metabox.io/docs/registering-meta-boxes/
Sorry, my computer was broken fn, up, down, left, right, backspace key so I can't reply you quicky.
Best regards
Tan NguyenOctober 19, 2015 at 9:04 PM #1592jsm
ParticipantGreat. Thank you a lot. Now, it's working as it should 😉
-
AuthorPosts
- The topic ‘URGENT: Unable to make the Conditional Plugin work after activation ;(’ is closed to new replies.