Issue with sqlFormLetters and PS 10.1

UPDATE - the issue is fixed with PS 10.1.1.0, which was released on 1/13/2017.  If you use sqlFormLetters and are on an earlier version of 10.1, updating to 10.1.1.0 will bring back the normal functionality of sqlFormLetters.


There is an issue with sqlFormLetters 1.0 and PS 10.1 and 10.1.0.1.  This does not affect the free version, sqlFormLetters Lite. 

ISSUE:  Data is not being displayed correctly from the extended table for the footer or the sql query in the Edit area or in letters.  A "Non-select tlist_sql filtered out" error will appear on the letter and a "TLIST_SQL Error:  Unauthorized tlist_sql detected and not executed." error will appear in the server log for each student in the current selection.  Custom letters that have the header, footer, and sql on the custom html letter itself are not affected.

WORKAROUND:  Do not click submit in the Edit area of the report as it'll save blank data to the footer and sql query fields in the extended table used by sqlFormLetters.  Export any reports and keep a copy of the export to have a backup copy of what is in the footer and sql query fields with the report (see below for additonal exporting information).   You will need to create custom letters in sqlFormLetters until a fix is found and place the header, footer, and sql on the custom letter instead.  See the sqlFormLetters Custom Letters User Guide if you're not familiar with creating a custom letter.


When a fix is found, sqlFormLetters 1.1 will be released if it's an issue with sqlFormLetters.  However, since the issue didn't appear until PS 10.1, the issue may be related to PS and how it handles extended tables, given the new features implemented for extended tables in 10.1.   If coding changes to sqlFormLetters doesn't fix things, PS will be contacted to see if there is an issue with extended tables and plugins.

Thanks to Richard T for bringing the issue to my attention!

Matt


UPDATE - I couldn't find any coding issues and contacted a PS person who was able to identify the issue.   The issue deals with 10.1 only recognizing one CLOB extended field on a page.  sqlFormLetters references 3 of them - header, footer, and sql query.  The next PS release should have a fix in place to allow recognizing more than one CLOB again.


The header and footer may not export correctly if there is an html command to start, such as an <.  If you run into that issue, edit the /admin/sqlFormLetters/sqlFormLetter.txt like so:

Find the following:

~[if.~([gen.U_SQLFORMLETTER]LetterHeader)>a]<LetterHeader><textarea name="[gen.U_SQLFORMLETTER]LetterHeader"></textarea></LetterHeader>[else]<LetterHeader></LetterHeader>[/if]
~[if.~([gen.U_SQLFORMLETTER]LetterFooter)>a]<LetterFooter><textarea name="[gen.U_SQLFORMLETTER]LetterFooter"></textarea></LetterFooter>[else]<LetterFooter></LetterFooter>[/if]

And change the coding to this instead:

<LetterHeader><textarea name="[gen.U_SQLFORMLETTER]LetterHeader"></textarea></LetterHeader>
<LetterFooter><textarea name="[gen.U_SQLFORMLETTER]LetterFooter"></textarea></LetterFooter>