Title: ysacf_exclude_fields javascript error
Last modified: August 31, 2016

---

# ysacf_exclude_fields javascript error

 *  Resolved [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [10 years ago](https://wordpress.org/support/topic/ysacf_exclude_fields-javascript-error/)
 * I’m trying to exclude some fields from the content analysis using the following
   code in my functions file:
 *     ```
       add_filter('ysacf_exclude_fields', function(){
           return array(
               'acf_fc_layout'
           );
       });
       ```
   
 * Whenever I enable it the content analysis completely breaks and I get the following
   javascript error in the console: wp-seo-post-scraper-324.min.js?ver=3.2.5:6 Uncaught
   TypeError: Cannot read property ‘resultText’ of undefined
 * I’ve tried disabling all plugins except for Yoast, ACF and this plugin.
 * [https://wordpress.org/plugins/acf-content-analysis-for-yoast-seo/](https://wordpress.org/plugins/acf-content-analysis-for-yoast-seo/)

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

 *  Plugin Author [Viktor Fröberg](https://wordpress.org/support/users/viktorfroberg/)
 * (@viktorfroberg)
 * [10 years ago](https://wordpress.org/support/topic/ysacf_exclude_fields-javascript-error/#post-7441178)
 * Hi!
    The filter was broken in the latest version. I don’t manage to vet that 
   error message though. But the filter is fixed in the version just released. Please
   let me know if it solves your problem!
 * / Viktor
 *  Thread Starter [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/ysacf_exclude_fields-javascript-error/#post-7441189)
 * Ok great. Is there an easy way to determine the field names to ignore?
 * eg. I have a html area called “single_column_content” in a flexible content called“
   content”
 *  Plugin Author [Viktor Fröberg](https://wordpress.org/support/users/viktorfroberg/)
 * (@viktorfroberg)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/ysacf_exclude_fields-javascript-error/#post-7441194)
 * Not really at the moment if you don’t do it yourself, and thats not really a 
   good idea if you don’t have a local version of the site.
 * `get_fields( $page_id )` will return all fields of a page or post.
 * You wont have to filter “content”, since “single_column_content” is inside of
   it. You should only have to filter fields you add yourself that isn’t content(‘
   acf_fc_layout’ is the exception to that since it’s someting ACF adds for you 
   when you use flexible content)
 * I’ll think of a way to add a feature to see all fields that are attached to a
   page in the next version of the plugin!
 * Please mark this topic as resolved if you feel I’ve answered all your questions!
 * / Viktor
 *  Thread Starter [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/ysacf_exclude_fields-javascript-error/#post-7441195)
 * Thanks!

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

The topic ‘ysacf_exclude_fields javascript error’ is closed to new replies.

 * ![](https://ps.w.org/acf-content-analysis-for-yoast-seo/assets/icon-256x256.png?
   rev=1717503)
 * [ACF Content Analysis for Yoast SEO](https://wordpress.org/plugins/acf-content-analysis-for-yoast-seo/)
 * [Support Threads](https://wordpress.org/support/plugin/acf-content-analysis-for-yoast-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-content-analysis-for-yoast-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-content-analysis-for-yoast-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-content-analysis-for-yoast-seo/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/ysacf_exclude_fields-javascript-error/#post-7441195)
 * Status: resolved