Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 67836

Cannot read property ‘length’ of undefined

$
0
0

Replies: 0

Hi There,

seopress-counters.js assumes jQuery("#seopress_titles_title_meta").val().length, however in some cases (custom post types) that field will not exist so an Uncaught TypeError is thrown. This of course causes other issues on the page.

That section should probably read something like:

var titles_title_meta_val = jQuery("#seopress_titles_title_meta").val();
if (titles_title_meta_val) {
  jQuery("#seopress_titles_title_counters").text(titles_title_meta_val.length);
}

I’d have to check, but once that is fixed there may be other similar issues.

Thanks,

-Garrett


Viewing all articles
Browse latest Browse all 67836

Trending Articles