Lots of Errors!

Hi - Just started integrating a 3rd party Lib. error reporting is switched on... and I get loads of C5 Notice Undefined errors...

Notice: Undefined variable: path in /Library/WebServer/Documents/c5/concrete/libraries/loader.php on line 431 Notice: Undefined variable: path in /Library/WebServer/Documents/c5/concrete/libraries/loader.php on line 433 Notice: Undefined variable: c in /Library/WebServer/Documents/c5/concrete/libraries/loader.php on line 484 Notice: Undefined property: BlockView::$hasRendered in /Library/WebServer/Documents/c5/concrete/libraries/block_view.php on line 169 Notice: Undefined property: AutonavBlockController::$renderOverride in /Library/WebServer/Documents/c5/concrete/libraries/controller.php on line 57

Just wanted to check that was normal?


View Replies:
JohntheFish replied on at Permalink Reply
Sounds like you could be calling in to C5 from software that started outside of C5.

To get the software infrastructure that C5 provides up and running, start each page with C5, then call out to your external software, which could then call back to C5 utilities.

The two most common ways to do this are to front your external software with either a C5 single page or custom block.
LordTakuban replied on at Permalink Reply
I'm having the same issue. Here's what I'm doing.
I am running a site based on moodle 2.2.3+ and I am integrating Concrete5 (version 6.0.2) in a way that has the 2 systems using the same database with the intent to develop plugins to access the other custom data my moodle-based app uses. So I've added a require_once for moodle's config.php file in the site.php config file for Concrete 5 to load up the moodle engine inside of the C5 page.

Hopefully, that makes sense. In order to resolve some conflicts, I've made the following modifications to the Concrete 5 code:
1. Commented out nearly all of the code from concrete/startup/session.php except for the defined check at the top and these lines:
if (isset($_POST['ccm-session'])) {
} else if (isset($_REQUEST['sessionIDOverride'])) {

2. I Changed the database() method in concrete/core/libraries/loader.php to be:
global $CFG;
require $CFG->libdir . '/adodb/adodb.inc.php';
require $CFG->libdir . '/adodb/adodb-exceptions.inc.php';
require $CFG->libdir . '/adodb/adodb-active-record.inc.php';
require $CFG->libdir . '/adodb/adodb-xmlschema03.inc.php';
require DIR_BASE_CORE . '/libraries/database.php';

Note that my moodle instance has already been loaded before this occurs and therefore it's using the moodle version of adodb (should be the same).

That's the only changes to the Concrete 5 code I've made. What this results in is a concrete 5 instance that loads and looks fine. However, it throws a ton of notices into the error log like:
Notice: Undefined offset: 2 in ~\concrete\core\libraries\loader.php on line 174

This is the first error notice it throws:
Notice: Undefined index: Database in ~\concrete\core\libraries\loader.php on line 112

That is followed by a bunch of the first notice I listed. Then there are many others.

It seems as though something is happening that is preventing the C5 objects from loading properly and that is causing all of these notices. The lack of error condition checking within Concrete 5 is bringing this potentially serious issue to light. But I haven't been able to figure out what exactly is causing it. I know I'm using Concrete5 in a somewhat bizarre way. But surely what I'm trying to accomplish can be done.

Thanks in advance for any assistance.