Bug Report - JSON export - missing closing }

Support MB Builder Bug Report - JSON export - missing closing }

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #45405
    FizzPop MediaFizzPop Media
    Participant

    I am a new MB user and believe I found a bug in the JSON export of custom fields.
    When exporting a field group that is either a significant number of fields or certain types of data validation (not sure the cause), the closing } is missing from the export.

    To replicate the issue, import this JSON as a field group (it should work correctly). Then export the field group and validate the JSON file. You will find that it is missing the closing }

    <div>
    {
        "post_type": "meta-box",
        "post_name": "fp_person",
        "post_title": "Person",
        "post_date": "2024-05-08 07:40:42",
        "post_status": "publish",
        "post_content": "",
        "settings": {
            "object_type": "post",
            "post_types": [
                "board-member",
                "team"
            ],
            "context": "normal",
            "priority": "high",
            "style": "default",
            "tab_style": "",
            "tab_default_active": "",
            "custom_table": {
                "name": ""
            },
            "class": "",
            "prefix": "",
            "text_domain": "your-text-domain",
            "function_name": "your_prefix_function_name"
        },
        "fields": {
            "text_tnqmawscul": {
                "_id": "text_tnqmawscul",
                "name": "First Name",
                "id": "first_name_person",
                "type": "text",
                "label_description": "",
                "desc": "",
                "std": "",
                "text_limiter": {
                    "limit": 25,
                    "limit_type": "character"
                },
                "placeholder": "",
                "size": 50,
                "required": true,
                "prepend": "",
                "append": "",
                "datalist_choices": "",
                "min_clone": "",
                "max_clone": "",
                "add_button": "",
                "admin_columns": {
                    "position": {
                        "type": "after",
                        "column": "title"
                    },
                    "title": "",
                    "before": "",
                    "after": "",
                    "sort": false,
                    "link": false
                },
                "columns": 12,
                "tooltip": {
                    "icon": "",
                    "position": "top",
                    "content": ""
                },
                "before": "",
                "after": "",
                "class": "",
                "sanitize_callback": "",
                "save_field": true,
                "attributes": {
                    "66wmretwlex": {
                        "id": "66wmretwlex",
                        "key": "pattern",
                        "value": "^(?!.*s$)(?!^s).*$"
                    }
                }
            },
            "text_ibkberq6t1f": {
                "_id": "text_ibkberq6t1f",
                "name": "Last Name",
                "id": "last_name_person",
                "type": "text",
                "label_description": "",
                "desc": "",
                "std": "",
                "text_limiter": {
                    "limit": 40,
                    "limit_type": "character"
                },
                "placeholder": "",
                "size": 50,
                "required": true,
                "prepend": "",
                "append": "",
                "datalist_choices": "",
                "min_clone": "",
                "max_clone": "",
                "add_button": "",
                "admin_columns": {
                    "position": {
                        "type": "after",
                        "column": "title"
                    },
                    "title": "",
                    "before": "",
                    "after": "",
                    "sort": false,
                    "link": false
                },
                "columns": 12,
                "tooltip": {
                    "icon": "",
                    "position": "top",
                    "content": ""
                },
                "before": "",
                "after": "",
                "class": "",
                "sanitize_callback": "",
                "save_field": true,
                "attributes": {
                    "378b6n38c16": {
                        "id": "378b6n38c16",
                        "key": "pattern",
                        "value": "^(?!.*s$)(?!^s).*$"
                    }
                }
            },
            "image_tja3atlv77o": {
                "_id": "image_tja3atlv77o",
                "name": "Headshot",
                "id": "headshot_person",
                "type": "single_image",
                "label_description": "",
                "desc": "",
                "image_size": "image-720",
                "min_clone": "",
                "max_clone": "",
                "add_button": "",
                "admin_columns": {
                    "position": {
                        "type": "after",
                        "column": "title"
                    },
                    "title": "",
                    "before": "",
                    "after": "",
                    "sort": false,
                    "link": false
                },
                "columns": 12,
                "tooltip": {
                    "icon": "",
                    "position": "top",
                    "content": ""
                },
                "before": "",
                "after": "",
                "class": "",
                "sanitize_callback": "",
                "save_field": true
            },
            "text_9e8b20h3ofe": {
                "_id": "text_9e8b20h3ofe",
                "name": "Title",
                "id": "title_person",
                "type": "text",
                "label_description": "",
                "desc": "",
                "std": "",
                "text_limiter": {
                    "limit": "",
                    "limit_type": "character"
                },
                "placeholder": "",
                "size": 75,
                "prepend": "",
                "append": "",
                "datalist_choices": "",
                "min_clone": "",
                "max_clone": "",
                "add_button": "",
                "admin_columns": {
                    "enable": true,
                    "position": {
                        "type": "after",
                        "column": "title"
                    },
                    "title": "Job Title",
                    "before": "",
                    "after": "",
                    "sort": false,
                    "link": false
                },
                "columns": 12,
                "tooltip": {
                    "icon": "",
                    "position": "top",
                    "content": ""
                },
                "before": "",
                "after": "",
                "class": "",
                "sanitize_callback": "",
                "save_field": true,
                "attributes": {
                    "7ef0tv1a1b4": {
                        "id": "7ef0tv1a1b4",
                        "key": "pattern",
                        "value": "^(?!.*s$)(?!^s).*$"
                    }
                }
            },
            "email_t3fw0j6u8qs": {
                "_id": "email_t3fw0j6u8qs",
                "name": "Email",
                "id": "email_person",
                "type": "email",
                "label_description": "",
                "desc": "",
                "std": "",
                "placeholder": "",
                "size": 50,
                "prepend": "",
                "append": "",
                "min_clone": "",
                "max_clone": "",
                "add_button": "",
                "admin_columns": {
                    "position": {
                        "type": "after",
                        "column": "title"
                    },
                    "title": "",
                    "before": "",
                    "after": "",
                    "sort": false,
                    "link": false
                },
                "columns": 12,
                "tooltip": {
                    "icon": "",
                    "position": "top",
                    "content": ""
                },
                "before": "",
                "after": "",
                "class": "",
                "sanitize_callback": "",
                "save_field": true
            },
            "number_pl219lgta3d": {
                "_id": "number_pl219lgta3d",
                "name": "Phone Number",
                "id": "phone_number_person",
                "type": "text",
                "label_description": "",
                "desc": "",
                "std": "",
                "text_limiter": {
                    "limit": "",
                    "limit_type": "character"
                },
                "placeholder": "",
                "size": 25,
                "prepend": "",
                "append": "",
                "datalist_choices": "",
                "min_clone": "",
                "max_clone": "",
                "add_button": "",
                "admin_columns": {
                    "position": {
                        "type": "after",
                        "column": "title"
                    },
                    "title": "",
                    "before": "",
                    "after": "",
                    "sort": false,
                    "link": false
                },
                "columns": 12,
                "tooltip": {
                    "icon": "",
                    "position": "top",
                    "content": ""
                },
                "before": "",
                "after": "",
                "class": "",
                "sanitize_callback": "",
                "save_field": true,
                "validation": {
                    "t0edeu9c45g": {
                        "id": "t0edeu9c45g",
                        "name": "phoneUS",
                        "value": true,
                        "message": "Please enter a valid phone number"
                    }
                }
            },
            "number_cx91rtizs1l": {
                "_id": "number_cx91rtizs1l",
                "name": "Phone Number Extension",
                "id": "phone_number_extension_person",
                "type": "number",
                "label_description": "",
                "desc": "",
                "min": "",
                "max": "",
                "step": "",
                "std": "",
                "placeholder": "",
                "size": "",
                "prepend": "",
                "append": "",
                "min_clone": "",
                "max_clone": "",
                "add_button": "",
                "admin_columns": {
                    "position": {
                        "type": "after",
                        "column": "title"
                    },
                    "title": "",
                    "before": "",
                    "after": "",
                    "sort": false,
                    "link": false
                },
                "columns": 12,
                "tooltip": {
                    "icon": "",
                    "position": "top",
                    "content": ""
                },
                "before": "",
                "after": "",
                "class": "",
                "sanitize_callback": "",
                "save_field": true
            },
            "text_sd4jymsaykn": {
                "_id": "text_sd4jymsaykn",
                "name": "Mobile Phone Number",
                "id": "mobile_phone_number_person",
                "type": "text",
                "label_description": "",
                "desc": "",
                "std": "",
                "text_limiter": {
                    "limit": "",
                    "limit_type": "character"
                },
                "placeholder": "",
                "size": 25,
                "prepend": "",
                "append": "",
                "datalist_choices": "",
                "min_clone": "",
                "max_clone": "",
                "add_button": "",
                "admin_columns": {
                    "position": {
                        "type": "after",
                        "column": "title"
                    },
                    "title": "",
                    "before": "",
                    "after": "",
                    "sort": false,
                    "link": false
                },
                "columns": 12,
                "tooltip": {
                    "icon": "",
                    "position": "top",
                    "content": ""
                },
                "before": "",
                "after": "",
                "class": "",
                "sanitize_callback": "",
                "save_field": true,
                "validation": {
                    "t0edeu9c45g": {
                        "id": "t0edeu9c45g",
                        "name": "phoneUS",
                        "value": true,
                        "message": "Please enter a valid phone number"
                    }
                }
            },
            "textarea_qjj78ypqhc": {
                "_id": "textarea_qjj78ypqhc",
                "name": "Bio",
                "id": "bio_person",
                "type": "textarea",
                "label_description": "",
                "desc": "",
                "std": "",
                "text_limiter": {
                    "limit": "",
                    "limit_type": "character"
                },
                "placeholder": "",
                "rows": "",
                "cols": "",
                "min_clone": "",
                "max_clone": "",
                "add_button": "",
                "admin_columns": {
                    "position": {
                        "type": "after",
                        "column": "title"
                    },
                    "title": "",
                    "before": "",
                    "after": "",
                    "sort": false,
                    "link": false
                },
                "columns": 12,
                "tooltip": {
                    "icon": "",
                    "position": "top",
                    "content": ""
                },
                "before": "",
                "after": "",
                "class": "",
                "sanitize_callback": "",
                "save_field": true,
                "attributes": {
                    "pa1fwovakvl": {
                        "id": "pa1fwovakvl",
                        "key": "pattern",
                        "value": "^(?!.*s$)(?!^s).*$"
                    }
                }
            }
        },
        "data": [],
        "meta_box": {
            "title": "Person",
            "id": "fp_person",
            "post_types": [
                "board-member",
                "team"
            ],
            "text_domain": "your-text-domain",
            "function_name": "your_prefix_function_name",
            "fields": [
                {
                    "name": "First Name",
                    "id": "first_name_person",
                    "type": "text",
                    "size": 50,
                    "required": true,
                    "attributes": {
                        "pattern": "^(?!.*s$)(?!^s).*$"
                    },
                    "limit": 25,
                    "limit_type": "character"
                },
                {
                    "name": "Last Name",
                    "id": "last_name_person",
                    "type": "text",
                    "size": 50,
                    "required": true,
                    "attributes": {
                        "pattern": "^(?!.*s$)(?!^s).*$"
                    },
                    "limit": 40,
                    "limit_type": "character"
                },
                {
                    "name": "Headshot",
                    "id": "headshot_person",
                    "type": "single_image",
                    "image_size": "image-720"
                },
                {
                    "name": "Title",
                    "id": "title_person",
                    "type": "text",
                    "size": 75,
                    "admin_columns": {
                        "position": "after title",
                        "title": "Job Title"
                    },
                    "attributes": {
                        "pattern": "^(?!.*s$)(?!^s).*$"
                    },
                    "limit_type": "character"
                },
                {
                    "name": "Email",
                    "id": "email_person",
                    "type": "email",
                    "size": 50
                },
                {
                    "name": "Phone Number",
                    "id": "phone_number_person",
                    "type": "text",
                    "size": 25,
                    "limit_type": "character"
                },
                {
                    "name": "Phone Number Extension",
                    "id": "phone_number_extension_person",
                    "type": "number"
                },
                {
                    "name": "Mobile Phone Number",
                    "id": "mobile_phone_number_person",
                    "type": "text",
                    "size": 25,
                    "limit_type": "character"
                },
                {
                    "name": "Bio",
                    "id": "bio_person",
                    "type": "textarea",
                    "attributes": {
                        "pattern": "^(?!.*s$)(?!^s).*$"
                    },
                    "limit_type": "character"
                }
            ],
            "validation": {
                "rules": {
                    "phone_number_person": {
                        "phoneUS": true
                    },
                    "mobile_phone_number_person": {
                        "phoneUS": true
                    }
                },
                "messages": {
                    "phone_number_person": {
                        "phoneUS": "Please enter a valid phone number"
                    },
                    "mobile_phone_number_person": {
                        "phoneUS": "Please enter a valid phone number"
                    }
                }
            }
        }
    }</div>

    Full site details below:

    
    ### wp-core ###
    
    version: 42
    site_language: en_US
    user_language: en_US
    timezone: America/New_York
    permalink: /%postname%/
    https_status: true
    multisite: false
    user_registration: 0
    blog_public: 0
    default_comment_status: open
    environment_type: production
    user_count: 1
    dotorg_communication: true
    
    ### wp-paths-sizes ###
    
    wordpress_path: /var/www/acss.fizzpop.dev/htdocs
    wordpress_size: 54.72 MB (57379687 bytes)
    uploads_path: /var/www/acss.fizzpop.dev/htdocs/wp-content/uploads
    uploads_size: 813.05 KB (832559 bytes)
    themes_path: /var/www/acss.fizzpop.dev/htdocs/wp-content/themes
    themes_size: 44.83 MB (47004051 bytes)
    plugins_path: /var/www/acss.fizzpop.dev/htdocs/wp-content/plugins
    plugins_size: 61.14 MB (64107604 bytes)
    database_size: 6.66 MB (6979584 bytes)
    total_size: 168.14 MB (176303485 bytes)
    
    ### wp-active-theme ###
    
    name: Bricks Child Theme (bricks-child)
    version: 1.1
    author: Bricks
    author_website: https://bricksbuilder.io/
    parent_theme: Bricks (bricks)
    theme_features: core-block-patterns, post-thumbnails, widgets-block-editor, automatic-feed-links, title-tag, html5, menus, align-wide, widgets
    theme_path: /var/www/acss.fizzpop.dev/htdocs/wp-content/themes/bricks-child
    
    ### wp-parent-theme ###
    
    name: Bricks (bricks)
    version: 1.9.8
    author: Bricks
    author_website: https://bricksbuilder.io/
    theme_path: /var/www/acss.fizzpop.dev/htdocs/wp-content/themes/bricks
    
    ### wp-mu-plugins (9) ###
    
    FizzPop Media Remove Author Pages: version: 0.1.0, author: FizzPop Media
    FizzPop Media WordPress Improvements: version: 0.1.0.3, author: FizzPop Media
    GridPane Block Username Enumeration: version: 0.1.0, author: GridPane
    GridPane Disable XMLRPC: version: 0.1.0, author: Jeff Cleverley
    GridPane Kill All Emoji: version: 0.1.0, author: GridPane
    GridPane Remove WP Version: version: 0.1.0, author: GridPane
    WP CLI Login Command Server: version: 1.5, author: Evan Mattson
    WP Umbrella: version: 1.0.0, author: WP Umbrella
    _WPHealthHandlerMU.php: author: (undefined), version: (undefined)
    
    ### wp-plugins-active (13) ###
    
    ActiveCampaign Postmark (Official): version: 1.19.1, author: Andrew Yates & Matt Gibbs
    Automatic.css: version: 3.0.0-beta-2, author: Kevin Geary, Matteo Greco
    Enable Media Replace: version: 4.1.5, author: ShortPixel
    Frames: version: 1.4.7, author: Kevin Geary, Matteo Greco
    HappyFiles Pro: version: 1.8.3, author: Codeer
    Meta Box: version: 5.9.7, author: MetaBox.io (latest version: 5.9.8)
    Meta Box AIO: version: 1.26.2, author: MetaBox.io
    Perfmatters: version: 2.2.7, author: forgemedia
    SEOPress: version: 7.7, author: The SEO Guys at SEOPress (latest version: 7.7.1)
    SEOPress PRO: version: 7.7, author: The SEO Guys at SEOPress
    ShortPixel Image Optimizer: version: 5.6.0, author: ShortPixel - Convert WebP/AVIF & Optimize Images
    SureFeedback Client Site: version: 1.2.3, author: Brainstorm Force
    WP Umbrella: version: 2.15.1, author: WP Umbrella - Backup & Manage WordPress
    
    ### wp-plugins-inactive (1) ###
    
    LiteSpeed Cache: version: 6.2.0.1, author: LiteSpeed Technologies
    
    ### wp-media ###
    
    image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1691
    imagemagick_version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
    imagick_version: 3.7.0
    file_uploads: 1
    post_max_size: 512M
    upload_max_filesize: 512M
    max_effective_size: 512 MB
    max_file_uploads: 20
    imagick_limits: 
    	imagick::RESOURCETYPE_AREA: 122 MB
    	imagick::RESOURCETYPE_DISK: 1073741824
    	imagick::RESOURCETYPE_FILE: 37500
    	imagick::RESOURCETYPE_MAP: 512 MB
    	imagick::RESOURCETYPE_MEMORY: 256 MB
    	imagick::RESOURCETYPE_THREAD: 1
    	imagick::RESOURCETYPE_TIME: 9.2233720368548E+18
    imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, AVI, AVIF, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, H, HALD, HDR, HEIC, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPG, MRW, MSL, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIDEO, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMV, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    gd_version: bundled (2.1.0 compatible)
    gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
    ghostscript_version: unknown
    
    ### wp-server ###
    
    server_architecture: Linux 5.15.0-105-generic x86_64
    httpd_software: LiteSpeed
    php_version: 8.2.18 64bit
    php_sapi: litespeed
    max_input_variables: 5000
    time_limit: 300
    memory_limit: 256M
    max_input_time: 60
    upload_max_filesize: 512M
    php_post_max_size: 512M
    curl_version: 7.81.0 OpenSSL/3.0.2
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    htaccess_extra_rules: true
    current: 2024-05-08T12:01:25+00:00
    utc-time: Wednesday, 08-May-24 12:01:25 UTC
    server-time: 2024-05-08T08:01:24-04:00
    
    ### wp-database ###
    
    extension: mysqli
    server_version: 10.11.7-MariaDB-1:10.11.7+maria~ubu2204
    client_version: mysqlnd 8.2.18
    max_allowed_packet: 16777216
    max_connections: 151
    
    ### wp-constants ###
    
    WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /var/www/acss.fizzpop.dev/htdocs/wp-content
    WP_PLUGIN_DIR: /var/www/acss.fizzpop.dev/htdocs/wp-content/plugins
    WP_MEMORY_LIMIT: 256M
    WP_MAX_MEMORY_LIMIT: 256M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: false
    SCRIPT_DEBUG: false
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_ENVIRONMENT_TYPE: production
    WP_DEVELOPMENT_MODE: undefined
    DB_CHARSET: utf8
    DB_COLLATE: undefined
    
    ### wp-filesystem ###
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    mu-plugins: writable
    
    ### postmark-wordpress ###
    
    status: No
    version: 1.19.1
    directory: /var/www/acss.fizzpop.dev/htdocs/wp-content/plugins/postmark-approved-wordpress-plugin
    url: https://acss.fizzpop.dev/wp-content/plugins/postmark-approved-wordpress-plugin
    stream: outbound
    sender_address: undefined
    force_from: No
    force_html: No
    track_opens: No
    track_links: No
    enable_logs: Yes
    
    
    #45415
    PeterPeter
    Moderator

    Hello,

    I import the JSON file to my demo site and export the field group, the JSON file is valid. You can check the export file here https://pastebin.com/f25FtgqE

    Please try to export other field groups and check if the issue persists.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.