Impossibile concedere il badge personalizzato per il campo motivo non vuoto

Ciao, ho controllato sia l’ultima versione stabile 1.9.3+2 che test-passed e ho notato che il badge personalizzato non può essere assegnato a un utente se il campo motivo non è vuoto.

Passi per riprodurre il problema:

  1. Crea un nuovo badge semplice utilizzando un’icona font-awesome, senza SQL
  2. Vai su admin/users e individua l’utente desiderato
  3. Clicca su Modifica badge
  4. Seleziona il badge appena creato
  5. Inserisci un motivo (importante!) https://www.cuba-platform.com/discuss/t/redirecting-http-to-https/3977/4
  6. Clicca su Concedi
  7. Riceverai un errore, vedi i dettagli nell’immagine sottostante.

Se il campo motivo è vuoto, non si verifica alcun errore.

Il mio forum si trova in una sottocartella; probabilmente è questa la causa dell’errore:

2 Mi Piace

This looks incredibly likely to be the reason, unable to repro on non-subfolder.

4 Mi Piace

Hi,
I was able to find the issue. I found it out after seeing that we were returning 404 in the first screenshot instead of 400. We were not taking care of relative_root_url while parsing reason of badge.

I have created PR for the same here:

7 Mi Piace

This has been merged. Thank you @saurabhp!

4 Mi Piace

This topic was automatically closed after 3 days. New replies are no longer allowed.