This site uses cookies. By continuing to browse the site, you agree to our use of cookies. Find out more about cookies.
Skip to main content
Metadecidim's official logo
  • English Triar la llengua Elegir el idioma Choose language
    • Català
    • Castellano
Sign Up Sign In
  • Home
  • Processes
  • Assemblies
  • Initiatives
  • Consultations
  • Conferences
  • Help

Support Forum

#supportforum Any doubts or questions on how to use Decidim? Check them with the Community!

  • The process
  • I have a question
  • Community Tutorials
chevron-left Back to list

Error 500 en CensusAuthorizationHandler

Avatar: Ivana Seimandi Ivana Seimandi
23/02/2021 17:27  

Hi, has someone had the following error -> 500 error while adding auctions. The steps performed are:

I add in the file -> config / initializers / decidim.rb

   Decidim :: Verifications.register_workflow (: census_authorization_handler) do | ath | auth.form = "CensusAuthorizationHandler"   end

Thus I obtain the authorization of the authorization from the Administration.

Then I add the form in app / views / census_authorization / _form.html.erb

And finally -> app / services / census_authorization_handler.rb

The error I get when doing Submit on the form -> is error 500, the error log does not give any clue of the reason for the error.

Regardless of what I write to the census_authorization_handler.rb file, I always get the same error.

Decidim Version: 0.22

If you can help me with any ideas of what the problem might be, I will greatly appreciate it .

  • Filter results for category: User verification User verification

List of Endorsements

Avatar: Martin Avila Martin Avila
Endorsements count1
Error 500 en CensusAuthorizationHandler Comments 6

Reference: MDC-PROP-2021-02-16246
Version number 1 (of 1) see other versions
Check fingerprint

Fingerprint

The piece of text below is a shortened, hashed representation of this content. It's useful to ensure the content hasn't been tampered with, as a single modification would result in a totally different value.

Value: 07d205b751baee34ca147ec7d397a16835b38f7569b1798bbee0ed2c26a134ad

Source: {"body":{"es":"<p>Hi, has someone had the following error -&gt; 500 error while adding auctions. The steps performed are:</p><p>I add in the file -&gt; config / initializers / decidim.rb</p><p>&nbsp;&nbsp;&nbsp;Decidim :: Verifications.register_workflow (: census_authorization_handler) do | ath |&nbsp;auth.form = \"CensusAuthorizationHandler\" &nbsp;&nbsp;end</p><p>Thus I obtain the authorization of the authorization from the Administration.</p><p>Then I add the form in app / views / census_authorization / _form.html.erb</p><p>And finally -&gt; app / services / census_authorization_handler.rb</p><p>The error I get when doing Submit on the form -&gt; is error 500, the error log does not give any clue of the reason for the error.</p><p>Regardless of what I write to the census_authorization_handler.rb file, I always get the same error.</p><p>Decidim Version: 0.22</p><p>If you can help me with any ideas of what the problem might be, I will greatly appreciate it .</p>"},"title":{"es":"Error 500 en CensusAuthorizationHandler"}}

This fingerprint is calculated using a SHA256 hashing algorithm. In order to replicate it yourself, you can use an MD5 calculator online and copy-paste the source data.

Share:

link-intact Share link

Share link:

Please paste this code in your page:

<script src="https://meta.decidim.org/processes/supportforum/f/705/proposals/16246/embed.js"></script>
<noscript><iframe src="https://meta.decidim.org/processes/supportforum/f/705/proposals/16246/embed.html" frameborder="0" scrolling="vertical"></iframe></noscript>

Report inappropriate content

Is this content inappropriate?

Reason

6 comments

Order by:
  • Older
    • Best rated
    • Recent
    • Older
    • Most discussed
Avatar: Ali González Ali González
23/02/2021 19:07
  • Get link Get link

Hello Ivanna, can you past a gist with the traceback log?

Conversation with Ivana Seimandi
Avatar: Ivana Seimandi Ivana Seimandi
25/02/2021 20:02
  • Get link Get link

Hello!! I managed to remove the 500 error, now the authorization works for me. What happens to me now is that it authorizes me to "All" the number of documents that I enter.
Help me by describing the following code? I can't understand what

def response
return nil if documentnumber.blank?
return @response if defined?(@response)
response ||= Faraday.post Rails.application.secrets.censusurl do |request|
request.headers["Content-Type"] = "text/xml"
request.body = requestbody
@response ||= Nokogiri::XML(response.bod end
@response ||= Nokogiri::XML(response.body).removenamespaces!
end
I check if the entered document number exists in the DB through WS Rest, my ws always responds 200, I must analyze the content and if idpersona = 0 it means that it does not exist in the database so I must not authorize it. I do not know how to take that value and how to respond so that the authorization does not take place.
Any clue you can give me will do!
Thanks!

Avatar: Martin Avila Martin Avila
26/02/2021 12:37
  • Get link Get link

Hola Ivana, como hiciste para resolver el error 500?

Estoy con el mismo problema y no le hallo solución. Con respecto al código, no tengo conocimientos en el lenguaje, pero deberías verificar en todo caso como funciona la primera condición. Por lo que deduzco, verifica si el documento está en blanco?

Saludos.

Avatar: Ivana Seimandi Ivana Seimandi
26/02/2021 12:53
  • Get link Get link

Hola! hice varias cosas, pero comenzó a funcionar luego de comentar en Gemfile la gema decidim-verifications e instalar "Yarn". Saludos.

Avatar: Martin Avila Martin Avila
26/02/2021 13:21
  • Get link Get link

Muchas gracias Ivana.

Sabes que no hice ninguna modificación aún porque encontré la opción para subir el censo en la barra lateral izquierda como "Subir Censo", de la página de administración del sitio. Realicé algunas pruebas y por el momento funciona bien y verifica bien los documentos. El error 500 me aparece únicamente si intento acceder a través de la opción Participantes>Verificaciones.

Saludos.

Avatar: Ivana Seimandi Ivana Seimandi
26/02/2021 12:52
  • Get link Get link

Hola! para solucionar el error 500 que tenía probé varias cosas, pero comenzó a funcionar cuando en gemfile comentamos la gema decidim-verifications e instalamos "Yarn".

Comment moderated on 14/03/2022 16:52

Add your comment

Sign in with your account or sign up to add your comment.

Loading comments ...

  • Terms and conditions of use
  • About the community
  • Download Open Data files
  • Metadecidim at Twitter Twitter
  • Metadecidim at Instagram Instagram
  • Metadecidim at YouTube YouTube
  • Metadecidim at GitHub GitHub
Creative Commons License Website made with free software.
Decidim Logo

Confirm

OK Cancel

Please sign in

decidim Sign in with Decidim
Or

Sign up

Forgot your password?