We're expecting the tags parameter to be a string. But the client can send an array or a nested parameter (thanks to the Rack protocol.) We're seeing exceptions in logs where the application is erroring out because of this.
As of this commit we raise a Discourse::InvalidParameters exception if we get a non-stringy tags parameter.
Not all categories are preloaded when lazy_load_categories is enabled.
In this case, the category objects that are loaded through /docs.json
must be complete.
* FEATURE: add a global setting to support custom docs url path
This commit adds a GlobalSetting `docs_path` to support custom docs url
path for sites that do not want docs page to live at `/docs` and have a
customized path.
* Fixed the route declaration
* Test and linting
* Update server.en.yml
* Fixed doc test
* Fixed linting.
* Testing qunit test fix
* Fixed tests
* Prettified tests
* Changed the implementation from SiteSetting to GlobalSetting instead.
* Fixed tests
* Cleanup
* Using Site instead of .js.erb to pass GlobalSetting.docs_url to the front end.
Also fixed front end tests
* Remove references to obsolete site setting
* remove unused fixture file
* Rename `docs_url` to `docs_path` and use camelCase in JavaScript
* Add serializer tests
Co-authored-by: Arpit Jalan <er.ajalan@gmail.com>
When a documentation topic is viewed, corresponding TopicViewItem and TopicUser should be created.
A method from a TopicController is called, however, specs should warn us if ever that core method would change.
After internal discussion, the team decided to rename this plugin to `discourse-docs`. No substantial changes made here aside from a settings migration.