Title: 500 error, admin-ajax.php
Last modified: November 15, 2016

---

# 500 error, admin-ajax.php

 *  Resolved [Julian_Kingman](https://wordpress.org/support/users/julian_kingman/)
 * (@julian_kingman)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/500-error-admin-ajax-php/)
 * I’m unable to create fake content for a custom post type. Here is the error:
 *     ```
       fields.js?ver=0.4.7:416 Uncaught TypeError: Cannot read property 'min' of undefined(…)(anonymous function) @ fields.js?ver=0.4.7:416each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:2each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:2configure @ fields.js?ver=0.4.7:410render @ fields.js?ver=0.4.7:382update @ fields.js?ver=0.4.7:347(anonymous function) @ fields.js?ver=0.4.7:655each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:2each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:2update @ fields.js?ver=0.4.7:607(anonymous function) @ fields.js?ver=0.4.7:448dispatch @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:3r.handle @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:3trigger @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:3a.event.trigger @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:9(anonymous function) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:3each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:2each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:2trigger @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:3triggerChange @ select2.min.js?ver=3.5.0:21onSelect @ select2.min.js?ver=3.5.0:22selectHighlighted @ select2.min.js?ver=3.5.0:22(anonymous function) @ select2.min.js?ver=3.5.0:22(anonymous function) @ select2.min.js?ver=3.5.0:21dispatch @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:3r.handle @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:3
       load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:4 POST http://mlp.royscheffers.com/wp-admin/admin-ajax.php 500 (Internal Server Error)send @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:4ajax @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:4fp.moduleGenerate @ module.js?ver=0.4.7:61(anonymous function) @ module.js?ver=0.4.7:104dispatch @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:3r.handle @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.6.1:3
       module.js?ver=0.4.7:20
       Objectmessage: ""__proto__: Object "<%= message %>"
       ```
   
 * I have a custom post type, with custom taxonomy, and meta fields. I’m trying 
   to create 1,000 posts, but it errors out and does nothing. Ideas?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Julian_Kingman](https://wordpress.org/support/users/julian_kingman/)
 * (@julian_kingman)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/500-error-admin-ajax-php/#post-8438754)
 * Update: The meta fields seem to be the problem. No matter what kind I add, it
   causes the error. I wrote a workaround in my own plugin for now:
 *     ```
       //check if they have meta fields
           if(!get_post_meta($post_id, 'original')){
             $sources = array('eBook', 'article', 'blog post', 'book', 'video', 'audio');
             add_post_meta($post_id, 'original', $sources[rand(0,5)]);
           }
           if(!get_post_meta($post_id, 'assigned_user')){
             add_post_meta($post_id, 'assigned_user', rand(1,7));
           }
       ```
   
 * hooked into save_post
    -  This reply was modified 9 years, 6 months ago by [Julian_Kingman](https://wordpress.org/support/users/julian_kingman/).
 *  Plugin Author [Gustavo Bordoni](https://wordpress.org/support/users/bordoni/)
 * (@bordoni)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/500-error-admin-ajax-php/#post-8439631)
 * Hey Julian,
    Thanks a lot for this bug report, I have another bug to fix, I should
   Have a new version ready soon.
 * I will make sure to include this as well.
 *  Thread Starter [Julian_Kingman](https://wordpress.org/support/users/julian_kingman/)
 * (@julian_kingman)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/500-error-admin-ajax-php/#post-8440098)
 * Awesome, thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘500 error, admin-ajax.php’ is closed to new replies.

 * ![](https://ps.w.org/fakerpress/assets/icon.svg?rev=1846090)
 * [FakerPress](https://wordpress.org/plugins/fakerpress/)
 * [Support Threads](https://wordpress.org/support/plugin/fakerpress/)
 * [Active Topics](https://wordpress.org/support/plugin/fakerpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fakerpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fakerpress/reviews/)

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [Julian_Kingman](https://wordpress.org/support/users/julian_kingman/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/500-error-admin-ajax-php/#post-8440098)
 * Status: resolved