未捕获的 TypeError:无法读取 undefined 的 'apply' 属性

When trying to change theme component setting, clicking the green check button produces the following error, changes are not saved (Category icons component and Tag icons component):

Uncaught TypeError: Cannot read property 'apply' of undefined
Url: https://forum.url/assets/ember_jquery-1d91c694d903342adc8cb39c93a87ce4c3259ee8cee5ab61289c257be5708f23.js
Line: 1
Column: 490273
Window Location: https://forum.url/admin/customize/themes/4
1 个赞

Update to latest via /admin/upgrade and try again

1 个赞

Already on latest, fresh install, no customizations or plugins other than these two components installed.

1 个赞

Having a similar situation here:

Uncaught TypeError: Cannot read property ‘categories’ of undefined

When trying to save: default categories watching

1 个赞

I have no repro on latest for any of the two issues reported in this topic.

Please be sure:

  • you are on master
  • you try with safe-mode if possible
  • give a very detailed repro if still happening
1 个赞

I am on tests-passed - did a rebuild already. Safe mode still has the issue.
(2cb805a683)

Anonymized error log:

Reproduce? Nothing happens when i select a category as default watch. Red cross makes it undo and green checkmark does not do anything (it should ask if I want to apply to old users, it works on another forum I installed).

Edit: Do you want me to open a topic for this? Or you can just move this post.

Repro steps:

  • install theme component
  • enable component for default theme
  • select component (Category Icons)
  • remove existing entry from setting: category icon list
  • click green check button next to the setting
  • error is logged, changes are not saved (green and red button remain on screen)

Backtrace:

TypeError: Cannot read property 'apply' of undefined
    at e.t._join (https://forum.url/assets/ember_jquery-1d91c694d903342adc8cb39c93a87ce4c3259ee8cee5ab61289c257be5708f23.js:1:490273)
    at e.t.join (https://forum.url/assets/ember_jquery-1d91c694d903342adc8cb39c93a87ce4c3259ee8cee5ab61289c257be5708f23.js:1:487153)
    at p (https://forum.url/assets/ember_jquery-1d91c694d903342adc8cb39c93a87ce4c3259ee8cee5ab61289c257be5708f23.js:1:353112)
    at https://forum.url/assets/ember_jquery-1d91c694d903342adc8cb39c93a87ce4c3259ee8cee5ab61289c257be5708f23.js:1:152256
    at r (https://forum.url/assets/ember_jquery-1d91c694d903342adc8cb39c93a87ce4c3259ee8cee5ab61289c257be5708f23.js:1:340782)
    at https://forum.url/assets/ember_jquery-1d91c694d903342adc8cb39c93a87ce4c3259ee8cee5ab61289c257be5708f23.js:1:152201
    at t.click (https://forum.url/assets/application-1beed43f1604869d65e7d466de8cb9119afcf1cbbc2eae42c98ae8f7a5d0edf9.js:1:933743)
    at trigger (https://forum.url/assets/ember_jquery-1d91c694d903342adc8cb39c93a87ce4c3259ee8cee5ab61289c257be5708f23.js:1:312409)
    at t.e [as trigger] (https://forum.url/assets/ember_jquery-1d91c694d903342adc8cb39c93a87ce4c3259ee8cee5ab61289c257be5708f23.js:1:291192)
    at e.t._run (https://forum.url/assets/ember_jquery-1d91c694d903342adc8cb39c93a87ce4c3259ee8cee5ab61289c257be5708f23.js:1:490423)

My error is happening on all default settings in admin for watching categories and tags.

Both of you are one commit behind the fix. You should be in at least #8d69944.

1 个赞

Please refer to topic below, this containts newer information about my issue.

1 个赞

Okay. But, if you are in 2cb805a683 still you have to upgrade to the latest version to fix the issue (which is reported in OP) in theme components.

1 个赞

I understand what you are saying. In my test env I am on the newest build. Issue is still there. My error is different as the one in this OP. OP should confirm if his error is fixed or not.

1 个赞

There is a bit of confusion and an unintentional hijacking of this topic for seemingly similar but unrelated problem.

When this issue was reported #2cb805a683 was the latest version.

I can confirm that commit #8d69944 indeed fixes the issue in the OP and this topic can be closed.

2 个赞