Title: Problem with image uploader
Last modified: February 23, 2018

---

# Problem with image uploader

 *  Resolved [thugman](https://wordpress.org/support/users/thugman/)
 * (@thugman)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/problem-with-image-uploader/)
 * I can’t upload any image. When i select the file nothing appear. Only a # after
   a link. This is the firefox console error:
    `Error: Syntax error, unrecognized
   expression: #[object HTMLDivElement] .adverts-gallery-uploads`

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/problem-with-image-uploader/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/problem-with-image-uploader/page/2/?output_format=md)

 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10014584)
 * Hi, are you using the latest WPAdverts version? There used to be a bug in version
   1.2.0 that generated this error but it should be fixed in 1.2.1
 *  [russellhurren](https://wordpress.org/support/users/russellhurren/)
 * (@russellhurren)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10015498)
 * I have a similar problem on my client’s site. I’m using 1.2.1
    The site is [https://searenitymarine.com.au/list-boat/](https://searenitymarine.com.au/list-boat/)
   Firefox console says “TypeError: file is undefined” Chrome Console says: adverts-
   gallery.js?ver=6:180 Uncaught TypeError: Cannot read property ‘id’ of undefined
   at WPADVERTS.File.Uploader.FileAdded (adverts-gallery.js?ver=6:180) at WPADVERTS.
   File.Uploader.Plupload.FileAdded (adverts-gallery.js?ver=6:273) at a.g (jquery-
   1.7.2.min.js?ver=1.7.2:2) at Function.each (jquery-1.7.2.min.js?ver=1.7.2:2) 
   at WPADVERTS.File.Uploader.Plupload.FilesAdded (adverts-gallery.js?ver=6:257)
   at g.Uploader.g (jquery-1.7.2.min.js?ver=1.7.2:2) at g.Uploader.dispatchEvent(
   plupload.min.js?ver=2.1.9:1) at g.Uploader.trigger (moxie.min.js?ver=1.3.5:1)
   at plupload.min.js?ver=2.1.9:1 at moxie.min.js?ver=1.3.5:1
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10018848)
 * Hi, your problem is a bit different, it is caused by the theme which is loading
   old jQuery version, you should be able to fix it by forcing WP to load the jQuery
   bundled with WordPress, the code below should do that
 *     ```
       function include_default_jquery() {
       	wp_deregister_script('jquery');
       	wp_enqueue_script('jquery', site_url() . '/wp-includes/js/jquery/jquery.js', array(), null, true);
       }
       add_action('wp_enqueue_scripts', 'include_default_jquery', 5000);
       ```
   
 *  [russellhurren](https://wordpress.org/support/users/russellhurren/)
 * (@russellhurren)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10019448)
 * That fixed it, thanks very much!
 *  [Lawson Barker](https://wordpress.org/support/users/lawsonbarker/)
 * (@lawsonbarker)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10435850)
 * Sorry for the dumb question, where do you paste this code?
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10439090)
 * The code you can add in your theme functions.php file or even better create a
   new WP plugin and it the code there.
 *  [crs17a](https://wordpress.org/support/users/crs17a/)
 * (@crs17a)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10476396)
 * Hey, I have the same problem with jquery version… Actually my theme is on jQuery
   v1.11.3 and I cant upload images. When I change jQuery version to 3.3.1 uploading
   is working but then whole site is not working as before…(accordions, sliders 
   etc.)
 * Is there any solution to solve this problem?
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10479045)
 * Hi, try my code snippet from this message [https://wordpress.org/support/topic/problem-with-image-uploader/#post-10018848](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10018848),
   it will update your jQuery version to 1.12.4 which should not differ much from
   1.11.3.
 *  [crs17a](https://wordpress.org/support/users/crs17a/)
 * (@crs17a)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10571062)
 * Hi,
    sorry I forgot about this post, I used your code before writing my post,
   but it didnt help :/ However You helped me mentioning the other version ( 1.12.4)
   and I changed the version manually. Now uploading is working. So thanks 🙂
 *  [Geethu Vijayan](https://wordpress.org/support/users/geethuv/)
 * (@geethuv)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10859743)
 * Mine is not working at all. Tried all possible ways. My requirement is to upload
   files from WP site front end via media uploader.
 * I got the error, [https://www.awesomescreenshot.com/image/3715079/0d40b3c925c1a33a204c769c66a0c6a9](https://www.awesomescreenshot.com/image/3715079/0d40b3c925c1a33a204c769c66a0c6a9)
 * The loader is showing all time, no old images listed in the screen and can’t 
   upload new media items too. When I tried to upload new images via this screen,
   i am getting the error “An error occurred in the upload. Please try again later.”
 * I checked the permissions too(both upload folder permission & user role permission
   to upload media files)
 * No errors/warning on the console.
 * I called my custom jQuery files and media jquery as follows:
 * `
    add_action( 'wp_enqueue_scripts', 'LBtheme_scripts' ); function LBtheme_scripts(){
   wp_enqueue_script( 'StripeJS1', "https://js.stripe.com/v2/" , array(), '26.10.23',
   true ); wp_enqueue_script( 'mainScript', plugins_url('/js/main.js', __FILE__ ),
   array(), '26.10.23', true ); wp_enqueue_script( 'mainajax', plugins_url('/js/
   front-end-ajax.js', __FILE__ ) , array(), '26.10.23', true ); wp_enqueue_media();}
 * Anyone please help me to solve this issue? Urgent, please 🙁
    -  This reply was modified 7 years, 5 months ago by [Geethu Vijayan](https://wordpress.org/support/users/geethuv/).
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10862830)
 * It seems like you are having a problem with the Media Library itself, not with
   the WPAdverts uploader, it actually does not seem like you have the WPAdverts
   plugin installed at all? If so then you should ask this question in the general
   WP forum as you will have better chances to have the problem fixed.
 * Either way, does the media uploader work when you disable your custom scripts?
 * Also, in your screenshot, it looks like there is some JavaScript error, while
   in Chrome you can click Ctrl + Shift + i it will open a developer console and
   will show you an actual error message if any, the error message you can copy 
   and paste here.
 *  [Geethu Vijayan](https://wordpress.org/support/users/geethuv/)
 * (@geethuv)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-10862934)
 * [@gwin](https://wordpress.org/support/users/gwin/)
 * Yes, it is my mistake. I posted my issue in the wrong thread. Thanks for your
   time. Let me search a solution to my issue.
 *  [kestutisigaris](https://wordpress.org/support/users/kestutisigaris/)
 * (@kestutisigaris)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-11156886)
 * Hi, I get a “Invalid Session. Please refresh the page and try again.” On all 
   browsers except Mozilla, how can I fix this? I already tried to disable other
   addons one by one, but it did not help.
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-11165245)
 * Can you paste a link to a page where you are having this problem?
 *  [kestutisigaris](https://wordpress.org/support/users/kestutisigaris/)
 * (@kestutisigaris)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/problem-with-image-uploader/#post-11165254)
 * Hi Greg,
 * Sure thing, here you go: [https://kid2kid.ie/adverts/](https://kid2kid.ie/adverts/)
 * Thank you!

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/problem-with-image-uploader/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/problem-with-image-uploader/page/2/?output_format=md)

The topic ‘Problem with image uploader’ is closed to new replies.

 * ![](https://ps.w.org/wpadverts/assets/icon-256x256.png?rev=2423472)
 * [WPAdverts - Classifieds Plugin](https://wordpress.org/plugins/wpadverts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpadverts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpadverts/)
 * [Active Topics](https://wordpress.org/support/plugin/wpadverts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpadverts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpadverts/reviews/)

## Tags

 * [image](https://wordpress.org/support/topic-tag/image/)

 * 18 replies
 * 8 participants
 * Last reply from: [sarge67](https://wordpress.org/support/users/sarge67/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/problem-with-image-uploader/page/2/#post-11251467)
 * Status: resolved