# DiscoTOC 问题：TypeError：\_offsetCalculator.headerOffset 不是一个函数

**URL:** <https://meta.discourse.org/t/problem-with-discotoc-typeerror-offsetcalculator-headeroffset-is-not-a-function/219710>\
**Category:** Bug\
**Created:** [2022年三月1日 15:08 UTC](https://meta.discourse.org/t/problem-with-discotoc-typeerror-offsetcalculator-headeroffset-is-not-a-function/219710 "2022-03-01T15:08:26Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![amotl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amotl/32/109873_2.png) [@amotl](https://meta.discourse.org/u/amotl)\
**Post date:** [2022年三月1日 15:08 UTC](https://meta.discourse.org/t/problem-with-discotoc-typeerror-offsetcalculator-headeroffset-is-not-a-function/219710/1 "2022-03-01T15:08:26Z")

</div>

尊敬的 Discourse 团队，尊敬的 @Johani：

非常感谢您提供的出色的 Discourse 插件 [https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143。](https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143%E3%80%82)

昨天，有用户报告称 TOC 导航在 [community.hiveeyes.org](http://community.hiveeyes.org) 上停止工作，您可以在 \[1\] 找到一个示例。该实例运行的是 Discourse 2.8.0.beta10 和最新的 DiscoTOC，是从主题组件管理器升级的。

在另外两个 Discourse 实例上，一切似乎都正常：

- 2.8.0.beta10（自托管），DiscoTOC _落后 17 个提交，在 [5b051e18](https://github.com/discourse/DiscoTOC/commit/5b051e18)_ \[2\]
- 2.9.0.beta2（商业计划），DiscoTOC _落后 1 个提交，在 [9933031](https://github.com/discourse/DiscoTOC/commit/9933031)_ \[3\]

您认为这可能是由于我们在系统中安装的其他插件 \[4\] 造成的吗？到目前为止，我们从未遇到过与 DiscoTOC 类似的任何问题。

提前感谢您花时间调查此事。我们倾向于认为这是我们这边的一个小问题，因为我们还没有发现其他人的类似报告。从另一个角度来看，这里的结果也可能有助于其他人观察到类似的情况。

此致，  
Andreas。

* * *

Firefox 浏览器控制台中的错误是 `Uncaught TypeError: _offsetCalculator.headerOffset is not a function`，发生在 `updateTOCSidebar` 函数中。

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/f/5f024505d424be9926f13621ac452e0e506d62db.jpeg)  
 ![image](https://global.discourse-cdn.com/meta/original/3X/6/f/6fc0eb40e87832ae7432cc8c3e3cc1d9cedbb8f8.jpeg)

* * *

1. [Installation von Saraswati auf SBC-Systemen (Debian), mit Upload per rsync oder FTP - BOB-Anleitungen - Hiveeyes](https://community.hiveeyes.org/t/installation-von-saraswati-auf-sbc-systemen-debian-mit-upload-per-rsync-oder-ftp/4084) 

2. [Panodata Map Panel for Grafana - The workbench - Panodata Community](https://community.panodata.org/t/panodata-map-panel-for-grafana/121) 

3. [Interpolating missing time-series values - Tutorials - CrateDB Community](https://community.crate.io/t/interpolation-of-missing-time-series-values/1010) 

4. 安装的插件。

---

_[View the full topic](https://meta.discourse.org/t/problem-with-discotoc-typeerror-offsetcalculator-headeroffset-is-not-a-function/219710)._
