[FX.php List] Bug in XML output of FMSA

Stephen Knight stephen at fmwebschool.com
Fri Nov 17 16:15:55 MST 2006


Hi Gjermund,

Well, that is certainly a sensible suggestion but I do see a few drawbacks
to forcing it into the standard format. You have suggested assigning
arbitrary "Record IDs" to the scripts, which would imply that the data came
through correctly or simply was fixed to look correct - while this might be
a good idea, but it hides the fact from the user that there is something
wrong with the script IDs. Also since the check is for identical record id
and modification id combinations, you wouldn't want to force it to the next
available id - what if a FileMaker bug would surface that in certain cases
messes up record ids? In that case, the explode method of isolating the
record ID would still work, but when looking at the data set you would be
able to see that something is wrong with the array keys. 

To summarize my opinion - it is better to let the developer know that the
data came in wrong, then to fix it up to look "correct". 


In Kindness
Stephen K Knight
http://www.fmwebschool.com
800.353.7950 / 386.453.5843
FMWebschool, we bring the web to life 
FX.PHP PHP XML MySQL CDML ASP


-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Gjermund Gusland
Thorsen
Sent: Friday, November 17, 2006 4:56 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] Bug in XML output of FMSA

Do you think it would be bad to just make it

while(isset($this->currentData[$this->currentRecord."-{$i}"])) {
                       $i++;
                   }
                   $this->currentRecord = "{$i}.0";
               }

instead? That way you would get 1.0, 2.0, 3.0, ..., n.0

ggt667


2006/11/17, Stephen  Knight <stephen at fmwebschool.com>:
> Greetings everyone :)
>
> The FMWebschool team has found a bug in the XML output of FMSA v8.04 
> (and probably earlier), causing the -scriptnames action to return a 
> result set with all record ids and modification ids set to 0. 
> Therefore only the last script comes through in the data array with 
> the key of " 0.0". To solve this, I have added a simple check for 
> duplicate keys which adds a sequential "-1,-2,-3" values to the key,
causing the second key to be "0.0-1".
>
> To replicate the bug:
> - create two scripts inside the database
> - call $fx->FMScriptNames();
>
> Replace the following line:
>                 $this->currentRecord = $recordid . '.' . $modid;
> with:
>                 $this->currentRecord = $recordid . '.' . $modid;
>                 if(isset($this->currentData[$this->currentRecord])) {
>                     //Fix for identical record ids / mod ids due to an 
> FM bug which returns 0.0 for all entries in -scriptnames
>                     $i =1;
>
> while(isset($this->currentData[$this->currentRecord."-{$i}"])) {
>                         $i++;
>                     }
>                     $this->currentRecord .= "-{$i}";
>                 }
>
>
> In Kindness
> Stephen K Knight
> http://www.fmwebschool.com
> 800.353.7950 / 386.453.5843
> FMWebschool, we bring the web to life
> FX.PHP PHP XML MySQL CDML ASP
>
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Windi 
> Sanjaya
> Sent: Wednesday, November 15, 2006 7:37 PM
> To: fx.php_list at mail.iviking.org
> Subject: [FX.php List] Re: FX.php_List Digest, Vol 28, Issue 18
>
> Oh this maillist is  work :)
>
> Hi all i'm the new guy who trying understand about filemaker, related 
> with fx.php.
> I'm so sad because i can't upload image or file to container field at 
> filemaker use php or fx.php.
> Am i wrong ???? or anybody can give me advice for this problem, or i 
> must order grabit-plugin..... ;(
>
> cheers
>
> windy
>
>
>
> ______________________________________________________________________
> ______
> ________
> Sponsored Link
>
> $200,000 mortgage for $660/ mo -
> 30/15 yr fixed, reduce debt -
> http://yahoo.ratemarketplace.com
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list





More information about the FX.php_List mailing list