decidim / metadecidim

This is the repository for the code of Metadecidim community, we experiment with the new features, we are an experimental community
https://meta.decidim.org
8 stars 7 forks source link

Crash when attempting to add a Participatory Document #40

Closed mattstone closed 5 years ago

mattstone commented 5 years ago

Hello,

I'm trying add a participatory document to a proposal.

Screen Shot 2019-03-11 at 10 22 32 am

I get crash when attempting to upload the document (I've tried different text and different documents but the same thing keeps happening)

Screen Shot 2019-03-11 at 10 22 45 am

Digging around a bit

My output from echo $LANG is en_US.UTF-8 so my os is thing UTF-8

The encoding of my postgres database is: UTF8, collate: en_US.UTF-8, Ctype: en_US.UTF-8 - so the DB is all good.

I could only think that for some reason that some non UTF-8 characters had been placed into the app by Decidim - most likely during the seeding process (I'm working on a test install and so have used the seed.rb script).

After much googling the problem I think I found the answer.

in config/database.yml the default encoding is set to unicode.

default: &default adapter: postgresql

encoding: unicode

encoding: utf8

I set this to utf8 and created a new Decidim install (without seeding the test data) and all is good.

So my issue is fixed.

I suspect that others may come across it.

Would it be an idea to update the install documentation to say either..

  1. Set your OS and Postgres to use unicode
  2. If you are using UTF-8, then change the setting in config/database.yml
oriolgual commented 5 years ago

@mattstone could you please report this to https://meta.decidim.org/processes/bug-report ? We're trying to dog-food Decidim and use it as our bugtracker.