morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.77k stars 216 forks source link

Webpage turns blank after clicking "Edit Movie" #2614

Closed xosdy closed 2 weeks ago

xosdy commented 1 month ago

Describe the bug When editing a movie that has "Chinese" in its audio languages, the webpage turns blank after clicking the "Edit Movie" button.

To Reproduce Steps to reproduce the behavior:

  1. Go to the 'Movies' list
  2. Click on the wrench icon in the row for a movie that has Chinese listed in its audio languages
  3. Observe that the webpage turns blank.

Expected behavior The "Edit Movie" settings dialog should be displayed as expected.

Screenshots If applicable, add screenshots to help explain your problem.

Software (please complete the following information):

Additional context I debugged the issue and found that the audio select widget in the dialog uses the language code2 as a key. However, this key might be null if there’s no corresponding record in the table_settings_languages table, for example, when the name field is "Chinese."

Errors displayed in the console:

core-FkrZ286h.js:44  TypeError: Cannot read properties of null (reading 'trim')
    at core-FkrZ286h.js:44:185440
    at Array.map (<anonymous>)
    at Gb (core-FkrZ286h.js:44:185431)
    at core-FkrZ286h.js:44:187973
    at Uc (vendors-BAK-HwJ-.js:38:17000)
    at xd (vendors-BAK-HwJ-.js:40:1571)
    at Zm (vendors-BAK-HwJ-.js:40:45934)
    at Ym (vendors-BAK-HwJ-.js:40:39727)
    at W0 (vendors-BAK-HwJ-.js:40:39655)
    at vl (vendors-BAK-HwJ-.js:40:39508)
console.error @ core-FkrZ286h.js:44
overrideMethod @ console.js:288
mu @ vendors-BAK-HwJ-.js:40
Nm.n.callback @ vendors-BAK-HwJ-.js:40
vd @ vendors-BAK-HwJ-.js:38
Ad @ vendors-BAK-HwJ-.js:40
Wm @ vendors-BAK-HwJ-.js:40
$0 @ vendors-BAK-HwJ-.js:40
K0 @ vendors-BAK-HwJ-.js:40
nr @ vendors-BAK-HwJ-.js:40
Ud @ vendors-BAK-HwJ-.js:40
Zn @ vendors-BAK-HwJ-.js:38
kr @ vendors-BAK-HwJ-.js:40
dt.flushSync @ vendors-BAK-HwJ-.js:40
(anonymous) @ core-FkrZ286h.js:44
requestAnimationFrame
S @ core-FkrZ286h.js:44
P @ core-FkrZ286h.js:44
(anonymous) @ core-FkrZ286h.js:44
(anonymous) @ hooks-Au1Qewuz.js:1
Dl @ vendors-BAK-HwJ-.js:40
Zr @ vendors-BAK-HwJ-.js:40
K0 @ vendors-BAK-HwJ-.js:40
nr @ vendors-BAK-HwJ-.js:40
Ud @ vendors-BAK-HwJ-.js:40
Zn @ vendors-BAK-HwJ-.js:38
(anonymous) @ vendors-BAK-HwJ-.js:40
Show 1 more frame
Show less
vendors-BAK-HwJ-.js:38  Uncaught TypeError: Cannot read properties of null (reading 'trim')
    at core-FkrZ286h.js:44:185440
    at Array.map (<anonymous>)
    at Gb (core-FkrZ286h.js:44:185431)
    at core-FkrZ286h.js:44:187973
    at Uc (vendors-BAK-HwJ-.js:38:17000)
    at xd (vendors-BAK-HwJ-.js:40:1571)
    at Zm (vendors-BAK-HwJ-.js:40:45934)
    at Ym (vendors-BAK-HwJ-.js:40:39727)
    at W0 (vendors-BAK-HwJ-.js:40:39655)
    at vl (vendors-BAK-HwJ-.js:40:39508)
anderson-oki commented 1 month ago

@xosdy The code2 is expected to be always present, so you mean it is neither Chinese Simplified neither Chinese Traditional?

xosdy commented 1 month ago

@anderson-oki Yes, that's correct. It is neither Chinese Simplified nor Chinese Traditional. I believe Radarr only lists 'Chinese' here.

anderson-oki commented 2 weeks ago

It will be fixed on the upcoming beta, and you will need to run the task of Sync with Sonarr and Sync with Radarr let me know if you still have issues.

xosdy commented 2 weeks ago

@anderson-oki it works now, thanks!