Skip to content

InputfieldTextTags throwing error in the admin panel #1369

@lesaff

Description

@lesaff

Short description of the issue

After updating core to 3.0.175, I've noticed this intermittent behavior (works on some sites but not others). When editing field or template, tabs and their content are not showing up on the page. Console is showing the following error:

Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    InputfieldTextTags https://localhost:3000/wire/modules/Inputfield/InputfieldTextTags/InputfieldTextTags.min.js?v=1-1619351998:42
    jQuery 2
    InputfieldTextTags https://localhost:3000/wire/modules/Inputfield/InputfieldTextTags/InputfieldTextTags.min.js?v=1-1619351998:40
    <anonymous> https://localhost:3000/wire/modules/Inputfield/InputfieldTextTags/InputfieldTextTags.js:101
    jQuery 11

Expected behavior

Field details should show up (with all the tabs)

Actual behavior

Field details are hidden

This element was not triggered to show due to JS error

.pw-init #ProcessFieldEdit {
    display: none;
}

Looking at the error, it looks like JQuery is trying to find a nonexistent data-opts attribute during a foreach loop (executed by wire/modules/InputfieldTextTags/InputfieldTextTags.min.js) line 39-96, specifically line 42.

var o = JSON.parse($select.attr('data-opts'));

Steps to reproduce the issue

  1. Install 3.0.175
  2. Edit any field or template

Setup/Environment

Tested on both local environment (using Laravel Valet) and on a staging server running Ubuntu 20.x with RunCloud server manager.

  • ProcessWire version:
  • (Optional) PHP version: 7.4.x
  • (Optional) MySQL version: 5.7.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions