# 带有嵌入投票的帖子加载失败

**URL:** https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549
**Category:** Support
**Tags:** unsupported-install
**Created:** [2019年十二月10日 12:11 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549 "2019-12-10T12:11:08Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![averi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/averi/32/157657_2.png) [@averi](https://meta.discourse.org/u/averi)
#### Post date: [2019年十二月10日 12:11 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/1 "2019-12-10T12:11:08Z")

</div>

自从升级到 v2.4.0beta8 后，包含嵌入式投票的帖子无法加载，并出现以下回溯信息：

```plaintext
/discourse/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.1/lib/active_model/attribute_methods.rb:431:in `method_missing'
/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:99:in `block in attribute'
(eval):15:in `_fast_attributes'
/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:468:in `rescue in attributes'
/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:455:in `attributes'
/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:480:in `_serializable_hash'
/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:359:in `serializable_hash'
/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:347:in `as_json'
/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.1/lib/active_support/json/encoding.rb:22:in `encode'
/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.1/lib/active_support/json/encoding.rb:22:in `encode'
/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.1/lib/active_support/core_ext/object/json.rb:42:in `to_json'
/discourse/vendor/bundle/ruby/2.6.0/gems/active_model_serializers-0.8.4/lib/active_model/serializer.rb:331:in `to_json'
/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json/adapters/oj.rb:40:in `dump'
/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json/adapters/oj.rb:40:in `dump'
/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json/adapter.rb:25:in `dump'
/discourse/vendor/bundle/ruby/2.6.0/gems/multi_json-1.13.1/lib/multi_json.rb:139:in `dump'
/discourse/app/controllers/topics_controller.rb:1003:in `block (2 levels) in perform_show_response'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal/mime_responds.rb:214:in `respond_to'
/discourse/app/controllers/topics_controller.rb:1000:in `perform_show_response'
/discourse/app/controllers/topics_controller.rb:164:in `show'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/abstract_controller/base.rb:196:in `process_action'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:135:in `run_callbacks'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.1/lib/active_support/notifications.rb:180:in `block in instrument'
/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.1/lib/active_support/notifications.rb:180:in `instrument'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.1/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/abstract_controller/base.rb:136:in `process'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionview-6.0.1/lib/action_view/rendering.rb:39:in `process'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-1.1.3/lib/mini_profiler/profiling_methods.rb:104:in `block in profile_method'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal.rb:191:in `dispatch'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_controller/metal.rb:252:in `dispatch'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/routing/route_set.rb:51:in `dispatch'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/routing/route_set.rb:33:in `serve'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/journey/router.rb:49:in `block in serve'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/journey/router.rb:32:in `each'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/journey/router.rb:32:in `serve'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/routing/route_set.rb:837:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.0.7/lib/rack/protection/frame_options.rb:31:in `call'
/discourse/lib/middleware/omniauth_bypass_middleware.rb:68:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/tempfile_reaper.rb:15:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/conditional_get.rb:25:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/head.rb:12:in `call'
/discourse/lib/content_security_policy/middleware.rb:12:in `call'
/discourse/lib/middleware/anonymous_cache.rb:274:in `call'
/discourse/config/initializers/008-rack-cors.rb:25:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:232:in `context'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:226:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/middleware/cookies.rb:648:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:101:in `run_callbacks'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/logster-2.4.1/lib/logster/middleware/reporter.rb:43:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.1/lib/rails/rack/logger.rb:38:in `call_app'
/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.1/lib/rails/rack/logger.rb:28:in `call'
/discourse/config/initializers/100-quiet_logger.rb:18:in `call'
/discourse/config/initializers/100-silence_logger.rb:31:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/discourse/lib/middleware/enforce_hostname.rb:17:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/method_override.rb:22:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/middleware/static.rb:126:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.1/lib/action_dispatch/middleware/host_authorization.rb:77:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-1.1.3/lib/mini_profiler/profiler.rb:296:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/message_bus-2.2.3/lib/message_bus/rack/middleware.rb:57:in `call'
/discourse/lib/middleware/request_tracker.rb:176:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.1/lib/rails/engine.rb:526:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.1/lib/rails/railtie.rb:190:in `public_send'
/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.1/lib/rails/railtie.rb:190:in `method_missing'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/urlmap.rb:68:in `block in call'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `each'
/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/configuration.rb:227:in `call'
/discourse/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/server.rb:660:in `handle_request'
/discourse/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/server.rb:474:in `process_client'
/discourse/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/server.rb:334:in `block in run'
/discourse/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/thread_pool.rb:135:in `block in spawn_thread'

```

尝试创建包含投票的帖子也会失败。我们未安装任何非官方维护的插件，根据 [1]，gem 的情况也是如此。

是否有我们遗漏的明显问题？

[1] [Sign in · GitLab](https://gitlab.gnome.org/Infrastructure/discourse-web/blob/master/Dockerfile)

---

<div class="post-metadata">

### Author: ![averi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/averi/32/157657_2.png) [@averi](https://meta.discourse.org/u/averi)
#### Post date: [2019年十二月10日 12:38 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/2 "2019-12-10T12:38:23Z")

</div>

似乎以下迁移从未执行：

20191114160613\_add\_graph\_to\_polls.rb

因此，polls 表的结构如下：

```plaintext
                                        Table "public.polls"
      Column | Type | Modifiers                      
------------------+-----------------------------+----------------------------------------------------
 id | bigint | not null default nextval('polls_id_seq'::regclass)
 post_id | bigint | 
 name | character varying | not null default 'poll'::character varying
 close_at | timestamp without time zone | 
 type | integer | not null default 0
 status | integer | not null default 0
 results | integer | not null default 0
 visibility | integer | not null default 0
 min | integer | 
 max | integer | 
 step | integer | 
 anonymous_voters | integer | 
 created_at | timestamp without time zone | not null
 updated_at | timestamp without time zone | not null
Indexes:
    "polls_pkey" PRIMARY KEY, btree (id)
    "index_polls_on_post_id_and_name" UNIQUE, btree (post_id, name)
    "index_polls_on_post_id" btree (post_id)
Foreign-key constraints:
    "fk_rails_b50b782d08" FOREIGN KEY (post_id) REFERENCES posts(id)
Referenced by:
    TABLE "poll_votes" CONSTRAINT "fk_rails_a6e6974b7e" FOREIGN KEY (poll_id) REFERENCES polls(id)
    TABLE "poll_options" CONSTRAINT "fk_rails_aa85becb42" FOREIGN KEY (poll_id) REFERENCES polls(id)

```

迁移会在每次容器启动时通过初始化容器执行，接下来的问题是弄清楚为何该特定迁移从未被调度执行。

---

<div class="post-metadata">

### Author: ![averi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/averi/32/157657_2.png) [@averi](https://meta.discourse.org/u/averi)
#### Post date: [2019年十二月10日 13:04 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/3 "2019-12-10T13:04:33Z")

</div>

迁移已运行，虽然解决了问题，但又引入了另一个问题：

```plaintext
SecurityError: 操作不安全。Url: https://discourse.gnome.org/assets/application-6cbf6fb051e218dafa1bf601dae045b532b3ec5125762bb09aac8ffaf3f25958.js 行：1 列：0 

SecurityError: 操作不安全。
Url: https://discourse.gnome.org/assets/application-6cbf6fb051e218dafa1bf601dae045b532b3ec5125762bb09aac8ffaf3f25958.js
行：1
列：0
窗口位置：https://discourse.gnome.org//t/is-it-time-to-turn-shell-extension-version-locking-back-on/809

replaceState@https://discourse.gnome.org/assets/application-6cbf6fb051e218dafa1bf601dae045b532b3ec5125762bb09aac8ffaf3f25958.js:1:392500
initState@https://discourse.gnome.org/assets/application-6cbf6fb051e218dafa1bf601dae045b532b3ec5125762bb09aac8ffaf3f25958.js:1:391813
init@https://discourse.gnome.org/assets/application-6cbf6fb051e218dafa1bf601dae045b532b3ec5125762bb09aac8ffaf3f25958.js:1:391567
e@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:290766
h@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:281717
f</e.create@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:283033
v</t.create@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:94398
h/<@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:92267
h@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:92643
n</t.lookup@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:91157
lookup@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:272294
_</n._setupLocation@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:243579
_</n.setupRouter@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:240697
_</n.startRouting@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:240535
startRouting@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:319395
didBecomeReady@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:324708
f</t.invoke@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:482548
f</t.flush@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:481548
p</t.flush@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:483563
t</t._end@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:488992
t</t.end@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:485528
t</t._run@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:489530
t</t._join@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:489315
t</t.join@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:486236
p@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:352709
e.bind/<@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:352933
e@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:29470
l/</t<@https://discourse.gnome.org/assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:1:29794

```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2019年十二月10日 15:40 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/4 "2019-12-10T15:40:00Z")

</div>

您是否意识到，这是一个自定义安装，它抛弃了我们在自定义 Docker 镜像中所做的一切工作，而这些工作正是为了确保诸如缺少迁移之类的错误永远不会发生？

我认为您的自定义方案在启动时缺少了插件的迁移。插件中的迁移很少见，这也是它之前没有立即报错的原因。

---

<div class="post-metadata">

### Author: ![averi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/averi/32/157657_2.png) [@averi](https://meta.discourse.org/u/averi)
#### Post date: [2019年十二月10日 16:09 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/5 "2019-12-10T16:09:54Z")

</div>

感谢您的反馈。我们基础设施中的几乎所有内容都是为在类似 OpenShift 的工具之上运行而定制的，我意识到我们可能在此方面有所疏漏。未来我们可能需要考虑使用上游的 Docker 镜像，最重要的是坚持使用稳定版本（目前我们使用的是 tests-passed）。您对我之前提到的另一个问题有何看法？我也很期待您的反馈。谢谢！

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2019年十二月10日 17:55 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/6 "2019-12-10T17:55:38Z")

</div>

> [@averi](#):
>
> 对于我之前提到的另一个问题，您有什么看法吗？

这是一个 JavaScript 错误，可能由浏览器配置不当、扩展程序等原因引起。

在本例中，URL 格式完全错误：

```plaintext
https://discourse.gnome.org//t/is-it-time-to-turn-shell-extension-version-locking-back-on/809

```

请注意其中的双斜杠 `//`，这可能是用户输入错误，也可能是反向代理配置不当所致。

---

<div class="post-metadata">

### Author: ![averi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/averi/32/157657_2.png) [@averi](https://meta.discourse.org/u/averi)
#### Post date: [2019年十二月10日 17:59 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/7 "2019-12-10T17:59:39Z")

</div>

啊，确实，刚看到那个错误的重写，已经修复了，我们恢复正常了！非常感谢你的帮助，Rafael，我特别感激，因为我们的安装经过了大量定制。祝你有美好的一天！

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2019年十二月10日 18:07 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/8 "2019-12-10T18:07:39Z")

</div>

> [@averi](#):
>
> 我们未来可能需要考虑使用上游的 Docker 镜像

这非常重要，因为您今天遇到的两个问题都是自身操作导致的。在支持的安装环境下，这些问题是不可能发生的。

非常喜爱 Gnome 项目，请继续加油！

---

<div class="post-metadata">

### Author: ![nmcgovern](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nmcgovern/32/132630_2.png) [@nmcgovern](https://meta.discourse.org/u/nmcgovern)
#### Post date: [2019年十二月10日 19:03 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/9 "2019-12-10T19:03:13Z")

</div>

对于感兴趣的朋友，第二个错误在 Meta 上也会发生——例如访问 [https://meta.discourse.org//t/posts-with-embedded-polls-fail-to-load/135549](https://meta.discourse.org//t/posts-with-embedded-polls-fail-to-load/135549)。

看起来 [基本 URL 解析规范](https://url.spec.whatwg.org/#concept-basic-url-parser) 指出，如果路径以两个斜杠开头，浏览器总会抛出验证错误。

也许有人会说，Discourse 应该在调用 history.replaceState() 之前检查并修复传入的路径是否有效，但这听起来非常麻烦（即：需要自行实现 URL 解析器和自动修复功能），而这种情况在现实中其实相当罕见。

_本文由研读 WHATWG HTML 活标准后融化的大脑呈献_

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2023年九月20日 11:48 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/10 "2023-09-20T11:48:37Z")

</div>



---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2023年九月20日 16:33 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/11 "2023-09-20T16:33:20Z")

</div>

> [@nmcgovern](#):
>
> 对于那些感兴趣的人来说，第二个错误也发生在 meta 上——例如，请访问 [Posts with embedded polls fail to load](https://meta.discourse.org//t/posts-with-embedded-polls-fail-to-load/135549)

由于该主题今天被自动顶起，我想我会试试这个。在 Ubuntu 上使用最新的 Chrome 浏览器测试此 URL：  
`https://meta.discourse.org//t/posts-with-embedded-polls-fail-to-load/135549/9`

该 URL 现在被重写以修复双斜杠 `//`，并且对我来说可以正常加载：[https://meta.discourse.org//t/posts-with-embedded-polls-fail-to-load/135549/9](https://meta.discourse.org//t/posts-with-embedded-polls-fail-to-load/135549/9)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2023年十月20日 16:34 UTC](https://meta.discourse.org/t/posts-with-embedded-polls-fail-to-load/135549/12 "2023-10-20T16:34:20Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
