Forum Replies Created
-
AuthorPosts
-
Yard
ParticipantIs there an update already?
Yard
ParticipantHi Anh,
My company is using a framework similar to Laravel but extended with WordPress support. This is the code:
Metabox::add('post_internal_information', [ 'title' => __('Interne informatie', config('app.text_domain')), 'post_types' => ['page', 'person', 'wip'], 'context' => 'normal', 'priority' => 'high', 'fields' => [ [ 'name' => __('Titel', config('app.text_domain')), 'id' => 'post_information_internal_title', 'type' => 'text', ], [ 'name' => __('Interne informatie', config('app.text_domain')), 'id' => 'post_information_internal', 'type' => 'wysiwyg', // this is the metabox currently having the issue 'raw' => true, 'desc' => __('Hier kunt u informatie toevoegen die alleen voor intern gebruik bestemd is.', config('app.text_domain')), ], ], ]);Yard
ParticipantHi Anh,
I've a similar problem, when I load the editor I can see the wysiwyg editor but the font-color is set to white? When I switch to the text-editor and back to the visual the iframe is still set to display:none; I use the latest version of the metabox plug-in (3.5.7) and WordPress 5.6
After loading the editor: https://ibb.co/Wy3ykPk"
After switch text back to visual: https://ibb.co/HCtWYDhDo you know what the problem is?
November 22, 2019 at 5:02 PM in reply to: Field type 'key_value' gives notice: array to string conversion #17076Yard
ParticipantAs college of topic starter, I dug a bit deeper, and found that adding a default, did help:
[ 'id' => "{$keyName}_scroll_tabs", 'name' => __('Vul de titel in en het ID in van het element waar naartoe gescrollt dient te worden.', 'fusion'), 'type' => 'key_value', 'placeholder' => ['key' => 'Titel', 'value' => 'Anchor ID'], 'std' => ['key' => ''], 'multiple' => true, 'clone' => true, 'add_button' => __('Set toevoegen', 'fusion') ]Maybe it's useful to add a default value of an empty string.
Yard
ParticipantHi,
Did you succeed to reproduce the issue?
This happens to me at all sites I run using the metabox plugin. Maybe good to add that the problem only occurs when I close the window using the "X", and not when I click on "cancel".
Right know I have to explain this workaround to all users of our sites. Any idea on how and when this issue can be fixed?
Thanks in advance,
Simon
June 28, 2019 at 8:58 PM in reply to: ✅Cloning a Metabox Group item results in 'property content is undefined' #15170Yard
ParticipantHi Anh,
Works like a charm! Are you including this fix in the next update?
June 26, 2019 at 6:29 PM in reply to: ✅Cloning a Metabox Group item results in 'property content is undefined' #15103Yard
ParticipantHi Anh,
I've downgraded to version 1.2.8 and now it is al working fine.
The code below is the one that works./** * Update group title. * * @param index Group clone index. * @param element Group element. */ group.toggle.updateTitle = function ( index, element ) { var $group = $( element ), $title = $group.find( '> .rwmb-group-title, > .rwmb-input > .rwmb-group-title' ), options = $title.data( 'options' ), content = ''; function processField( fieldId, separator ) { separator = separator || ''; var $field = $group.find( ':input[name*="[' + fieldId + ']"]' ), fieldValue = $field.val(); if ( $field.is( 'select' ) ) { fieldValue = $field.find( 'option:selected' ).text(); } if ( fieldValue ) { content += ( content ? separator : '' ) + fieldValue; } // Update title when field's value is changed. if ( ! $field.data( 'update-group-title' ) ) { $field.on( 'keyup change', _.debounce( function () { group.toggle.updateTitle( 0, element ); }, 250 ) ).data( 'update-group-title', true ); } } if ( 'undefined' === typeof options || 'undefined' === typeof options.type ) { return; } if ( 'text' === options.type ) { content = options.content.replace( '{#}', index ); } if ( 'field' === options.type ) { var fieldId = options.field; // Multiple fields. if ( -1 !== fieldId.indexOf( ',' ) ) { options.separator = options.separator || ' '; var fieldIds = fieldId.split( ',' ); fieldIds.forEach( function ( value ) { processField( value.trim(), options.separator ); } ); } else { processField( fieldId ); } } $title.text( content ); };June 21, 2019 at 8:45 PM in reply to: ✅Cloning a Metabox Group item results in 'property content is undefined' #15043Yard
ParticipantJune 21, 2019 at 12:58 PM in reply to: ✅Cloning a Metabox Group item results in 'property content is undefined' #15036Yard
ParticipantHi Anh,
No that's not the case.
Yard
ParticipantAnd yet again, an error:
[email protected]
Your message wasn't delivered because the recipient's e-mail provider rejected it.
The following organization rejected your message: gmail-smtp-in.l.google.com.Yard
ParticipantOkay, I've resent it.
Yard
ParticipantI got an error:
[email protected]
Your message wasn't delivered because the recipient's e-mail provider rejected it.
The following organization rejected your message: aspmx.l.google.com.Yard
ParticipantPerfect, I've send you an email with the plugin.
thanks
-
AuthorPosts