Details
-
Bug
-
Resolution: Timed out
-
Low
-
None
-
3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.5.5, 3.5.6, 3.5.7, 3.5.9, 3.5.11, 3.5.13, 4.0, 4.2, 4.2.1, 4.2.2, 4.2.3, 4.2.4
-
Standalone, JDK 1.6
-
1
-
Severity 3 - Minor
-
Description
Currently Confluence users are unable to use the #include Velocity function to include files into the rendered html via the Administrator site layouts area. My use case is I have a standard header across multiple products (Confluence, Jira, Fisheye/Crucible, IP.Board), and I want to directly include it from a file shared across all products, so if I change that one file it will update everywhere. The workaround was to use #parse, but parse interprets statements in the file as Velocity code, which is problematic if your html/javascript contains statements that are similar to Velocity.
I've attached a patch that fixes this from Confluence 3.5.1-3.5.7(current), the problem is twofold:
1- There is no included file resource loader in Velocity's config, an easy addition to the properties file
2- There is a bug in the Hibernate resource loader that returns null instead of ResourceNotFoundException when it cannot find a resource in the database, preventing Velocity from falling through to the next resource loader. Easy and tested fix.