• 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 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Benjamin Denis

    (@rainbowgeek)

    Hi,
    this is known bug and it’s already fixed.
    We’ll push an update ASAP.
    Thank you for your feedback.

    Thread Starter Garrett Grimm

    (@grimmdude)

    Great thanks!

    Thread Starter Garrett Grimm

    (@grimmdude)

    Hi There,

    It looks like some issues still remain on the editor screen for custom post types. Check line 4 of seopress-counters.js

    jQuery("#seopress_titles_title_counters").text(jQuery("#seopress_titles_title_meta").val().length);

    Similar issue as earlier, assuming that #seopress_titles_title_meta exists. Thanks,

    -Garrett

    Plugin Author Benjamin Denis

    (@rainbowgeek)

    Hi,
    I’m unable to recreate the bug, can you describe precisely how do you get it? To make sure I set correctly conditional tags in the JS file.
    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot read property ‘length’ of undefined’ is closed to new replies.