# Erreur 500 lors de l'installation de Avatar Size and Shape

**URL:** <https://meta.discourse.org/t/error-500-when-installing-avatar-size-and-shape/296866>\
**Category:** Bug\
**Tags:** avatar-size-shape\
**Created:** [Février 22, 2024, 5:35 UTC](https://meta.discourse.org/t/error-500-when-installing-avatar-size-and-shape/296866 "2024-02-22T17:35:30Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [Février 22, 2024, 9:43 UTC](https://meta.discourse.org/t/error-500-when-installing-avatar-size-and-shape/296866/7 "2024-02-22T21:43:21Z")

</div>

Ceci est probablement un effet secondaire de ce changement&nbsp;:

> <https://github.com/discourse/discourse/pull/25764>
>
> \### Why this change?
> 
> The logic for validating a theme setting's value and def…ault value was
> not consistent as each part of the code would implement its own logic.
> This is not ideal as the default value may be validated differently than
> when we are setting a new value. Therefore, this commit seeks to
> refactor all the validation logic for a theme setting's value into a
> single service class.
> 
> \### What does this change do?
> 
> Introduce the \`ThemeSettingsValidator\` service class which holds all the
> necessary helper methods required to validate a theme setting's value

La valeur par défaut de ce paramètre de composant doit être une chaîne de caractères (par exemple, `« 0 »`, ou le type doit être `integer`).

> <https://github.com/discourse/discourse-avatar-component/blob/main/settings.yml#L52>

Cependant, c’est probablement involontaire étant donné qu’il renvoie une erreur 500. Auparavant, il semble que la valeur était convertie en chaîne de caractères [DEV: Centralise logic for validating a theme setting value by tgxworld · Pull Request #25764 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/25764/files#diff-332e654200eeaae8377858ca236e51fb62a51146f043b6efa01027900c7dade3)

---

_[View the full topic](https://meta.discourse.org/t/error-500-when-installing-avatar-size-and-shape/296866)._
