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

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Chris
User
Posts: 162

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

Post 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


mobhar
User
Posts: 11787

Post 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.


Chris
User
Posts: 162

Post 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.


mobhar
User
Posts: 11787

Post by mobhar »

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


Chris
User
Posts: 162

Post 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.


Post Reply