Dublicated filenames for compiled templates #611

tefra opened this Issue Aug 13, 2012 · 4 comments


None yet
3 participants

tefra commented Aug 13, 2012

If you have multiple libraries with same controller && action names then the compiled template filenames are the same resulting in a conflict

  • libraries
    • \app
      • \controllers
        • IndexController => action index
    • \app2
      • \controllers
        • IndexController => action index

In the method 'template' of class 'lithium\template\view\Compiler' the library name must also be included in the generated filename


nateabele commented Sep 15, 2012

This is not possible, unless both template paths are hard links to the same physical file. Compiler uses stat() information to generate the file path, including the inode number, file size, and last modified timestamp.

nateabele closed this Sep 15, 2012


tefra commented Sep 17, 2012

In windows the inode number is always 0, which means the compiler in every other request rewrites the compiled file.


nateabele commented Oct 10, 2012

Yeah so that would be a legitimate problem. Friggin' Windows. :-) I'll see what we can do about this. Thanks for checking into that.

nateabele reopened this Oct 10, 2012

@joebeeson joebeeson added a commit to joebeeson/lithium that referenced this issue Jul 19, 2013

@joebeeson joebeeson Modifiers `Compiler::template` to include the application name from L…
…ITHIUM_APP_PATH to resolve #611.

@davidpersson davidpersson added a commit that referenced this issue Dec 20, 2013

@davidpersson davidpersson Include library basename in compiled templates.
Fixes overwriting of templates when two different libraries have templates for same controller/action pair.

Refs #611.
Obsoletes #992.

Updating test for template name change.

@davidpersson davidpersson added a commit that referenced this issue Dec 20, 2013

@davidpersson davidpersson Adding synthetic inode when compiling templates on Windows.
Closes #611.

Updating test.

davidpersson commented Dec 20, 2013

Fixed in 34346cb, 32b878a and de85f66. Thanks for the bug report.

nateabele closed this Dec 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment