Jump to content

3.0.8: Call to undefined function because of compiled files?


isellsoap
 Share

Recommended Posts

PW 3.0.8

Setup:

delayed output strategy with _main.php beginning with

<?php namespace ProcessWire; ?><!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <title><?php echo $page->title; ?></title>
    <link rel="stylesheet" href="<?php echo someFunction($config->urls->templates . "dist/app.css"); ?>" />
  </head>

In the _init.php file I include a _functions.php file with 

include_once($config->urls->templates . "_functions.php");

In _functions.php the someFunction is defined.

The _init.php and _functions.php file begin with 

<?php namespace ProcessWire;

Wenn I try to access the home page in the front-end I get this error:

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Home</title>
    <link rel="stylesheet" href="

<p style='background:crimson;color:white;padding:0.5em;font-family:sans-serif;'><b>Error: 	Call to undefined function ProcessWire\someFunction() (line 8 of /some/path/site/templates/_main.php) </b><br /><br /><small>This error message was shown because: you are logged in as a Superuser. Error has been logged. </small></p>

The setting in the home template at "Use compiled file?" is set to "Yes (and include files)".

Why do I get this error?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...