[FX.php List] Layout missing?

Steve Winter steve at bluecrocodile.co.nz
Wed Aug 23 11:03:34 MDT 2006


Hi Drew,

 

If I'm not mistaken this is the manifestation of a bug in the early versions
of FMSA7 and FMSA8, in which if there were fields from related tables on the
layout, and they were empty, you got this type of error. There are, two
solutions available to you;

 

1.	wrap all of your related table fields on your 'home' layout into a
portal, no matter if there is only one record showing for the relationship
(I now do this by default whenever I add a related field to a db layout it
goes in a portal.!)
2.	upgrade to the latest version of FMSA8, which I believe has been
'fixed'.

 

Either should solve your problem.

 

Cheers

Steve

 

  _____  

From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Dr. Andrew J.
Fallon
Sent: Thursday, 24 August 2006 12:53 a.m.
To: fx.php_list at mail.iviking.org
Subject: [FX.php List] Layout missing?

 

I have an FX.php scrip that parses through a Main file, which contains
several hundred layouts.

The script is designed to grab specific  data out of the array and upload it
to MySQL.

This is for a conversion from 6 to 8 where the schema is different. There
are several hundred

Users that we will need to convert. The script ran flawless on my dummy DB.
So the next step was

To check live data from several sources. The script seemed to be fine but
then I got a 

 

Fatal Error: Cannot use object of type FX_Error as array in
D:\Inetpub\wwwroot\hearform8\hearform_main.php on line 60

 

$value = $queryResult['data'];    // That's line 60.

 

The error ALWAYS occurred on the same record being parsed. So I used
fxparser to see what the entire array would hold.

 

error_message_prefix   

mode 1   

level 1024   

code 100   

message FX: ExecuteQuery XML error: Internal error at line 1

Array

 File.  D:\Inetpub\wwwroot\FX\FX.php

 Line. 1339

 Function. FX_Error

 Class. FX_Error

 Object. Catchable fatal error: Object of class FX_Error could not be
converted to string in D:\Inetpub\wwwroot\hearform\fx_search.php on line 463

 

Ok code 100 is file not found, which made little sense to me. So I decided
to play with the script again

Here is s snippet of my code.

 

for ($firstRecord; $firstRecord <=$lastRecord; $firstRecord++) {

 

            $query->SetDBData('Main', 'Home', 'ALL');

            $query->AddDBParam('ONumber', $firstRecord);

       //   $query->AddSortParam('ONumber', 'ascend');

            $queryResult = $query->FMFind();

             $value = $queryResult['data'];

            foreach ($value as $key1 => $h6data) {

 

What I found is if I take out the layout parameter of
$query->SetDBData('Main', 'Home', 'ALL');

And leave it as $query->SetDBData('Main', '', 'ALL');

There's no error and the script works. The trouble with this is that 1)
there's over a 100 layouts in 

File Main and 2) that's more data than I need and it 3) slows the script
down to much.

In FMP6 the record functions fine and populates the Home layout fine.

But trying to access this via FX.php tosses this error. Does this make sense
or am I overlooking

Something. And ultimately what's the fix for this record?

 

Drew (the long winded)

 

 

 

 


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.5/425 - Release Date: 8/22/2006


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060824/62e4c2f4/attachment.html


More information about the FX.php_List mailing list