Home Forums Backend Issues (wp-admin) Image and file fields not working


Image and file fields not working

    • lbphp

    • March 31, 2021 at 5:46 am
    Uncaught TypeError: _.contains is not a function
       at Function.r.extend.get (media-models.min.js?ver=5.7:2)
        at n._requery (media-models.min.js?ver=5.7:2)
        at n._changeQuery (media-models.min.js?ver=5.7:2)
        at p (backbone.min.js?ver=1.4.0:2)
        at f (backbone.min.js?ver=1.4.0:2)
        at c (backbone.min.js?ver=1.4.0:2)
        at h.Model.n.trigger (backbone.min.js?ver=1.4.0:2)
        at h.Model.set (backbone.min.js?ver=1.4.0:2)
        at n.initialize (media-models.min.js?ver=5.7:2)
        at n.h.Collection (backbone.min.js?ver=1.4.0:2)

    i am getting the above error with image and file fields registered via PHP, when i click on the upload file button, and nothing happens.
    Plugin Version 5.9.5 , free version.
    The generated html for the field is this:

    <div class="acf-field acf-field-file acf-field-evolcorr-hero-image" data-name="evolcorr_hero_image" data-type="file" data-key="field_evolcorr_hero_image" style="">
    <div class="acf-label">
    <label for="acf-field_evolcorr_hero_image">Show hero image on page</label></div>
    <div class="acf-input">
    <div class="acf-file-uploader" data-library="all" data-mime_types="" data-uploader="wp">
    	<input type="hidden" name="acf[field_evolcorr_hero_image]" value="" data-name="id">	<div class="show-if-value file-wrap">
    		<div class="file-icon">
    			<img data-name="icon" src="" alt="">
    		<div class="file-info">
    				<strong data-name="title"></strong>
    				<strong>File name:</strong>
    				<a data-name="filename" href="" target="_blank"></a>
    				<strong>File size:</strong>
    				<span data-name="filesize"></span>
    		<div class="acf-actions -hover">
    						<a class="acf-icon -pencil dark" data-name="edit" href="#" title="Edit"></a>
    						<a class="acf-icon -cancel dark" data-name="remove" href="#" title="Remove"></a>
    	<div class="hide-if-value">
    			No file selected <a data-name="add" class="acf-button button" href="#">Add File</a>
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.