Page 1 of 1

PostPosted: Wed Jun 13, 2007 7:01 am
by chus_leon
Hello again

I've got a problem with the related records... First when I try to export the related records, the program saves only the main records, not the related. The relationship was created via $parentfield=table.field in the relationships.ini file:

[equipos]
equipo.eqCliCod="$cliCod"
actions:addexisting=0

In addition, I receive a Fatal error when I try to delete or update a related record using the 'with selected' buttons. This one:

Fatal error: Call to undefined method PEAR_Error::getTitle() in K:\wamp\www\mantenimiento\dataface\Dataface\templates_c\default\%%2E^2EA^2EA26F76%%copy_replace.html.php on line 33

I'm using the getTitle() function on my tables.php files but even deleting the function, the error persists.

Somebody knows what's happen? Thanks

Jesus

PostPosted: Wed Jun 13, 2007 9:20 am
by shannah

Hi Jesus,

Thanks for the bug report.Ê For the export csv function, here is the fix.Ê Open the actions.ini file in Dataface, and find the [export_csv_related] section.Ê The url line for this is

url = "{$this->url('-action=export_csv&--related=1')"

change it to

url = "{$this->url('-action=export_csv')&--related=1"



I'm looking into the other issues.Ê Will get back to you shortly.

Best regards

Steve


PostPosted: Wed Jun 13, 2007 9:31 am
by shannah

Hi Jesus,

Can you send me a copy of the HTML source for the related records page in question.Ê I'm interested in the page with the checkboxes.Ê I'm wondering if some of the special characters that would appear in Spanish are causing some problems...

Thanks

-Steve


PostPosted: Thu Jun 14, 2007 3:21 am
by chus_leon
Thanks for this first solution.

The html code returned is the next:



Warning: Invalid argument supplied for foreach() in K:\wamp\www\mantenimiento\dataface\actions\copy_replace.php on line 58


Warning: array_keys() [function.array-keys]: The first argument should be an array in K:\wamp\www\mantenimiento\dataface\actions\copy_replace.php on line 158


Warning: Invalid argument supplied for foreach() in K:\wamp\www\mantenimiento\dataface\actions\copy_replace.php on line 158

Buscar/Reemplazar registros


This form allows you to perform batch updates on all of the selected
records. Use the form below to specify values to be placed in
any field.



Seleccionados:










TitleCodigo de Cliente


Fatal error: Call to undefined method PEAR_Error::getTitle() in K:\wamp\www\mantenimiento\dataface\Dataface\templates_c\default\%%2E^2EA^2EA26F76%%copy_replace.html.php on line 33



It appears like an error on the copy_replace.php file

Regards

PostPosted: Thu Jun 14, 2007 10:20 am
by shannah

Hi Jesus,

Actually it looks like the forum stripped out a lot of the HTML.Ê If you can send it to my email that would be good.Ê What I want to look at is the related list with the checkboxes... the HTML for the entire page so I can see what is being placed into the hidden form fields...

Thanks
Steve

PostPosted: Fri Aug 31, 2007 11:14 am
by sstoddard
I just got the same error. Is there a fix? It only happens with Update selected fields.



Warning: Invalid argument supplied for foreach() in /var/www/dataface/actions/copy_replace.php on line 58


Warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/dataface/actions/copy_replace.php on line 160


Warning: Invalid argument supplied for foreach() in /var/www/dataface/actions/copy_replace.php on line 160


Find/Replace Form


This form allows you to perform batch updates on all of the selected
records. Use the form below to specify values to be placed in
any field.



Selected records:










Title Codigo de casa


Fatal error: Call to a member function getTitle() on a non-object in /var/www/dataface/Dataface/templates_c/dataface/%%2E^2EA^2EA26F76%%copy_replace.html.php on line 33

PostPosted: Fri Aug 31, 2007 2:55 pm
by shannah

In Jesus' case, I never found out what the problem was exactly.Ê He said that he had made a mistake with his table definitions or something.

So no fix was necessary.Ê You may have a different problem. Hard to tell without looking at:

1. The previous page (the one with the checkboxes that you selected to decide which records to copy/update)

2. The resulting form (that you have already posted here... but the forum seems to muck with it).Ê IfÊ you can send them to my email that would be easier.

-Steve


PostPosted: Wed Sep 12, 2007 5:02 pm
by sstoddard

So it seems to be a problem only when trying to update rows when looking at related records, not if one goes to the table itself. I'll send a link where you can have a look yourself.

-Steve


PostPosted: Thu Sep 13, 2007 1:20 am
by shannah

OK.. the fix for this issue in version 0.7.1 is:

In the Dataface/Record.php file on line 919 you'll see:
$this->cache[__FUNCTION__][$fieldname][$index][$where][$sort] =& $rec[$fieldname];
Change it to:
$this->cache[__FUNCTION__][$relationship.'.'.$fieldname][$index][$where][$sort] =& $rec[$fieldname];