I am currently trying to integrate Drupal and CodeIgniter PHP framework. Basically it works quite well but I have some problem calling drupal's template API...
this is the code I have in my drupal module
function cheeseburger_ci() {
// process the query string
_cheeseburger_ci_request_process($_GET['q']);
require_once dirname(__FILE__) . '/index.php';
}
function theme_cb($content) {
echo theme('page', $content);
}
and the code to call the theme function
public function test() {
// set up a form
return theme('cb', $this->load->view('test', '', TRUE));
}
Then I am greeted with these error messages although I have the content displayed in the content area without problem.
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: no_module_preprocess
Filename: includes/common.inc
Line Number: 1498
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: no_theme_preprocess
Filename: includes/common.inc
Line Number: 1498
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: script_links
Filename: javascript_aggregator/javascript_aggregator.module
Line Number: 91
Comments
Yes Drupal 5 is not E_NOTICE free
As Drupal 5 is shipped it sets
error_reporting(E_ALL ^ E_NOTICE)so these are not reported. You should do the same. Use Drupal 6, that's notice free.--
The news is Now Public | Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile. |
--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.
thanks for the information
thanks for the information
I hope I am not being over
I hope I am not being over reacting but I don't feel really good when getting all those notices... To get rid of the notices, I dug the forum for a better solution and i came out with this... Then I load the page (error_reporting(E_ALL)) and get all those mentioned notices again.
Then I tried with the following code
without declaring any variables, and get_defined_vars() returns an empty array. but strange enough that php doesnt even return a single notice even I have not done something to fix "Message: Undefined variable: no_theme_preprocess" ...?