# Converting a topic to a wiki returns a 500 error

**URL:** https://meta.discourse.org/t/converting-a-topic-to-a-wiki-returns-a-500-error/70660
**Category:** Bug
**Created:** [2017年九月24日 05:19 UTC](https://meta.discourse.org/t/converting-a-topic-to-a-wiki-returns-a-500-error/70660 "2017-09-24T05:19:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![southpaw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/southpaw/32/79352_2.png) [@southpaw](https://meta.discourse.org/u/southpaw)
#### Post date: [2017年九月24日 05:19 UTC](https://meta.discourse.org/t/converting-a-topic-to-a-wiki-returns-a-500-error/70660/1 "2017-09-24T05:19:07Z")

</div>

Discourse 1.9.0.beta8

Steps to reproduce:  
Create a topic  
Covert the topic to a Wiki with the “Make Wiki” option.  
If it does load after converting to Wiki, refresh the page.

Result:

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/e/8e9f049d2abd5f485b626ea5a1701beb6292f16f.png)

The topic appears in activity feeds:

![image](https://global.discourse-cdn.com/meta/original/3X/1/5/159da7f37ed7a54e1aa49a258799635c59eec112.png)

Clicking it in the activity feed results in:

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/3/636882eed5e688d47ee5e440647cf5cd276847b2.png)

Error logs:

2   
OpenSSL::PKey::RSAError (Neither PUB key nor PRIV key: nested asn1 error) /var/www/discourse/app/controllers/user\_api\_keys\_controller.rb:138:in `initialize’  
12:08 am

5   
NoMethodError (undefined method `updated_at' for nil:NilClass) /var/www/discourse/app/serializers/post_serializer.rb:358:in `last\_wiki\_edit’  
12:59 am

10   
NoMethodError (undefined method `updated_at' for nil:NilClass) /var/www/discourse/app/serializers/post_serializer.rb:358:in `last\_wiki\_edit’  
1:02 am

38   
NoMethodError (undefined method `updated_at' for nil:NilClass) /var/www/discourse/app/serializers/post_serializer.rb:358:in `last\_wiki\_edit’

(Please let me know if you need the specifics from any of those errors. I had included them, but exceeded a character limit for the post.)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年九月26日 02:46 UTC](https://meta.discourse.org/t/converting-a-topic-to-a-wiki-returns-a-500-error/70660/5 "2017-09-26T02:46:46Z")

</div>

So far we cannot reproduce this?

---

<div class="post-metadata">

### Author: ![southpaw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/southpaw/32/79352_2.png) [@southpaw](https://meta.discourse.org/u/southpaw)
#### Post date: [2017年九月26日 03:17 UTC](https://meta.discourse.org/t/converting-a-topic-to-a-wiki-returns-a-500-error/70660/6 "2017-09-26T03:17:15Z")

</div>

Thank you for trying.

Is there a bug log that would help at all?

Perhaps one of the Discourse team members who has access to our site could try reproducing it in our [Staff category](https://forums.republicwireless.com/c/insiders/staff)?

I was able to reproduce it in that category both times that I tried. Those two inaccessible Wikis are:  
[https://forums.republicwireless.com/t/testing-a-wiki-for-500-error/12875/1](https://forums.republicwireless.com/t/testing-a-wiki-for-500-error/12875/1)  
and  
[https://forums.republicwireless.com/t/repeating-the-wiki-500-test-filing-bug-report-w-discourse/12879/1](https://forums.republicwireless.com/t/repeating-the-wiki-500-test-filing-bug-report-w-discourse/12879/1)

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [2017年九月26日 04:10 UTC](https://meta.discourse.org/t/converting-a-topic-to-a-wiki-returns-a-500-error/70660/9 "2017-09-26T04:10:17Z")

</div>

Hi @southpaw,

I think I may be able to repro and fix this issue. Added on my list to look into.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [2017年九月26日 15:47 UTC](https://meta.discourse.org/t/converting-a-topic-to-a-wiki-returns-a-500-error/70660/10 "2017-09-26T15:47:39Z")

</div>

@zogstrip already fixed this issue 13 days ago via:

[https://github.com/discourse/discourse/commit/a6fc42753cd4505aae771416373da0f61ac72487](https://github.com/discourse/discourse/commit/a6fc42753cd4505aae771416373da0f61ac72487)

@southpaw I deployed the above fix on your site and both the topics are loading fine now.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [2017年九月26日 16:18 UTC](https://meta.discourse.org/t/converting-a-topic-to-a-wiki-returns-a-500-error/70660/12 "2017-09-26T16:18:05Z")

</div>


