7 Replies Latest reply on May 9, 2017 7:22 AM by TSGal

    FileMaker PHP API -

    databuzz

      Product and version - FileMaker Server 14.0.4.413

       

      OS and version - Mac OS X 10.10.5

       

      Description

      Attempting a find command via the PHP API referencing a layout named 'WebSites' will fail with a 401 error.

       

      How to replicate

       

      Create a PHP page that performs a find command referencing a layout named 'WebSites'. For example:

       

      $request = $fm->newFindCommand('WebSites');

       

      When the find command is performed the result will be a 401 error.

       

      Workaround (if any)

       

      Rename the layout to anything other than 'WebSites' appears to fix the issue.

       

      $siteRequest = $fm->newFindCommand('WebPHPSites');

        • 1. Re: FileMaker PHP API -
          TSGal

          databuzz:

           

          Thank you for your post.

           

          I have sent all information to our Development and Testing teams for review.  When I receive any feedback, I will let you know.

           

          TSGal

          FileMaker, Inc.

          • 2. Re: FileMaker PHP API -
            TSGal

            databuzz:

             

            Testing has been unable to replicate the issue.

             

            Are there any other settings on the server turned on or off?

             

            For the hosted database file, is PHP access/privilege granted to the layout and/or table?

             

            What is the exact error returned in the browser?  What browser and browser version is being used?

             

            Testing would like to get a sample database file and sample PHP script that displays the error.  I have sent you a private message related to another issue your reported.  Please include this information with that request.

             

            TSGal

            FileMaker, Inc.

            • 3. Re: FileMaker PHP API -
              TSGal

              databuzz:

               

              I have received your files and screen shot.  Thank you.

               

              All information has been sent to Development and Testing for additional review.  I will keep you posted.

               

              TSGal

              FileMaker, Inc.

              • 4. Re: FileMaker PHP API -
                TSGal

                databuzz:

                 

                The tester noticed that you have a folder named "Websites" and a layout named "WebSites".  Custom Web Publishing is not case sensitive.  Therefore, when you request a layout with "WebSites", it is seeing the layout named "Websites" and returns an error for the field because it can't find any fields on this "layout".

                 

                TSGal

                FileMaker, Inc.

                • 5. Re: FileMaker PHP API -
                  databuzz

                  Thanks TSGal,

                   

                  So just confirming it's using the layout folder with the same name instead of the actual layout, presumably because the folder appears higher in the list of layouts, even though it's a folder and not a layout?

                  • 6. Re: FileMaker PHP API -
                    Malcolm

                    Object name conflicts create all sorts of bugs don't they?

                     

                    And in this case, we could be forgiven for thinking that a folder is not a layout. Yet, underneath the hood, it seems as though it is the same. What a shame that the same sort of logic that has gone into displaying a little folder icon beside the layout name to trick us into thinking that these layouts are folders could not also be used internally to tell the Web Publishing Engine that there are some layouts which are pretending to be folders in the hope that it would ignore them. Perhaps the UI team needs to teach the WPE team a few new licks

                    • 7. Re: FileMaker PHP API -
                      TSGal

                      databuzz:

                       

                      With the release of FileMaker 16, the Custom Web Publishing Guide has been updated.

                       

                      https://fmhelp.filemaker.com/docs/16/en/fms16_cwp_guide.pdf

                       

                      Specifically, there was a Note section added to the end of page 82 that says:

                       

                      "Make sure the layout name is unique. If your database has two layouts with the same name, the FileMaker API for PHP cannot distinguish between them. In addition, the API is not case sensitive. For example, if your database has one layout named Websites and another layout named WebSites, the API cannot distinguish between them."

                       

                      TSGal

                      FileMaker, Inc.

                      1 of 1 people found this helpful