d-cent / democracyos

Soft fork of democracyos with customization for D-CENT
MIT License
8 stars 6 forks source link

can't create a new document from the admin panel #58

Open joonasp opened 9 years ago

joonasp commented 9 years ago

Creating a new document at http://finnish-democracyos.herokuapp.com/admin/laws/create does not work. It says "Laki luotu" (law created), but there the new document does not appear on the list (http://finnish-democracyos.herokuapp.com/admin/laws).

jaakkokorhonen commented 9 years ago

I could not create a new document either. @gvilarino we have a dress rehearsal of the pilot TODAY. If the rehearsal fails, the pilot will be on very thin ice. Please supply instructions, a workaround, or a solution IMMEDIATELY.

gvilarino commented 9 years ago

@jaakkokorhonen , @joonasp did you publish the laws you created? I'm not seeing them in the admin list at all.

This is working for me; I just created a new law, published it and it was showing on the list, as can be seen here:

screen shot 2014-12-01 at 1 19 30 pm

(it's no longer there; I deleted it since it was just a test)

jaakkokorhonen commented 9 years ago

I have buttons for "add condition"-lisää tila, "add link"-lisää linkki and "save"-tallenna.

jaakkokorhonen commented 9 years ago

After i save, it says "laki tallennettu"-law saved, but the created article is not to be seen.

gvilarino commented 9 years ago

@jaakkokorhonen yes, after that you gotta publish the law. The publish option is on the page top, you gotta scroll all the way up (yea, UX for the admin isn't the greatest, sorry)

You should see something like this:

screen shot 2014-12-01 at 3 12 44 pm

Once you click there, you should see this:

screen shot 2014-12-01 at 3 12 52 pm

If, for some reason, this option doesn't show just go back to the law list and re-enter the newly created law; you should see it there now.

gvilarino commented 9 years ago

@jaakkokorhonen @joonasp I'm leaving that Test law created and unpublished so you guys can use for the pilot and publish it without further issues.

jaakkokorhonen commented 9 years ago

I cannot see my saved law in the list.

gvilarino commented 9 years ago

@jaakkokorhonen did you get a confirmation message of the law being saved properly (on the top of the form)?

jaakkokorhonen commented 9 years ago

Yes. Same as @joonasp.

gvilarino commented 9 years ago

That's very weird. I'm doing that same thing and it works.

I just found something that may be a possible cause: if you're trying to create with the same Official ID (first field on the form) that was used on a now deleted law, the creation fails silently. Just try something else there.

jaakkokorhonen commented 9 years ago

I added nonsense to the "Virallinen ID" and the article appeared in the list.

jaakkokorhonen commented 9 years ago

Please document or fix this.

gvilarino commented 9 years ago

Ok, documented and bug reported; for the pilot's sake I'd say move forward keeping in mind not to re-use official IDs.

joonasp commented 9 years ago

I did not know that the "official document id" was a required field. Now that I added some nonsense in the field it works. For the pilot (that has nothing to do with official documents or their id's) we will just insert a date or something as an id as a work around. j

On 1 December 2014 at 21:44, Guido Vilariño notifications@github.com wrote:

Ok, documented https://github.com/DemocracyOS/app/wiki/Admin-module#known-issues and bug reported https://github.com/DemocracyOS/app/issues/472; for the pilot's sake I'd say move forward keeping in mind not to re-use official IDs.

— Reply to this email directly or view it on GitHub https://github.com/d-cent/democracyos/issues/58#issuecomment-65122635.


My PGP public key for secure email: http://pgp.mit.edu/pks/lookup?op=get&search=0xE269A5FFE9EDE926

jaakkokorhonen commented 9 years ago

Might not hurt to handle it as a mandatory field if it is.

gvilarino commented 9 years ago

True that.

Can we close this since a workaround has been found?

jaakkokorhonen commented 9 years ago

Well maybe change it to be a mandatory field until a final fix?

gvilarino commented 9 years ago

I'm afraid that won't fix the silent failing: it needs to be a value different from any previously entered value, because of how mongoose handles DB indexing.

Actually, an empty value does work, but only once

jayapapaya commented 9 years ago

@gvilarino I am having the same problem here http://democracyos-dcent.herokuapp.com/ - can't see the law. It turns up in the admin list, but not on the actual page/ sidebar.

I have been assigning unique numbers for each, but they are still not turning up.

gvilarino commented 9 years ago

@jayapapaya have you published the law? Go again into it and click the publish button on top.

jayapapaya commented 9 years ago

Ok, seems to be working now

jayapapaya commented 9 years ago

@gvilarino now all of the laws seem to have disappeared again

gvilarino commented 9 years ago

@jaakkokorhonen what about your filter settings?

jayapapaya commented 9 years ago

@gvilarino tried changing them several times, doesn't seem to make a difference. (Tried changing both the tags and the activities stream filters )

jayapapaya commented 9 years ago

@gvilarino now some of them appear when I refresh the page, but it doesn't seem to make sense (for example, when I put newest first, they all disappear)

jayapapaya commented 9 years ago

@gvilarino how are we solving this? filters don't seem to be working properly and the laws keep disappearing: http://democracyos-dcent.herokuapp.com/