CMS Error
2 posts by 2 authors in: Forums > CMS Builder
Last Post: Yesterday at 8:48pm (RSS)
By KennyH - Friday at 5:19pm
In 3.79, I had built some schemas and everything was going along just fine until I broke something. Now when I try to visit that particular list page (all others work) in the CMS, I get a mostly blank screen that says:
Showing all 20 records
explode(): Argument #2 ($string) must be of type string, null given
In the developer log:
explode(): Argument #2 ($string) must be of type string, null given
/home/xxxxxxx/domains/xxxxxxx.com/public_html/cmsb/lib/menus/default/list_functions.php on line 552
https://www.xxxxxxx.com/cmsb/admin.php?menu=tv_shows
so I have done something to run afoul of line 552 of list_functions.php, but I can't figure it out:
// return field label for fieldname in format: articles.title, title, createdBy.username
function _getFieldLabel($fullFieldname) {
@list($fieldname, $tableName) = array_reverse(explode('.', $fullFieldname));
// get schema
$schema = [];
if (!$tableName && $GLOBALS['schema']) {
$schema = &$GLOBALS['schema'];
}
else {
if ($tableName == 'createdBy') { $tableName = 'accounts'; } // workaround for legacy 'createdBy.fieldname' fieldnames
$schema = loadSchema($tableName, null, true);
}
// get label
$label = $schema[$fieldname]['label'] ?? null;
return $label;
}
Schema attached.
Thanks - Kenny
By Dave - Yesterday at 8:48pm
Hi Kenny,
I can't seem to recreate that locally. Can you submit a 2nd-level support request or send an email, and we'll take a look?
Thanks!
interactivetools.com