Jump to content

Cannot redeclare function


helmut2509
 Share

Recommended Posts

In one of my templates I had a function and as this function serves also general purposes I saved it in an external functions.php.

This functions.php was included_once in the template.

But then I got an error: Cannot redeclare function.. previously declared in /var/www/..../site/assets/cache/FileCompiler/site/templates/

I deleted this cache folder, but to no avail :-((

So for the moment I see no other solution than to put again the function into the template file...

Any suggestions?

 

Link to comment
Share on other sites

4 hours ago, helmut2509 said:

to what avail? the file functions.php apparently exists and is being loaded.

Sorry if my answer was not relative to your problem. The main reason why I supposed it to you was the fact that I had the very similar issue some time ago. The problem was that my template files had been compiled into several folders and to solve it I had to use  

$config->paths->templates . "file"
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...