Attempting to insert phpGrid resulting in undefined variables, index, properties
Permalink 1 user found helpful
I have created a page type that includes the snippet of code for phpGrid to display information from a table. No problem displaying the grid, but the rest of the page doesn't show properly and results in a long list of undefined variables, indexes, and properties.
I thought the problem might be related to connecting to another database using the dbloader, so i just imported the table into the c5 database, but no luck.
I am a very novice at this sort of thing and would really appreciate any insights on how to approach resolving this.
for example (the first 3 of about 3 dozen errors):
Notice: Undefined property: CollectionPermissions::$permissions in /home/national/public_html/updates/concrete5.4.2.1/concrete/models/permissions.php on line 458
Notice: Undefined property: CollectionPermissions::$permissions in /home/national/public_html/updates/concrete5.4.2.1/concrete/models/permissions.php on line 458
Notice: Undefined index: cta area in /home/national/public_html/updates/concrete5.4.2.1/concrete/models/collection.php on line 665
Thanks.
I thought the problem might be related to connecting to another database using the dbloader, so i just imported the table into the c5 database, but no luck.
I am a very novice at this sort of thing and would really appreciate any insights on how to approach resolving this.
for example (the first 3 of about 3 dozen errors):
Notice: Undefined property: CollectionPermissions::$permissions in /home/national/public_html/updates/concrete5.4.2.1/concrete/models/permissions.php on line 458
Notice: Undefined property: CollectionPermissions::$permissions in /home/national/public_html/updates/concrete5.4.2.1/concrete/models/permissions.php on line 458
Notice: Undefined index: cta area in /home/national/public_html/updates/concrete5.4.2.1/concrete/models/collection.php on line 665
Thanks.
It's really difficult to say without knowing more about what exactly you're doing in the code. The OP mentions something about using an external database, and if that's true then you do want to be sure to have this line of code after all of your external database queries (otherwise all subsequent queries by the c5 system will fail):
Otherwise, you'll need to provide some more context here.
$db = Loader::db(null, null, null, null, true);
Otherwise, you'll need to provide some more context here.
I get a bunch of errors, such as
Notice: Undefined property: CollectionPermissions::$permissions in [root]\concrete\models\permissions.php on line 461
Notice: Undefined property: CollectionPermissions::$permissions in [root]\concrete\models\permissions.php on line 461
Notice: Undefined property: CollectionPermissions::$permissions in [root]\concrete\models\permissions.php on line 461
Notice: Undefined index: Footer in [root]\concrete\models\collection.php on line 463
Notice: Undefined property: CollectionPermissions::$permissions in [root]\concrete\models\permissions.php on line 461
Notice: Undefined variable: includeEditStrip in [root]\concrete\models\area.php on line 423
Notice: Undefined property: BlockView::$hasRendered in [root]\concrete\libraries\block_view.php on line 169
Notice: Undefined property: HtmlBlockController::$renderOverride in [root]\concrete\libraries\controller.php on line 57
Notice: Undefined variable: _filename in [root]\concrete\libraries\block_view.php on line 320
Notice: Undefined variable: _filename in [root]\concrete\libraries\block_view.php on line 321
when I add the lines
So I think these things are happening anyway, just not showing up.
Notice: Undefined property: CollectionPermissions::$permissions in [root]\concrete\models\permissions.php on line 461
Notice: Undefined property: CollectionPermissions::$permissions in [root]\concrete\models\permissions.php on line 461
Notice: Undefined property: CollectionPermissions::$permissions in [root]\concrete\models\permissions.php on line 461
Notice: Undefined index: Footer in [root]\concrete\models\collection.php on line 463
Notice: Undefined property: CollectionPermissions::$permissions in [root]\concrete\models\permissions.php on line 461
Notice: Undefined variable: includeEditStrip in [root]\concrete\models\area.php on line 423
Notice: Undefined property: BlockView::$hasRendered in [root]\concrete\libraries\block_view.php on line 169
Notice: Undefined property: HtmlBlockController::$renderOverride in [root]\concrete\libraries\controller.php on line 57
Notice: Undefined variable: _filename in [root]\concrete\libraries\block_view.php on line 320
Notice: Undefined variable: _filename in [root]\concrete\libraries\block_view.php on line 321
when I add the lines
error_reporting(E_ALL); ini_set('display_errors', 'On');
So I think these things are happening anyway, just not showing up.
Anyone got any advice on this one?