Forum Replies Created
-
AuthorPosts
-
Rob van Tuin
ParticipantSorry forgot to say you have to edit the record 2/3 times for the error to appear
Rob van Tuin
Participantso it took me a little but the problem is when you use a custom table with 'revision' => true on the metabox, you get the same error if you use the meta box AIO plugin and you create a custom post with revisions and add some custom field with a custom table and add revision => true to the meta box.
September 2, 2023 at 11:02 AM in reply to: Custom database with custom upload_dir for images problem #43121Rob van Tuin
ParticipantYes, thank you, the maybe_unserialize option works, but the helper function does not work for images, it works for other cloneable fields fine.
August 29, 2023 at 12:00 AM in reply to: Custom database with custom upload_dir for images problem #43069Rob van Tuin
ParticipantDecode is trying to convert this string 'a:1:{i:0;s:81:"https://wp-plugin.test/wp-content/uploads/events/images/main/test-image.jpg";}' into normal variables.
I followed the documentation as you can see in the code
$event['main_image'] = rwmb_meta( 'image_main', EVENT_TABLE_ARG, $event_id);but it always comes back with an empty array.Rob van Tuin
ParticipantOK, found the answer
instead of:
rwmb_meta('button1', ['object_type' => 'setting'], 'SPeventSettings')
use
get_option('SPeventSettings')['button1']Rob van Tuin
ParticipantHi,
I had the same problem and I found out that rwmb_meta() does not work for options in the admin area but you can use the get_option()So instead of:
rwmb_meta( 'header_alpha_settings', [ 'object_type' => 'setting' ], 'easy_settings' )
use
get_option('easy_settings')['header_alpha_settings'] -
AuthorPosts