Bug with includes files and hledger-web #234

Closed
julpec opened this Issue Feb 9, 2015 · 4 comments

Projects

None yet

2 participants

@julpec
julpec commented Feb 9, 2015

I didn't have this problem with hledger-web 0.23.3 but with 0.24.1 it's not possible to add a transaction with multiple files.

I have this error message on my browser :

Handler/Post.hs:49:7-68: Irrefutable pattern failed for pattern (errs1, [date, desc, journalpath])

This is when I start hledger-web with a multiple file journal like this

;;
!include plan.journal

!include 2013/ecritures-2013.journal
!include 2014/ecritures-2014.journal

I can not write on this file or the include's one.

I made a test with a "normal" journal file (i.e. without includes) and it's working.

@simonmichael
Owner

Thanks for the report. Submitting an empty add form also triggers this, even without an include.

curl -i http://localhost:5000/journal -d 'action=add'
@simonmichael
Owner

Ignore those false starts, it's not fixed yet (ie currently you can't use hledger-web to add entries to a journal file which uses the include directive).

@simonmichael simonmichael added a commit that referenced this issue Feb 23, 2015
@simonmichael web: improve add form validation (#223, #234)
The add form is now partly using yesod-form.
d3453c6
@simonmichael
Owner

This is fixed in master; close when released. As a consequence, when there are includes the add form now reveals the full path of the journal files.

@simonmichael
Owner

Fixed in 0.25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment