Uncaught TypeError: Cannot read property 'className' of undefined on brightcove-admin.js
nmagathan opened this issue · 1 comments
Describe the bug
When trying to update the thumbnails on a video, we get the error 'className' of undefined.
When digging through, it appears this line is checking for something that may not always be there, 'caption'.
As a temp fix for our instance, i added
typeof attachment.context !== undefined && attachment.context !== undefined && attachment.context.className !== undefined
Steps to Reproduce
- Upload new video
- Click on Edit
- Scroll down to Thumbnail image, remove the default
- Select an image from the Media Library, basic image.
- Select Attach
- Image does not load
Expected behavior
Thumbnail gets replaced with new image
Environment information
`
wp-core
version: 5.6
site_language: en_US
user_language: en_US
timezone: America/Los_Angeles
permalink: /%article_type%/%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 159
dotorg_communication: true
wp-paths-sizes
wordpress_path: /var/www
wordpress_size: 243.76 MB (255603714 bytes)
uploads_path: vip://wp-content/uploads
uploads_size: 0.00 B (0 bytes)
themes_path: /var/www/wp-content/themes
themes_size: 4.74 MB (4966439 bytes)
plugins_path: /var/www/wp-content/plugins
plugins_size: 175.52 MB (184047029 bytes)
database_size: 3.14 GB (3372597248 bytes)
total_size: 3.56 GB (3817214430 bytes)
wp-dropins (2)
db.php: true
object-cache.php: true
wp-active-theme
name: KBB Editorial (Newspaper X Child theme) (Newspaper-child)
version: 9.0c
author: Kelley Blue Book
author_website: https://www.kbb.com
parent_theme: Newspaper (Newspaper)
theme_features: core-block-patterns, post-thumbnails, post-formats, automatic-feed-links, html5, woocommerce, bbpress, align-wide, align-full, editor-font-sizes, editor-style, menus, widgets
theme_path: /var/www/wp-content/themes/Newspaper-child
wp-parent-theme
name: Newspaper (Newspaper)
version: 10.3.6.1 (latest version: 10.3.9.1)
author: tagDiv
author_website: http://themeforest.net/user/tagDiv/portfolio
theme_path: /var/www/wp-content/themes/Newspaper
wp-themes-inactive (2)
Twenty Nineteen: version: 1.1, author: the WordPress team (latest version: 1.8)
Twenty Seventeen: version: 1.7, author: the WordPress team (latest version: 2.5)
wp-mu-plugins (37)
Admin Notice: version: 0.1.0, author: WordPress VIP
Advanced Post Caching: version: 0.2, author: Automattic
Akismet Anti-Spam: version: 4.1.7, author: Automattic
Async Publish Actions: author: Automattic, version: (undefined)
Automattic File Hosting Service: version: 0.2, author: Automattic
Cron Control: version: 2.0, author: Erick Hitter, Automattic
Debug Bar: version: 1.1.2, author: wordpressdotorg
Debug Loader: author: (undefined), version: (undefined)
Gutenberg Ramp: version: 1.1.0, author: Automattic, Inc.
HTTP Concat: version: 1.0, author: Automattic
Jetpack by WordPress.com: version: 9.2, author: Automattic
Lightweight Term Count Update: version: 0.1.0, author: Automattic, Alley Interactive
Query Monitor: version: 3.6.5, author: John Blackbourn & contributors
REST API Enhancements: version: 0.1, author: Erick Hitter, Automattic
Rewrite Rules Inspector: version: 1.2.1, author: Automattic
VaultPress: version: 2.1.3, author: Automattic
VIP All Options Limit: author: Automattic, version: (undefined)
VIP Back-compat: version: 1.0, author: Automattic
VIP Cache Manager: version: 1.1, author: Automattic
VIP Client mu-plugins: author: Automattic, version: (undefined)
VIP Dashboard: version: 2.0.4, author: Scott Evans, Filipe Varela
VIP Feed Cache: author: Automattic, version: (undefined)
VIP Force Two Factor: author: Automattic, version: (undefined)
VIP Go Core Modifications: author: Automattic, version: (undefined)
VIP Go Plugin Compat: version: 1.0, author: Automattic
VIP Hosting Miscellaneous: version: 1.1, author: Automattic
VIP Init: author: Automattic, version: (undefined)
VIP Jetpack Start: version: 0.1, author: Automattic
VIP Mail: version: 1.0, author: Automattic
VIP Performance: version: 1.0, author: Automattic
VIP Plugins: version: 1.0.0, author: Automattic
VIP Schema: author: Automattic, version: (undefined)
VIP Security: version: 1.0, author: Automattic
VIP Stats: author: Automattic, version: (undefined)
WordPress.com VIP Support: version: 3.1.0, author: Automattic
WordPress Importer: version: 0.6.4, author: wordpressdotorg
WP-CLI for VIP Go: author: Automattic, version: (undefined)
wp-plugins-active (32)
404page - your smart custom 404 error page: version: 11.2.6, author: Peter Raschendorfer
ACF to REST API: version: 3.3.2, author: Aires Gonçalves
Advanced Custom Fields: Extended: version: 0.8.7.2, author: ACF Extended (latest version: 0.8.7.5)
Advanced Custom Fields PRO: version: 5.8.4, author: Elliot Condon (latest version: 5.9.3)
Advanced TinyMCE Configuration: version: 1.6, author: Andrew Ozz
Ajax Search Lite: version: 4.8, author: Ernest Marcinko (latest version: 4.8.6)
Akamai for WordPress: version: 0.6.0, author: Akamai Technologies
AMP: version: 1.3.0, author: AMP Project Contributors (latest version: 2.0.8)
Brightcove Video Connect: version: 2.0, author: 10up
Broken Link Checker: version: 1.11.8, author: ManageWP (latest version: 1.11.15)
Classic Editor: version: 1.5, author: WordPress Contributors (latest version: 1.6)
Content Views: version: 2.3.2, author: Content Views (latest version: 2.3.4)
Duplicate Post: version: 3.2.3, author: Enrico Battocchi (latest version: 3.2.6)
JWT Authentication for WP-API: version: 1.2.6, author: Enrique Chavez
KBB Foundation: version: 1.0.0, author: KBB - Anonymoose
Lazy Load - Optimize Images: version: 2.3.4, author: WP Rocket
MetaSlider: version: 3.18.0, author: MetaSlider (latest version: 3.19.1)
MetaSlider - Pro Add-on Pack: version: 2.14.0, author: Team Updraft (latest version: 2.18.1)
Post Types Order: version: 1.9.4.1, author: Nsp Code (latest version: 1.9.5.2)
PublishPress Capabilities Pro: version: 1.10.1, author: PublishPress
PublishPress Checklists Pro: version: 2.4.2, author: PublishPress
PublishPress Pro: version: 2.4.2, author: PublishPress
PublishPress Revisions Pro: version: 2.4.3, author: PublishPress (latest version: 2.4.7)
Publish to Apple News: version: 2.0.3, author: Alley (latest version: 2.1.0)
Reading Time WP: version: 2.0.5, author: Jason Yingling (latest version: 2.0.10)
tagDiv Cloud Library: version: 1.5 | built on 10.08.2020 14:58, author: tagDiv
tagDiv Composer: version: 2.6 | built on 10.08.2020 14:58, author: tagDiv
TinyMCE Advanced: version: 5.2.1, author: Andrew Ozz (latest version: 5.6.0)
WP Media folder: version: 4.9.1, author: Joomunited (latest version: 5.3.7)
WP show more: version: 1.0.7, author: JAMOS Web Service
WP SVG: version: 1.13.1, author: Daryll Doyle
Yoast SEO Premium: version: 15.3, author: Team Yoast (latest version: 15.5)
wp-plugins-inactive (10)
Hello Dolly: version: 1.6, author: Matt Mullenweg (latest version: 1.7.2)
Native Lazyload: version: 1.0.2, author: Google
PublishPress: version: 1.21.2, author: PublishPress (latest version: 3.0.1)
PublishPress Authors Pro: version: 3.8.1, author: PublishPress
PublishPress Permissions Pro: version: 3.3.9, author: PublishPress
Radio Buttons for Taxonomies: version: 2.1.0, author: helgatheviking (latest version: 2.2.1)
tagDiv Standard Pack: version: 1.0 BETA | built on 17.06.2020 8:12, author: tagDiv
WordPress Importer: version: 0.6.4, author: wordpressdotorg (latest version: 0.7)
WordPress REST API Authentication: version: 1.2.0, author: miniOrange (latest version: 1.4.0)
WP Bulk Delete: version: 1.1.3, author: Xylus Themes (latest version: 1.2.1)
wp-media
image_editor: BFI_Image_Editor_GD_1_3
imagick_module_version: Not available
imagemagick_version: Not available
file_uploads: File uploads is turned off
post_max_size: 2047M
upload_max_filesize: 2047M
max_effective_size: 2 GB
max_file_uploads: 20
gd_version: bundled (2.1.0 compatible)
ghostscript_version: not available
wp-server
server_architecture: Linux 4.19.0-8-amd64 x86_64
httpd_software: nginx
php_version: 7.3.25 64bit
php_sapi: fpm-fcgi
max_input_variables: 6144
time_limit: 1200
memory_limit: 512M
max_input_time: 1200
upload_max_filesize: 2047M
php_post_max_size: 2047M
curl_version: 7.73.0 OpenSSL/1.1.0l
suhosin: false
imagick_availability: false
pretty_permalinks: true
wp-database
extension: mysqli
server_version: 10.2.15-MariaDB-log
client_version: mysqlnd 5.0.12-dev - 20150407 -
wp-constants
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /var/www/wp-content
WP_PLUGIN_DIR: /var/www/wp-content/plugins
WP_MAX_MEMORY_LIMIT: 512M
WP_DEBUG: false
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_LOCAL_DEV: undefined
DB_CHARSET: utf8mb4
DB_COLLATE: utf8mb4_unicode_ci
wp-filesystem
wordpress: not writable
wp-content: not writable
uploads: writable
plugins: not writable
themes: not writable
mu-plugins: not writable
jetpack
site_id: 167633086
ssl_cert: No
time_diff: false
version_option: 9.2.1:1607618595
old_version: 9.2:1607618593
public: Public
master_user: #2 wpcomvip
current_user: #10 Nevin-Magathan
tokens_set: Blog User
blog_token: kFqW%m8190F@EKKjJpfP@Z(NN%7mzSMH
user_token: FxI^1Ki8Xl2T!3kum&O4$eAIX%F#fz11
version: 9.2.1
jp_plugin_dir: /var/www/wp-content/mu-plugins/jetpack-9.2/
plan: business
protect_header: false
full_sync: {"started":"Thu, 19 Nov 2020 17:03:43 +0000","finished":"Thu, 19 Nov 2020 17:03:51 +0000","progress":{"options":{"finished":true},"functions":{"finished":true},"constants":{"finished":true},"users":{"total":"1","sent":1,"finished":true,"last_sent":"65"},"network_options":{"finished":true}},"config":{"options":true,"functions":true,"constants":true,"users":[65],"network_options":true}}
sync_size: undefined
sync_lag: 0 seconds
full_sync_size: undefined
full_sync_lag: 0 seconds
idc_urls: {"home":"https://www.kbb.com","siteurl":"https://www.kbb.com","WP_HOME":"","WP_SITEURL":""}
idc_error_option: false
idc_optin: true
cxn_tests: {"9":{"name":"test__wpcom_connection_test","label":false,"short_description":"Kelley Blue Book is not connected.: 200","long_description":"
A healthy connection ensures Jetpack essential services are provided to your WordPress site, such as Stats and Site Security.</p>
<span class="dashicons fail"><span class="screen-reader-text">Error</span></span> Kelley Blue Book is not connected.: 200</p>
We recommend reconnecting Jetpack.</strong></p>","severity":"critical","action":"https://www.kbb.com/wp-admin/admin.php?page=jetpack#/reconnect","action_label":"Reconnect Jetpack now","show_in_site_health":true,"pass":false,"group":["default"],"type":"direct"}}
publishpress-modules (19)
modules_settings: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/modules_settings]
calendar: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/calendar]
editorial_metadata: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/editorial_metadata]
content_overview: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/content_overview]
custom_status: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/custom_status]
notifications: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/notifications]
improved_notifications: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/improved_notifications]
async_notifications: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/async_notifications]
notifications_log: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/notifications_log]
roles: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/roles]
user_groups: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/user_groups]
dashboard: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/dashboard]
editorial_comments: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/editorial_comments]
settings: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/settings]
efmigration: on [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/efmigration]
debug: off [/var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/debug]
prosettings: on [/var/www/wp-content/plugins/publishpress-pro/modules/prosettings]
slack: on [/var/www/wp-content/plugins/publishpress-pro/modules/slack]
reminders: on [/var/www/wp-content/plugins/publishpress-pro/modules/reminders]
publishpress
PUBLISHPRESS_VERSION: 2.4.2
PUBLISHPRESS_BASE_PATH: /var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress
PUBLISHPRESS_FILE_PATH: /var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/publishpress.php
PUBLISHPRESS_URL: https://www.kbb.com/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/
PUBLISHPRESS_SETTINGS_PAGE: https://www.kbb.com/wp-admin/admin.php?page=pp-modules-settings&module=pp-modules-settings-settings
PUBLISHPRESS_LIBRARIES_PATH: /var/www/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/libraries
WP_CONTENT_DIR: /var/www/wp-content
WP_CONTENT_URL: https://www.kbb.com/wp-content
option::date_format: F j, Y
option::time_format: g:i a
option::timezone_string: America/Los_Angeles
option::gmt_offset: -8
php::date_default_timezone_get: UTC
`
Hi @nmagathan ,
It looks like this is due to WP 5.6 introducing a new version of jQuery and the removal of context https://api.jquery.com/context/. We will work towards a fix for it, for now using the jQuery Migrate Helper plugin should resolve temporarily.