Skip to content

[6.x] Bard link editor throws JS error when changing to entry #13563

@mscruse

Description

@mscruse

Bug description

In Bard when adding a link and changing from URL to any of the other types a JS error is thrown and the link window closes.

TypeError: can't access property "$el", mn.$refs.trigger is null
    2 http://kenbuilt.test/vendor/statamic/cp/build/assets/index-yLzpnCE8.js:157
    callWithErrorHandling http://kenbuilt.test/vendor/statamic/cp/build/assets/index-yLzpnCE8.js:17
    callWithAsyncErrorHandling http://kenbuilt.test/vendor/statamic/cp/build/assets/index-yLzpnCE8.js:17
    emit http://kenbuilt.test/vendor/statamic/cp/build/assets/index-yLzpnCE8.js:18
    kt http://kenbuilt.test/vendor/statamic/cp/build/assets/index-yLzpnCE8.js:131
    setup http://kenbuilt.test/vendor/statamic/cp/build/assets/index-yLzpnCE8.js:131
    callWithErrorHandling http://kenbuilt.test/vendor/statamic/cp/build/assets/index-yLzpnCE8.js:17
    callWithAsyncErrorHandling http://kenbuilt.test/vendor/statamic/cp/build/assets/index-yLzpnCE8.js:17
    callWithAsyncErrorHandling http://kenbuilt.test/vendor/statamic/cp/build/assets/index-yLzpnCE8.js:17
index-yLzpnCE8.js:17:2961

How to reproduce

  1. Install Statamic 6 beta
  2. Add a bard field that is configured for linking to entries
  3. Add some text, select text and click link button
  4. Link window will appear
  5. Change type to Entry - link window closes, error thrown.

Logs

Environment

Environment
Application Name: KenBuilt
Laravel Version: 12.47.0
PHP Version: 8.4.16
Composer Version: 2.9.2
Environment: local
Debug Mode: ENABLED
URL: kenbuilt.test
Maintenance Mode: OFF
Timezone: Australia/Melbourne
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Storage
public/storage: LINKED

Statamic
Addons: 9
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.0.0-beta.2 PRO

Statamic Addons
mitydigital/feedamic: 3.0.8
mitydigital/fuse-utilities: 2.6.3
mitydigital/iconamic: 3.0.0
mitydigital/sitemapamic: 3.4.1
mitydigital/statamic-form-submission-cleaner: 1.1.0
mitydigital/statamic-google-fonts: 2.1.3
mitydigital/statamic-scheduled-cache-invalidator: 2.2.1
mitydigital/statamic-sticky-notes: 2.0.0
mitydigital/supportamic: 1.3.2

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions