19th May 2015 at 10:15 am #4412
Not used reports for ages but just now tried them with 3.0.0 and get errors:
ERROR 2: sprintf(): Too few arguments
followed by various lines of details depending on which report selected
19th May 2015 at 10:47 pm #4416
It should be noted that the problem appears to be for the PDF report versions. The HTML output works; at least on the ones that I have tried.
Apache 2.4.27 PHP 7.19 MariaDB 10.2.8
20th May 2015 at 1:58 am #4417
The problem is still there.
It only appears for reports: Ancestors, births, cemeteries, deaths, missing data, occupations, related indis, sources, and vital records. And it appears immediately, ie. before selecting whether PDF or HTML
Ancestors and sources produce mostt errors
20th May 2015 at 6:22 pm #4419
OK. Thanks for the feedback. The ‘fix’ I provided was a start, but it missed the real issue, and also introduced a new one, so please delete that and revert to the original file (I can supply a copy of that if you need it).
The ‘real’ issue was surprisingly in the en_GB.mo translation file.
Please try the attached version.
Remember to go to Admin > Site Administration > Clean up data folder and delete the “cache’ folder completely. Then return to and refresh the Reports pages. I’ve tested most of them and they are working OK for me, but it is still possible I missed one.
21st May 2015 at 10:44 am #4422
What a strange dependency!
Actually not so strange once I thought it through carefully.
In our translations we often embed variables for things like number counts. For example, there is a phrase “Total individuals: xxx” where xxx is a number. The translatable text is therefore WT_I18N::translate(‘Total individuals: %s’, $count_indis) . Here the result of the calculated variable $count_indis is inserted in the text at the position of ‘%s’. Doing it like this ensures any language can work with the same variable even if its position in the sentence needs to change. But it is essential that ALL languages include the ‘%s” variable. In the en_GB file the ‘%s’ variable had been accidentally missed from the translation. Hence the error message “Too few arguments”. It was looking for the variable in the translation and it wan’t there.
- The topic ‘Reports’ is closed to new replies.