Skip to content

Javascript error on scheduled post #517

@rizaardiyanto1412

Description

@rizaardiyanto1412
Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')
at toggleCategorySelection ((index):142:37)
at init ((index):152:17)
at HTMLDocument. ((index):137:17)
at e (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3-RC2:2:26990)
at t (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3-RC2:2:27292)
function toggleCategorySelection(element) {
  if ($(element).val().indexOf('category') !== -1) {
    $('#expired-category-selection').show();
    $('#expired-category-wrapper').show();
  } else {
    $('#expired-category-selection').hide();
    $('#expired-category-wrapper').hide();
  }

image

Step to replicate:

  1. Create new post
  2. Schedule it

Metadata

Metadata

Assignees

Labels

confirmed bugThe reporter has tested and confirmed on more than 1 site

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions