by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Scott Kingsley Clark
@sc0ttkclark
that person who posted the CMB2 admin UI plugin, i tested that code and saw it affecting that, so i might just use that as a quick and easy way to test / fix
Justin Sternberg
@jtsternberg
ok, sorry I can't do more. Maybe we could setup a call next week if it would be helpful? But as of right now, that's all I know
Was that Marcus? the admin UI plugin?
Scott Kingsley Clark
@sc0ttkclark
sure, ping me if you get some time next week, i'll be around
Justin Sternberg
@jtsternberg
Ah that's right
ok
Scott Kingsley Clark
@sc0ttkclark
@twoelevenjay i installed it, but plugins disappeared immediately although i'm an admin, not sure what happened, but once i forced is_cmb2_allowed to return true, then went to settings, added my user 'admin' and removed my forced return true and that resolved it
Scott Kingsley Clark
@sc0ttkclark

some other issues currently, some php notices:

Notice: Undefined variable: field_options in /srv/www/wordpress-default/wp-content/plugins/cmb2-admin-extension/includes/class-meta-box-post-type.php on line 580

Notice: Undefined index: _cmb2_options_textarea in /srv/www/wordpress-default/wp-content/plugins/cmb2-admin-extension/includes/class-meta-box-post-type.php on line 556

Notice: Undefined index: _cmb2_decription_textarea in /srv/www/wordpress-default/wp-content/plugins/cmb2-admin-extension/includes/class-meta-box-post-type.php on line 577

Notice: Undefined variable: field_options in /srv/www/wordpress-default/wp-content/plugins/cmb2-admin-extension/includes/class-meta-box-post-type.php on line 580

Scott Kingsley Clark
@sc0ttkclark
ah, thought this one did groups but doesn't look like it, that's fine though
i'll try a custom implementation
Scott Kingsley Clark
@sc0ttkclark
there we go
i can see it clearly now, the rain is gone
Scott Kingsley Clark
@sc0ttkclark
@jtsternberg when you get a second, is this valid for adding group fields to group fields? http://sc0tt.me/image/2k0c2G1x3C38/Screen%20Shot%202015-07-24%20at%201.42.49%20PM.png
seems like valid syntax to me
but before i go down the hole, best to know if it's right or not
because i'm seeing empty rows with no fields output here for the tracks, just add/remove
i suspect it's more than just a JS issue
Scott Kingsley Clark
@sc0ttkclark
i see now add_group_field returns an array:
return array( $parent_field_id, $field['id'] );
so i can get [1] and get around some of the notices i was seeing from array_key_exists
but it's still not working, so that wasn't the main part
Justin Sternberg
@jtsternberg
Are you using the example form example-functions.php?
Scott Kingsley Clark
@sc0ttkclark
i was using the code (modified for my purposes) from CMB2-Plugin-Example
Justin Sternberg
@jtsternberg
I would use example-functions.php
I'm not sure how old that other thing is
Scott Kingsley Clark
@sc0ttkclark
oh yeah that was old, and i updated all the syntax to use the new stuff in my code anyways
i don't even need the examples from that plugin now lol
Justin Sternberg
@jtsternberg
ah ok
there's the code i'm using right now as a whole
in both cases, the sub groups don't output their fields
Justin Sternberg
@jtsternberg
ah yah, I can already see some issues (requiring core-refactoring) with that.
Scott Kingsley Clark
@sc0ttkclark
well i'll look into the code and see what i can help out with
we definitely want at least 2-3 levels (our admin ui will limit to 2 or 3 levels deep (group of fields in a group)
basically, adding a group field, it adds to the fields array, but only adds one level deep in the nested array.. It'll need to be updated to do more recursively then explicitly
recursion.. always a joy :D
Scott Kingsley Clark
@sc0ttkclark
ah i see
yes, that looks fantastical
lol
i'll have a ponder
Justin Sternberg
@jtsternberg
My brain took a beating to get it to work the way it currently works... Can't imagine the cerebral abuse required to get it to work recursively while not breaking back-compat. lol
Scott Kingsley Clark
@sc0ttkclark
no one is using the object vars directly right?
Justin Sternberg
@jtsternberg
which ones?
Scott Kingsley Clark
@sc0ttkclark
CMB2 class properties
they're only using methods, right?
Justin Sternberg
@jtsternberg
well.. I don't know that that's a given