Jump to content
Server Maintenance This Week. ×

PHP API Alert: getValueList() can break in FMS10


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

Recommended Posts

Hi all

I just helped someone else with this problem, so I'm posting again here to make it publicly available:

THE PROBLEM:

The PHP API function "getValueList" can break under FMS10 when there's an ampersand (&) in one of the values:

"apples & oranges"

> becomes >

"apples apples &apples & oranges"

The function has officially been "deprecated" in FMS10 -- and replaced with "getValueListTwoFields" -- but the ampersand is a case when the original function in fact _breaks_ when hosted in FMS10. Changing to the new function fixes the problem. (I don't know if any other characters also cause problems.)

WHO THIS AFFECTS:

- Anyone who has used the getValueList function with FMS9 -- whether via the Site Assistant or not -- and upgrades to FMS10

- Anyone who uses the getValueList function under FMS10

- Anyone who has or may someday have ampersands (or possibly other characters?) in any value-list values that are published to the Web via the PHP API under FMS10.

REMEDY:

When upgrading to FMS10:

Replace all instances of "getValueList" with "getValueListTwoFields".

When developing under FMS10:

Always use "getValueListTwoFields".

(While in FMS9, do NOT use "getValueListTwoFields" as the function does not exist.)

I hope someone finds this helpful.

Best,

-Joel

~~~~~~~~~~~~~~~~~~~~~~~

Joel Shapiro

FileMaker Pro

database & web design

http://www.jsfmp.com

415-269-5055

~~~~~~~~~~~~~~~~~~~~~~~

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

Hi there,

it may seem quite odd, but even over 2 years later, someone does find this helpful !

getValueList was still working well for me (I have no ampersand) on a FMS v11 deployement.

(the php code was there since FMS v9)

But I'm currently testing our whole FileMaker application on v12, and now there's the problem of broken value lists when containing characters with accents.

After some research, I found this post and tried the solution. It worked.

So thanks for sharing the info !

Link to comment
Share on other sites

  • 3 years later...

This topic is 3079 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.