Using FileMaker Plug-ins with Instant Web Publishing
I normally don’t work with FileMaker’s Instant Web Publishing (IWP), preferring to work with Custom Web Publishing and the PHP API which gives me more flexibility without the limitations of IWP. I was recently working with a client that had deployed an IWP solution hosted by FileMaker Pro (not FileMaker Server Advanced) and wanted to integrate our fmSMS solution, which allows you to send/receive SMS/txt messages in FileMaker. I quickly found a problem though – the plug-in that we use to send the SMS messages was not being recognised by the IWP clients/browsers, despite it working fine in the FileMaker Pro client. The problem took a while to locate but the solution was simple and was not something I could find documented anywhere else so I thought I would write it up here in case this helps someone else out there having the same problem.
As I started to test whether we could deploy our SMS solution via IWP I wasn’t too confident to start with as I wasn’t sure whether plug-ins were supported under IWP in the first place, and had already worked out a backup plan if that was the case. I first checked the FileMaker 11 Instant Web Publishing Guide to see if it mentioned the compatability of plug-ins with IWP, and was encouraged to see the following: “Typically, third party plug-ins can be used for web published databases if they do not attempt to display information to an end-user’s screen, if they do not require direct end-user interaction, if they do not interact with the FileMaker Pro user interface, or otherwise require interaction from end users”. I was bolstered by this as our plug-in doesn’t involve any user interface interaction – it simply communicates with an online SMS Gateway and returns the result into a field via the Set Field script step. As fmSMS is a multi-file solution that was never designed with IWP in mind I decided to create a quick test file with only the basic tables, fields, layouts and scripts necessary to test it under the IWP environment. I made sure all the scripts were IWP compatible, tested it in FileMaker Pro Advanced as the host successfully then was ready to test in IWP.
My first test in IWP returned a “?”, which I know usually means the plug-in was not installed or enabled. However I could see the plug-in listed under the FileMaker preferences and knew it was loaded as FileMaker Pro Advanced was able to run my scripts successfully and return the correct result. I wasn’t getting puzzled at this point and spent a few more hours modifying scripts, creating new plug-in tests to ensure it was loaded but I always ended up with a “?” everytime I called a plug-in function. I gave up for the night and decided to sleep on it.
The next day I started again and continued to get the “?” result no matter what I tried. I was almost ready to give up and pronounce that this plug-in was not compatible with IWP but decided to try one last test. By default I always install (or FileMaker Server installs for me via it’s Auto Update feature) all my plug-ins in the user’s Application Data folder, which is located at the following for each of the supported platforms:
- Windows XP: C:\Document Settings\User Name\Local Settings\ApplicationData\FileMaker\Extensions
- Windows Vista/Windows 7: C:\Users\User Name\AppData\Local\FileMaker\Extensions
- Mac OS X: Macintosh HD/Users/User Name/Library/Application Support
I moved the plug-in from here to the traditional location inside the FileMaker Application folder, which is usually one of these for each platform:
- C:\Program Files\FileMaker\FileMaker Pro 11 Advanced\Extensions
- Macintosh HD/Applications/FileMaker Pro 11 Advanced/Extensions
After relaunching FileMaker Pro Advanced and quickly tested everything worked fine I started what was going to be my last test via IWP and it worked! I’m not 100% sure why this is the case as I can’t find any documentation from FileMaker Inc about this but I suspect it relates to the FM Web Publishing application. The FM Web Publishing app is located at either:
- C:\Program Files\FileMaker\FileMaker Pro 11 Advanced\ExtensionsWeb Support\FM Web Publishing.exe
- Macintosh HD/Applications/FileMaker Pro 11 Advanced/Extensions/Web Support/FM Web Publishing.app
and it appears that the FM Web Publishing app can only see plug-ins that are also in the FileMaker Pro Application Extensions folder – at least in the case of the plug-in I’m working with, I haven’t tested this with other plug-ins under IWP. If you’re hosting your IWP solution under FileMaker Server Advanced you won’t encounter this as it only applies to hosting IWP solutions with FileMaker Pro/Pro Advanced – you install plug-ins in different locations for FileMaker Server Advanced hosting.
So in summary if you’re working with plug-ins for solutions hosted by FileMaker Pro/Pro Advanced and deployed via IWP and can’t get the plug-in functions to work correctly, make sure you have installed the plug-in in the FileMaker Pro/Pro Advanced Application Extensions folder not in the user’s Application Data folder. Note that if you have the same plug-in installed in both locations the user’s Application Data folder will take preference over the Application Extensions folder so make sure to remove it from the user’s Application Data folder.
Trackbacks & Pingbacks
[…] This post was mentioned on Twitter by Andrew Duncan, Agnes Riley. Agnes Riley said: RT @databuzz: New Blog Post: Using FileMaker Plug-ins with Instant Web Publishing http://www.databuzz.com.au/blog/?p=128 […]
Comments are closed.