Page 1 of 1

Warning: Missing argument 13 for cField::__construct() (v9)

Posted: Mon Sep 09, 2013 10:10 pm
by Chris

I have a large V9 project we've just moved to a new server. The database has been duplicated from the old one, but there are errors being thrown on just one table ("client_users"):

Here are the errors shown above the page

Warning: Missing argument 13 for cField::__construct(), called in /var/www/vhosts/me.accessdomain.com/httpdocs/client_usersinfo.php on line 250 and defined in /var/www/vhosts/me.accessdomain.com/httpdocs/oc/phpfn9.php on line 1186

Notice: Undefined variable: fldvirtualsrch in /var/www/vhosts/me.accessdomain.com/httpdocs/oc/phpfn9.php on line 1202

And then this renders inside the page:

Fatal error: Call to undefined method cclient_users_list::GetViewUrl() in /var/www/vhosts/me.accessdomain.com/httpdocs/oc/client_userslist.php on line 1041

I uploaded the exact same files to the old server and tried it, there is no fatal error. Everything seems to be crashing on this $fldvirtualsrch but I can't pinpoint how to repair it.

Thanks,
Chris


Re: Moved V9 project to new server, new errors

Posted: Tue Sep 10, 2013 9:46 am
by mobhar

"Notice: undefined variable" is not a serious error; it's only a notice or warning message.

Regarding the fatal error, try to replace this in your "phpfn9.php" file:
function __construct($tblvar, $tblname, $fldvar, $fldname, $fldexp, $fldbsexp, $fldtype, $flddtfmt, $upload, $fldvirtualexp, $fldvirtual, $forceselect, $fldvirtualsrch, $fldviewtag="") {

with this:
function __construct($tblvar, $tblname, $fldvar, $fldname, $fldexp, $fldbsexp, $fldtype, $flddtfmt, $upload, $fldvirtualexp, $fldvirtual, $forceselect, $fldvirtualsrch="", $fldviewtag="") {

I think that this must be related to the server settings, and not PHPMaker. Check and compare your web server, PHP, and the database version between the old and new server.


Re: Warning: Missing argument 13 for cField::__construct() (

Posted: Tue Sep 10, 2013 12:09 pm
by Chris

I always like to see notices because they always drop information that leads up to the error and warnings are never ignored.

Better than just defaulting to a blank string, I'd like to find out why only the client_users page is throwing the $fldvirtualsrch error while all of the other pages aren't, or why this page is requesting it and the others aren't. I just uploaded this to our LAMPP server and are seeing no errors either.

I guess I could change the main functions file but it doesn't really solve the issue, just masks it.


Re: Warning: Missing argument 13 for cField::__construct() (

Posted: Tue Sep 10, 2013 2:19 pm
by mobhar

Does your "client_users" list page include the basic/quick search in it?


Re: Warning: Missing argument 13 for cField::__construct() (

Posted: Tue Sep 10, 2013 3:39 pm
by Chris

There is a TEXT item in the fields that had quick search selected. I'll try removing all search checkboxes to see if it's got something to do with that.