Cannot compose a pre-filled topic via URL when subcategory has topic template


(Joshua Rosenfeld) #1

Continuing the discussion from Compose a new pre-filled topic via URL:

Summary:

I cannot seem to get a new topic composer to appear with the correct category when the category is a subcategory and has a topic template.

Steps to reproduce:

  1. Create a category and subcategory.
  2. Edit the subcategory to have a topic template.
  3. Link to subcategory in the form of {site_url}/new-topic?category={category}/{subcategory}

Expected Results:

Composer opens with subcategory selected and topic template pre-filled.

Actual Results:

Composer opens with no category set, and thus no topic template.

Notes:

Cannot attempt repro at try as there is no subcategory with a topic template…but here is what I found at Stonehearth:

http://discourse.stonehearth.net/new-topic?category=support/performance - Works: No topic template is set for this subcategory, composer is opened with the performance category set.

http://discourse.stonehearth.net/new-topic?category=test - Works: A topic template is set, and a composer is opened with the test category set and topic template as the body. Note, this category is visible to staff only…

http://discourse.stonehearth.net/new-topic?category=support/crash-reports - Fails. A topic template is set, but when the composer opens no category is set, and the topic template does not appear in the body.

Version:

Discourse 1.5.0.beta10 (discourse.stonehearth.net)

System Information:

Windows 10 Pro, Chrome Stable 48


(Arpit Jalan) #2

As per the feature spec, the category parameter should pass category name (instead of category slug), so the correct URL will be:

http://discourse.stonehearth.net/new-topic?category=support/crash%20reports

and it works! :tada:


Creating new topic in subcategory via API
(Arpit Jalan) #3