0 Merge Templates Not Working 1 Brandon Gamache posted 8 Years Ago I'm having trouble getting Merge Templates to work. When I try to run one on a group I get a Page Not Found error. The URL is pointing to the file but it isn't able to download. (/App_Data/Files/Files/27554504-6e5a-43ab-b578-6889aecee83e_MergeTemplateOutput.docx?attachment=True). This was using the sample name tags template. I also tried to create my own template based off of this and got a "FileMode or FileAccess value is not valid for the stream" I did change the file storage location of Merge Templates from the database to the File System, thinking this was the issue I changed it back to the DB and still got the same page error with the sample name tags. The demo site works so it isn't necessarily a Rock bug but an issue in my Rock. Any ideas what I may have done wrong? Or any ideas how I can go about fixing it?Thanks
Brandon Gamache 8 years ago Thanks Nick. I would like to use the FileSystem instead of the database if possible. I will change it back to database and restart Rock to see if that will make the samples work again (I'll have to test this at the end of the day).The stream issue I got was when I was adding a personal Merge Template but noticed I get the same issue when adding it as a Global Merge Template. To test the stream issue I downloaded one of the sample templates and I get the same issue when I add a new global template with the sample template as the file. To test it further, to make sure it wasn't a download issue from Rock since I switched the storage to file system, I downloaded one of the sample files from the demo server and uploaded it to a global merge template and got the stream issue.Requires View Security is on.Security settings are the default: All Users for View, Admins, Staff Workers, Staff like workers all have Edit access, and Administrate is Admins.The Template type is Word .docxThe Internal Application Root is correctly set.
Brandon Gamache 8 years ago Found the main issue why it wasn't downloading a file when I switched it back to Database. I had Default file types set to File System and pointing to a Files folder. When I switched this back to Database it worked--as long as Merge Template File Types is set to database. Still uncertain why it wouldn't work when I had Merge Template File Type set to File System and Default File Type set to database. I'll try and look into this a little later.
Nick Airdo 8 years ago In its current form, the merge template system was not really designed to swap between different merge template file types without writing custom code. At a minimum, you'd have to create a new merge template (filesystem) File Type, then create a custom MergeTemplateDetail block that used your new custom Merge Template file type (instead of the core template Rock.SystemGuid.BinaryFiletype.MERGE_TEMPLATE).