Gallery data (file_list) unavailable/empty after database migration
-
Hello,
using a file_list custom metafield I’ve recently experienced an issue after migrate the webiste+database from local to production environment.
Everything works like a charm but, after site+db migration, of all the CMB2 meta fields I have in my theme it seems that the file_list fields data (used for image galleries) results unavailable. Don’t know actually if I missed something or if it is a bug or whatever…This is the code I use to generate the image gallery field:
function my_gallery_metabox() { $prefix = 'my_'; $cpt_page_options = new_cmb2_box(array( 'id' => $prefix . 'single_gallery', 'title' => __('Gallery', 'text-domain'), 'object_types' => array('my-cpt'), 'context' => 'side', )); $cpt_page_options->add_field(array( 'id' => $prefix . 'gallery_options_files', 'name' => __('Seleziona/carica immagini', 'text-domain'), 'desc' => __('desc', 'text-domain'), 'type' => 'file_list', // Optional, override default text strings 'text' => array( 'add_upload_files_text' => __('Aggiungi o carica file', 'text-domain'), // default: "Add or Upload Files" 'remove_image_text' => __('Rimuovi immagine', 'text-domain'), // default: "Remove Image" 'file_text' => __('File', 'text-domain'), // default: "File:" 'file_download_text' => __('Scarica', 'text-domain'), // default: "Download" 'remove_text' => __('Rimuovi', 'text-domain'), // default: "Remove" ), )); }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Gallery data (file_list) unavailable/empty after database migration’ is closed to new replies.