1 2 Previous Next 25 Replies Latest reply on Jul 25, 2017 8:35 PM by LisaRose

    FMS 16 breaks CWP

    DavidJondreau

      There's been a few major and poorly documented changes in functions and script step for Custom Web Publishing (CWP) in FileMaker Server 16.

       

      CWP no longer has access to Get ( TemporaryPath ) and Get ( DocumentsPath ) and CWP is is no longer able to use Send Mail[] to send attachments.

       

      These changes were not in release notes and only discovered in a testing environment and following up with the FM 16 help file.

       

      I suspect there may be other changes, but I'm not prepared to read through every function and script step to compare 15 and 16.

       

       

      Vote here to lobby FMI to fix this: Bring back CWP functionality

        • 1. Re: FMS 16 breaks CWP
          databuzz

          Wow a client of mine has just upgraded to FMS v16 and the CWP scripts have stopped working as they use the Get ( TemporaryPath ) function. I missed this completely as it wasn't mentioned in all the release notes etc that I consumed after the launch or certainly wasn't brought to the attention of the community that this is something you should be aware of before upgrading.

           

          Currently testing some workarounds - have you come up with a reliable workaround so far?

           

          cheers,

          Andrew

          • 2. Re: FMS 16 breaks CWP
            JoelShapiro

            Hey Andrew

             

            If PSOS won't work, could you upload the files to a 'temp' folder on the web server (via PHP) and then point the FM script to the file there?  (I do something similar in one of my projects, but I don't know the source of your files.)

             

            Cheers,

            -Joel

            • 3. Re: FMS 16 breaks CWP
              databuzz

              Hi Joel,

               

              In this case we're downloading images from an external 3rd party. The URL for each image gets redirected at least once so we first need to follow the redirects then download the image to a local path that is supported by FileMaker Server - previously this was always the Get ( TemporaryPath ) folder which is now no longer available sadly.

               

              cheers,

              Andrew

              1 of 1 people found this helpful
              • 4. Re: FMS 16 breaks CWP
                DanielKaan

                Hi Andrew

                 

                I know it is less than ideal, but could you have CWP call an FM server side script to do the file handling to the temporary directory on the server and doing the Send Mail?  Would that do for a work-around?

                 

                Daniel.

                • 5. Re: FMS 16 breaks CWP
                  databuzz

                  Hi Daniel,

                   

                  I ended up doing something very similar using PSOS to do the image downloading (I'm not sending emails) - working well so far.

                   

                  regards,

                  Andrew

                  • 6. Re: FMS 16 breaks CWP
                    jfletch

                    Is this the latest info on this? Has FMI acknowledged anything yet? This just kills 16 server for one of my clients as they have a RESTfm solution that works great in 15. And does not in 16, because of the cutoff of the access to the documents folder.

                    • 7. Re: FMS 16 breaks CWP
                      nickorr

                      David,

                       

                      Have you submitted this via the bug report process?  It's not a feature request, it should be reported as a bug.  FMS doesn't do what the docs say it does.  The docs are quite explicit about how it works on server.

                       

                      Cheers,

                      Nick

                      • 8. Re: FMS 16 breaks CWP
                        nickorr

                        And for all those who are using this functionality : the work around is to hard code the path to the docs folder temporarily.  You still have access to it, you can read and write from it ( I've tested both v1 and v2 ) and it works as it did before.

                         

                        You just can't script getting the location via the get function.

                         

                        The temp folder on the other hand ... no idea how you'd locate that.  So use the docs folder and cleanup after yourself instead of relying on the temp folder to do it for you.

                         

                        Cheers,

                        Nick

                        3 of 3 people found this helpful
                        • 9. Re: FMS 16 breaks CWP
                          jfletch

                          Yay! One vote for Nick Orr for Man of the Year!

                          • 10. Re: FMS 16 breaks CWP
                            jfletch

                            So, David, perhaps this is the solution to the Send Mail issue as well!

                            • 11. Re: FMS 16 breaks CWP
                              JoelShapiro

                              Hey Nick & jfletch (Jonathan?)

                               

                              Are you saying that you had Get ( DocumentsPath ) working with CWP in FM15?  The help docs since FM14 have said that the function was incompatible with CWP: "In FileMaker WebDirect and Custom Web Publishing, this function is not supported and returns an empty string."

                               

                              Get ( TemporaryPath ), however, is only first noted to be incompatible with CWP in the help docs for FM16.  Through FM15 it notes only that it was incompatible with WebDirect "In FileMaker WebDirect, this function is not supported and returns an empty string."

                               

                              -Joel

                              1 of 1 people found this helpful
                              • 12. Re: FMS 16 breaks CWP
                                jfletch

                                Whoa. Interesting. It has been working in 15. I'm checking with Nick and am going to test that a bit more.

                                • 13. Re: FMS 16 breaks CWP
                                  jfletch

                                  Just tested some more and the function does return the path in a script run from a PHP call (RESTfm). Perhaps something that RESTfm does is different from other CWP approaches. (That would be a question for Nick.) Still RESTfm works fine in 15 and this is exactly the location it breaks in 16, so FMI DID do something between 15 and 16 with this. Perhaps they didn't deprecate is as early as they said they did, to keep 

                                   

                                  At any rate, I can't think of anything at the moment that would would not work by hard-coding the path, if you know what server it is being run on (which it seems to me would frequently be the case).

                                   

                                  I would like to think that this would enable attaching a document to an email, as well, IF the issue is the inability to dynamically obtain the folder location.

                                  • 14. Re: FMS 16 breaks CWP
                                    DavidJondreau

                                    I hope for others to test too, but it looks like this does not solve the email attachment issue with CWP.


                                    For example, I have a script that sends an attachment using a hardcoded filepath.

                                     

                                    -When called via PSoS by a local script, FM attaches the file.

                                    -When called as by CWP, no attachment.

                                    -When called as a PSoS subscript from a script called by CWP, FM attaches the file.

                                     

                                    So PSoS is a workaround for sending emailed attachments, but that requires fmapp access, which I consider a security weakness.

                                    1 2 Previous Next