Something went wrong. Please try again!

Support MB Builder Something went wrong. Please try again!Resolved

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #50038
    JCJC
    Participant

    Hi there,

    when I try to edit some of my Custom Field Groups, I get an error message: Something went wrong. Please try again!

    Console says: [Error] SyntaxError: '#603554e9c31e3' is not a valid selector.
    querySelector
    (anonyme Funktion) — 4522.app.js:1:684

    Perplexity suggests this:
    We can reproduce a builder crash when editing multiple custom field groups in Meta Box AIO.
    Our field-group JSON uses valid IDs only, for example nd-gallery-news-field-group and field IDs like nd-gallery-news-content.
    However, the builder throws SyntaxError: '#603554e9c31e3' is not a valid selector, which suggests Meta Box generates an internal element ID starting with a digit and then passes it unescaped into document.querySelector().
    After that, a secondary error appears: TypeError: null is not an object (evaluating 'document.querySelector("#post_title").removeEventListener').
    This looks like a Builder/React frontend bug rather than a field schema issue. Please check whether internal IDs should be escaped with CSS.escape() or accessed via getElementById() instead.

    Best JC

    #50041
    PeterPeter
    Moderator

    Hello,

    Thanks for reaching out.

    Can you please share the field group JSON files with me so I can reproduce the issue on my site? Also, please share the steps you take on your site to see the error.

    #50044
    JCJC
    Participant

    Hello Peter,

    here is the JSON:

    
    {
        "$schema": "https://schemas.metabox.io/field-group.json",
        "fields": [
            {
                "id": "nd-gallery-news-content",
                "name": "News",
                "type": "wysiwyg"
            },
            {
                "id": "nd-gallery-news-images",
                "type": "image_advanced",
                "name": "Images",
                "max_status": false
            },
            {
                "id": "nd-gallery-news-attachements",
                "type": "file_advanced",
                "name": "Files",
                "max_status": false
            }
        ],
        "id": "nd-gallery-news-field-group",
        "modified": 1780752402,
        "off": {
            "relation": "OR"
        },
        "post_types": [
            "nd-gallery-news"
        ],
        "tab_style": "default",
        "tab_wrapper": true,
        "title": "ND-Gallery-News Field Group"
    }
    
    #50045
    JCJC
    Participant

    When I click on "edit" in the CFG list in the WP dashboard I see the editor for a very short time. Then this error:

    ERROR: null is not an object (evaluating 'document.querySelector("#post_title").removeEventListener')

    Stack:
    @https://stage.[xy].de/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/assets/build/app.js:1:245411
    If@https://stage.[xy].de/wp-includes/js/dist/vendor/react-dom.min.js:161:275
    ...

    #50046
    JCJC
    Participant

    WP7
    Meta Box AIO 3.7.1
    PHP 8.4.22

    #50047
    JCJC
    Participant

    Some other CFGs open the editor just fine.

    #50057
    PeterPeter
    Moderator

    Hello,

    I import your field group to my demo site, edit the field group but don't see any errors. Screenshot https://imgur.com/UfAtwMZ

    Please share your site admin account by submitting this contact form https://metabox.io/contact/
    I will take a look.

    #50060
    JCJC
    Participant

    Problem solved. Thank you Peter. If someone has the same issue: try export, delete and re-import of the custom field group.

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