Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5426 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I've just noticed in my FM Server logs the following Publishing Engine Error:

FM Web Publishing - - wpc1 Web Scripting Error: 4, File: "Contacts", Script: "On Close Script", Script Step: "Adjust Window"

I'm familiar with scripts and which script steps are compatible with Web Publishing. However I'm not clear about when either the OnOpen or OnClose scripts that you can set in FileMaker Pro via the File menu > File Options > Open/Close tab are performed with PHP API clients? It appears that my OnClose script is being performed but I haven't setup any script calls in my PHP pages - I know the "Adjust Window" script step is not web publishing compatible, but I didn't realise this script was being performed by the Web Publishing Engine.

My OnOpen script also uses this same incompatible script step but there are no references to this in the logs. Anyone know when the OnOpen and OnClose script steps are being performed as far as Web Publishing via PHP is concerned?

Thanks,

Steve

  • 1 month later...
Posted

Presumably when the FileMaker object is created and then on close when the php script concludes or immediately after the command is executed.

I would suggest that you simply determine the client accessing the script and exit the script if you don't want them to run:


If[Left(Get(ApplicationVersion);5)="Server" OR Left(Get(ApplicationVersion);3)="Web")]

Exit Script

End If

I forget if CWP counts as a Web client or not but it will be either Server or Web.

This topic is 5426 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.