10up / brightcove-video-connect

A plugin to integrate your Brightcove video library or libraries with WordPress
https://www.brightcove.com/
GNU General Public License v2.0
22 stars 34 forks source link

PHP Fatal error: Uncaught Error: Class 'BC_Logging' #230

Closed becca-frick closed 2 years ago

becca-frick commented 2 years ago

Describe the bug When videos are removed from the Brightcove Video Library but still used in a custom block on the website, the site throws a fatal PHP error which breaks the page completely. Site logging reports the bug as: PHP Fatal error: Uncaught Error: Class 'BC_Logging' not found in /wp-content/plugins/brightcove-video-connect/includes/api/class-bc-api.php:268

Steps to Reproduce

  1. Upload a video to the Brightcove video library.
  2. Add the video to a page.
  3. Remove the video from the Brightcove video library.
  4. Navigate back to the page to find the PHP Fatal error.

Expected behavior Either the video should be removed from the page, or there should be an error code reported back to prevent the error from breaking the page.

Screenshots

Environment information

version: 5.8.1 site_language: en_US user_language: en_US timezone: America/Phoenix permalink: /about/news-and-articles/%category%/%postname%/ https_status: true multisite: true user_registration: false blog_public: 1 default_comment_status: closed environment_type: production user_count: 60 site_count: 2 network_count: 1 dotorg_communication: true

wp-dropins (1)

advanced-cache.php: true

wp-active-theme

name: custom version: 1.0.0 parent_theme: none theme_features: core-block-patterns, widgets-block-editor, title-tag, custom-logo, custom-header, post-thumbnails, html5, customize-selective-refresh-widgets, align-wide, disable-custom-font-sizes, editor-color-palette, disable-custom-colors, menus, widgets auto_update: Disabled

wp-themes-inactive (3)

Twenty Twenty: version: 1.8, author: the WordPress team, Auto-updates disabled Twenty Twenty-One: version: 1.4, author: the WordPress team, Auto-updates disabled

wp-mu-plugins (6)

Force Strong Passwords - WPE Edition: version: 1.6.4, author: Jason Cosper WPE ElasticPress Autosuggest Logger: version: 1.0.0, author: WP Engine WP Engine Seamless Login Plugin: version: 1.5.5, author: WP Engine WP Engine Security Auditor: version: 1.0.10, author: wpengine WP Engine System: version: 4.1.0, author: WP Engine WP Migrate DB Pro Compatibility: version: 1.2, author: Delicious Brains

wp-plugins-active (37)

ACF Content Analysis for Yoast SEO: version: 3.0.1, author: Thomas Kräftner, ViktorFroberg, marol87, pekz0r, angrycreative, Team Yoast, Auto-updates disabled Advanced Custom Fields: Color Palette: version: 1.0.7, author: emagine, Auto-updates disabled Advanced Custom Fields: Extended: version: 0.8.8.6, author: ACF Extended, Auto-updates disabled Advanced Custom Fields PRO: version: 5.10.2, author: Delicious Brains, Auto-updates disabled Autoptimize: version: 2.9.2, author: Frank Goossens (futtta), Auto-updates disabled Brightcove Video Connect: version: 2.2.1, author: 10up, Auto-updates disabled Cloudflare: version: 4.5.1, author: Cloudflare, Inc., Auto-updates disabled EM Add To Menu: version: 1.0.0, author: eMagine, Auto-updates disabled Emagine Components: version: 1.1.0, author: emagine, Auto-updates disabled Em Blocks: version: 0.0.5, author: emagine, Auto-updates disabled EM Client Functions: version: 1.01, author: emagine, Auto-updates disabled EM Image Crop: version: 1.13, author: eMagine, Auto-updates disabled EM Timeline: version: 1.0.0, author: emagine, Auto-updates disabled EM Widget Framework: version: 1.2.12, author: eMagine, Auto-updates disabled Enable Media Replace: version: 3.5.0, author: ShortPixel, Auto-updates disabled Find My Blocks!: version: 3.5.1, author: Eddy Sims, Auto-updates disabled Google Apps Login Premium: version: 3.4.2, author: Lever Technology LLC, Auto-updates disabled Gravity Forms: version: 2.5.10, author: Gravity Forms, Auto-updates disabled Kraken Image Optimizer: version: 2.6.5, author: Karim Salman, Auto-updates disabled Redirection: version: 5.1.3, author: John Godley, Auto-updates disabled Regenerate Thumbnails: version: 3.1.5, author: Alex Mills (Viper007Bond), Auto-updates disabled Required taxonomies: version: 1.1.7, author: VegaCorp, Auto-updates disabled Resource Manager: version: 1.2.0, author: emagine, Auto-updates disabled Schema Pro: version: 2.6.3, author: Brainstorm Force (latest version: 2.7.1), Auto-updates disabled Search Regex: version: 2.4.1, author: John Godley, Auto-updates disabled Shared Counts: version: 1.3.0, author: Bill Erickson & Jared Atchison, Auto-updates disabled Simple Cookie Notification: version: 1.0.1, author: emagine, Auto-updates disabled WebP Express: version: 0.20.1, author: Bjørn Rosell, Auto-updates disabled WP All Import Pro: version: 4.6.5, author: Soflyy, Auto-updates disabled WP Migrate DB Pro: version: 2.1.2, author: Delicious Brains, Auto-updates disabled WP Migrate DB Pro Media Files: version: 2.0.3, author: Delicious Brains, Auto-updates disabled WP Migrate DB Pro Multisite Tools: version: 1.3.1, author: Delicious Brains, Auto-updates disabled WP Migrate DB Pro Theme & Plugin Files: version: 1.1.2, author: Delicious Brains, Auto-updates disabled WP Sitemap Page: version: 1.6.4, author: Tony Archambeau, Auto-updates disabled Yoast Duplicate Post: version: 4.1.2, author: Enrico Battocchi & Team Yoast, Auto-updates disabled Yoast SEO: version: 17.2, author: Team Yoast, Auto-updates disabled Yoast SEO Premium: version: 16.7, author: Team Yoast, Auto-updates disabled

wp-plugins-inactive (3)

Async JavaScript: version: 2.21.08.31, author: Frank Goossens (futtta), Auto-updates disabled PNG to JPG: version: 3.9, author: KubiQ, Auto-updates disabled Simple CSS: version: 1.1.1, author: Tom Usborne, Auto-updates disabled

wp-media

image_editor: WP_Image_Editor_Imagick imagick_module_version: 1687 imagemagick_version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org imagick_version: 3.4.4 file_uploads: File uploads is turned off post_max_size: 100M upload_max_filesize: 50M max_effective_size: 50 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 137 MB imagick::RESOURCETYPE_DISK: 1073741824 imagick::RESOURCETYPE_FILE: 6144 imagick::RESOURCETYPE_MAP: 512 MB imagick::RESOURCETYPE_MEMORY: 256 MB imagick::RESOURCETYPE_THREAD: 1 imagemagick_file_formats: 3FR, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV gd_version: 2.2.5 gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM ghostscript_version: unknown

wp-server

server_architecture: Linux 5.3.0-1018-gcp x86_64 httpd_software: Apache php_version: 7.4.23 64bit php_sapi: apache2handler max_input_variables: 10000 time_limit: 3600 memory_limit: 512M max_input_time: 3600 upload_max_filesize: 50M php_post_max_size: 100M curl_version: 7.58.0 OpenSSL/1.1.1 suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: true

wp-database

extension: mysqli server_version: 5.7.35-38-log client_version: mysqlnd 7.4.23

wp-constants

WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /wp-content WP_PLUGIN_DIR: /wp-content/plugins WP_MEMORY_LIMIT: 64M WP_MAX_MEMORY_LIMIT: 512M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: true CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined DB_CHARSET: utf8 DB_COLLATE: utf8_unicode_ci

wp-filesystem

wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable

Additional context Upon navigating to the /class-bc-api.php plugin and commenting out the call to BC_Logging on line 268, the video is removed and the error is not seen on the page.

Rahmon commented 2 years ago

Hi @becca-frick

Thanks for open this issue. I've tried to reproduce this issue but I couldn't. When I delete a video, the page shows that the video was not found and I didn't get a PHP Fatal error.

image

Rahmon commented 2 years ago

We are going to go ahead and close out this issue. If anything else comes up, please feel free to submit a new issue.