View Issue Details

IDProjectCategoryView StatusLast Update
0022098mantisbtcustomizationpublic2017-06-04 17:22
ReporteratrolAssigned Tosyncguru 
Status assignedResolutionopen 
Product Version2.0.0 
Target Version2.6.0Fixed in Version 
Summary0022098: Setting bottom_include_page does not include specified file


Option bottom_include_page to include a file at the bottom of each page is still available but does not work any longer.

TagsNo tags attached.


related to 0022266 closedvboctor CVE-2017-7222: Sanitize window title 
related to 0021113 assignedsyncguru EVENT_LAYOUT_PAGE_HEADER no longer available 
has duplicate 0022117 closedatrol Neither top_include_page not bottom_include_page used in v2.0 
has duplicate 0022494 closedvboctor Custom footer and top data 




2017-01-02 23:05

manager   ~0054897

We had a discussion on this. We may end up deprecating such configuration option depending on the final solution that results from the discussion. Assigning to @syncguru since he will coordinate this discussion and the necessary work out of it.



2017-01-03 02:54

developer   ~0054899

The request has been triggered by a user in forum.

Keep also in mind that we use it on
$g_bottom_include_page = 'config/custom_footer.php';



2017-01-05 13:35

reporter   ~0054947

Losing this functionality is causing me problems. I use $g_top_include_page and $g_bottom_include_page to basically wrap a MantisBT installation into an existing website . Removing the $g_bottom_include_page means I can't do this any more (we have some javascript that loads in the footer of the site which is needed to support some of the site menu functionality).



2017-01-25 14:32

reporter   ~0055326

I am using $g_bottom_include_page to get our Name and Logo on the logon page
Now I am using $g_logo_image and have put the text in it - but it is not as nice as include page



2017-01-26 17:52

reporter   ~0055352

It is possible to get the logo in $g_window_title = 'TESTUMGEBUNG - <img src="/mantis_TEST/images/EBVLOGO_60.gif" height="35" " />';

That's all what we need - thank you for this great system! :)



2017-01-26 18:22

reporter   ~0055353

but this is not beautifull ;)



2017-01-26 21:50

manager   ~0055359

@mahindra the ability add html in the window title as in 0022098:0055352 is a bug that we should fix. It also won't work because window title is also used in other scenarios like some of the email notifications.



2017-02-10 00:52

reporter   ~0055629

Like SteveA, we use $g_top_include_page and $g_bottom_include_page to wrap a MantisBT installation into our website with a consistent banner, menu, and game server statuses across all pages and subdomains for navigation. We manage open source development of the Cyan Worlds' Myst Online (Uru) MMO. Without the custom header and footer, I cannot upgrade from 1.3 to 2.x+ and maintain visual integration. I don't understand how there can be any question about web products like this playing friendly with website integration.

This is our implementation of 1.3:



2017-02-17 03:41

reporter   ~0055715

We used $g_top_include_page = '%absolute_path%/'; as project meta-navigation. Now what out of the box solution do we have for this purpose?



2017-02-19 17:46

reporter   ~0055722

I see this task is assigned, but will restoring $g_top_include_page and $g_bottom_include_page definitely be on the roadmap? An existing feature for many years has been removed, so I'm naturally curious about why.



2017-02-19 18:08

reporter   ~0055723

I guess a question after looking at your pull request from syncguru:

What happens if I apply it? Or in other words - why not?



2017-04-15 05:54

reporter   ~0056557

That's easy: if these no longer work in Mantis, and we have no simple straight-through way to do so, then I'll stay on the old-that-will-be-vulnerable-but-still-since-it-works version

$g_top_include_page = '%absolute_path%/config/header.php';
$g_bottom_include_page = '%absolute_path%/config/bottom.php';
$g_meta_include_file = '%absolute_path%/config/meta.php';

I need these to set up custom conditionnal CSS sheets, custom metas (like charset), custom JS to load, and brand headers.
For now, this bug (and also, the fact that the whole styling changed so I'll have to retrain people on how to use this tracker, which is also very annoying btw) is a blocker to me.



2017-04-15 10:21

reporter   ~0056562

@vbdoctor @syncguru How does this project defend eliminating support for a critical website integration feature that existed for years and the subsequent deafening silence about its restoration? There can be no question about web products like this playing friendly with website integration.



2017-04-15 10:23

reporter   ~0056564

@vboctor See imperative note above. Adding this because I got your username wrong.



2017-04-15 11:02

reporter   ~0056566

The continual pushing out to the next version for this fix is worrying - it suggests that this is not actually going to be fixed.

As others have noted it seems that this key bit of functionality (which is even used by the Mantis Team themselves) was dropped without any consideration of how Mantis is being used (I assume because it just didn't fit into how the new UI was designed ) . If the team are not going to re-implement this code (or another way of integrating mantis into other sites) then we're either left relying on the 1.3 code base or moving away from Mantis totally.



2017-04-17 15:36

reporter   ~0056602

Last edited: 2017-04-17 15:49

View 2 revisions

I think I'll do Mantis' team job here, but that's the way I "fixed" that issue. I used someone else's plugin as a base, and built up something without reading any doc (because nope, I didn't want to spend time reading docs while it was instant to do this before) [I'll rename the plugin btw... I'll let you guess the original name]:

1) Create a "MyKingCustomPlugin" directory in the "plugins" directory
2) Create a in there containing a short description like:


Because they changed everything when it comes to custom CSS/JS/meta tags
3) In that same folder, create a "MyKingCustomPLugin" file, containing your plugin code:

// Funny: the class name is not the same as the file name... but who cares about PSR0 anyway?!
class MyKingCustomPluginPlugin extends MantisPlugin {

    public function register() {
        $this->name = 'My King Custom Plugin';
        $this->description = 'Custom stylings and such for this ... new Mantis version';

        $this->version = '0.1.0';
        $this->requires = array(
        'MantisCore' => '2.0.0'

        $this->author = 'Xenos';
        $this->contact = 'xenos@reinom.oom';
        $this->url = '';

    public function hooks() {
        return array(
            'EVENT_LAYOUT_RESOURCES' => 'meta',
            'EVENT_LAYOUT_PAGE_FOOTER' => 'bottom',
            'EVENT_LAYOUT_PAGE_HEADER' => 'header'
// Funny thing: the EVENT_LAYOUT_PAGE_HEADER is never fired because of another bug

    public function bottom($p_event) {
<!-- Bottom HTML/PHP code goes here -->
        <a href="" class="my-brand">
            <img class="logo reinom"
                 src="/custom/blog-icon.png?t=20170415A" alt="Liste des projets Reinom" title="Projets"/>

    public function meta($p_event) {
<!-- Custom HTML meta code and PHP goes here -->
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

        <link rel="stylesheet" type="text/css" href="/custom/custom.css?t=20170415A"/>
        <script class="my-stuff"
                data-login-status="<?php echo auth_is_user_authenticated() ? 'is-not-anonymous' : 'is-anonymous'; ?>"
                src="/custom/custom.js?t=20170415A">/* report bogue */</script>
    public function header($p_event) {
<!-- Header code should go here, but, meh, bugged -->

4) Put your custom CSS and JS in dedicated files (because Content Security Policies may break your inline stuff), and NOT inside the plugins directiory (would have sound logical to put CSS/JS of a plugin inside that plugin's directory, but since it doesn't work out of the box like before, I've put it all in a "custom" directory inside the root folder of the server).
5) Have fun making your CSS/JS work again, because like ALL classes and such have been changed too... note that a LOT of "widgets" have no specific class, which is another painful thing.

Maybe it will help some people.
(btw since we still have no preview thing, which was IMO way more important than breaking all codes for this new structure and styling, then I have no idea how this note will render; hope it will look fine still).



2017-06-04 16:37

reporter   ~0057025

So does another push out mean that we're actually no closer to knowing if this core functionality is going to be re-instated?



2017-06-04 17:22

reporter   ~0057026

@SteveA You're putting negligence more politely than I would. I'm sure it's appreciated. I would never so cavalierly drop such an important feature in a project.

Issue History

Date Modified Username Field Change
2017-01-01 12:53 atrol New Issue
2017-01-02 23:03 vboctor Assigned To => syncguru
2017-01-02 23:03 vboctor Status new => assigned
2017-01-02 23:05 vboctor Note Added: 0054897
2017-01-03 02:54 atrol Note Added: 0054899
2017-01-03 07:44 dregad File Added: screenshot-my_view.png
2017-01-03 07:44 dregad File Deleted: screenshot-my_view.png
2017-01-05 11:11 atrol Relationship added has duplicate 0022117
2017-01-05 13:35 SteveA Note Added: 0054947
2017-01-25 14:32 mahindra Note Added: 0055326
2017-01-26 17:52 mahindra Note Added: 0055352
2017-01-26 18:22 mahindra Note Added: 0055353
2017-01-26 21:50 vboctor Note Added: 0055359
2017-01-26 21:50 vboctor Relationship added related to 0022266
2017-02-01 22:49 vboctor Target Version 2.0.1 => 2.2.0
2017-02-10 00:52 JWPlatt Note Added: 0055629
2017-02-17 03:41 vendeeglobe Note Added: 0055715
2017-02-19 17:46 JWPlatt Note Added: 0055722
2017-02-19 18:08 JWPlatt Note Added: 0055723
2017-02-26 21:19 vboctor Target Version 2.2.0 => 2.3.0
2017-03-07 22:02 vboctor Relationship added has duplicate 0022494
2017-04-01 00:20 vboctor Target Version 2.3.0 => 2.4.0
2017-04-15 05:54 Xenos Note Added: 0056557
2017-04-15 10:21 JWPlatt Note Added: 0056562
2017-04-15 10:23 JWPlatt Note Added: 0056564
2017-04-15 11:02 SteveA Note Added: 0056566
2017-04-17 15:36 Xenos Note Added: 0056602
2017-04-17 15:49 atrol Note Edited: 0056602 View Revisions
2017-04-17 17:22 cproensa Relationship added related to 0021113
2017-04-30 14:53 vboctoradmin Target Version 2.4.0 => 2.5.0
2017-06-04 16:19 atrol Target Version 2.5.0 => 2.6.0
2017-06-04 16:37 SteveA Note Added: 0057025
2017-06-04 17:22 JWPlatt Note Added: 0057026