Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

Jupiter: INCLUDE relative path broken in content includes that previously worked in paper lantern

Sangeeth Sudheer shared this idea 2 years ago
Transitioned to Case

We used to place minimal content in home_page_header.html.tt and global_header_html.tt in Paper Lantern and included the bulk of the functionality via a separate INCLUDE directive like so:

[% INCLUDE 'fm-template-toolkit/fm_global_header_includes.html.tt' %]
However, on Jupiter with Content Includes, the same line doesn't work anymore. We used to symlink the fm-template-toolkit directory to its actual location and I thought that's no longer supported but even replacing the link with the entire directory doesn't work. It produces the following error:

[2022-04-26 16:07:26 +0000] warn [cpanel] Failed to process template: '/var/cpanel/customizations/content_includes/cpanel_jupiter_tools_header.html.tt' - Error: file error - fm-template-toolkit/fm_home_page_header_includes.html.tt: not found at /usr/local/cpanel/Cpanel/Template/Plugin/
Content_Includes.pm line 114.
Tried adding a ./ to the beginning but that produces a more explicit error stating "relative paths are not allowed".

Absolute paths seem to work but the problem being having to hardcode that info and generate separate files .tt for Paper Lantern and Jupiter (until Jupiter is widely adopted).

Could you please add back the support for paths relative to `content_includes` directory as I mentioned in the first example or is there another way to do this?

WHM version: 102.0.11

Replies (1)

photo
2

(apologies for the unintentional reply there). I'm in the process of registering this as a bug. I do not believe it was our original intent to prevent this but such a bug will prompt that discussion. Thank you!

photo
2

PH-18184

photo
1

@cPanelAdamF any updates on this? Will it be resolved soon?

photo
Leave a Comment
 
Attach a file