Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Docs mistakenly refer to nonexistant custom_template_directory config option? #10688

Closed
callahad opened this issue Aug 24, 2021 · 2 comments
Closed
Assignees
Labels
X-Release-Blocker Must be resolved before making a release

Comments

@callahad
Copy link
Contributor

From a cursory glance, it appears that:

  1. Centralise the custom template directory #10596 added the custom_template_directory config option + docs
  2. Allow using several custom template directories #10587 renamed it to custom_template_directories but did not update the docs.

Thus, https://matrix-org.github.io/synapse/v1.41/templates.html still refers to setting it as:

templates:
  custom_templates_directory: /path/to/custom/templates/

instead of what I would expect:

templates:
  custom_templates_directories:
    - /path/to/custom/templates/

The sample_config.yaml does the same thing, and grepping turns up a few other reference to custom_template_directory which I've not investigated.

Assigning to @babolivier to tell me if I'm a crank or not.

If I'm not a crank, I'd like this to be fixed in the 1.41 release branch then merged down to develop since we're planning on a point release anyways...

@callahad callahad added the X-Release-Blocker Must be resolved before making a release label Aug 24, 2021
@callahad
Copy link
Contributor Author

I'm very likely a crank; it's late.

@callahad callahad changed the title Docs mistakenly refer to nonexistant custom_template_directory config option Docs mistakenly refer to nonexistant custom_template_directory config option? Aug 24, 2021
@callahad
Copy link
Contributor Author

Pretty sure I'm a crank. See lines 717-719 from /synapse/config/server.py in 1.41.0:

templates_config = config.get("templates") or {}
if not isinstance(templates_config, dict):
raise ConfigError("The 'templates' section must be a dictionary")
self.custom_template_directory = templates_config.get(
"custom_template_directory"
)
if self.custom_template_directory is not None and not isinstance(
self.custom_template_directory, str
):
raise ConfigError("'custom_template_directory' must be a string")

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
X-Release-Blocker Must be resolved before making a release
Projects
None yet
Development

No branches or pull requests

2 participants