• amirosein

    (@amirosein)


    Hi dear Shabti,
    I hope everything is well with you.

    Regarding Gallery field:
    After page load, the upload button works fine and opens-up “system upload window” || “WordPress media library” to choose images. but once I disable access to ‘WordPress Media Library’ in form setting, after submit the form with ajax, there are some style changes in gallery field and the upload button not working. it generates console error related to acf-input.min.js (image3).
    Uncaught TypeError: Cannot read properties of undefined (reading 'query')
    at n.addFrameStates (acf-input.min.js)

    I’ve compared html code of gallery field on before/after of submission, and there was some differences like missing {data-uploader=”basic”} attribute and {<div class=”file-meta-data”>} after submission.(Image4)

    —-
    Wordprss: Version 6.6.2
    Theme: 2024
    Active Plugins:
    Advanced Custom Fields PRO – 6.3.6
    Frontend Admin Lite – 3.23.9
    Fea Form Setting:
    { wp-media_library=’disbaled’ , form-type=’edit-post’ , ‘post-select=’url-query” }

    Screenshots:
    1-Form fields: https://ibb.co/f2Lt53G
    2-Frontend – After page load (before submit): https://ibb.co/CVKP8ZM
    3-Frontend – After ajax form sumbit – and hit the ‘Add new’ button again – reffer to console error: https://ibb.co/PQRppn1
    4-Html of Gallery field compare before/after submission: https://ibb.co/9tpvQkC

Viewing 1 replies (of 1 total)
  • Thread Starter amirosein

    (@amirosein)

    I found another thing here that might be useful:

    The Gallery field with customized button text, even with enabled media library uploader, has broken style.

    For other plugin users: please note that the user who trying to upload images in to gallery, should has the Cap of ‘upload_files’, otherwise you’ll give same console error like above.

    $ole = get_role('customer');
    $role->add_cap('upload_files');
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.