View Issue Details

IDProjectCategoryView StatusLast Update
0022098mantisbtcustomizationpublic2017-09-23 11:53
ReporteratrolAssigned Tosyncguru 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version2.0.0 
Target VersionFixed in Version 
Summary0022098: Setting bottom_include_page does not include specified file
Description

Regression

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.

Relationships

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 

Activities

vboctor

vboctor

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.

atrol

atrol

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 https://www.mantisbt.org/bugs
$g_bottom_include_page = 'config/custom_footer.php';

SteveA

SteveA

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).

mahindra

mahindra

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

mahindra

mahindra

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! :)

mahindra

mahindra

2017-01-26 18:22

reporter   ~0055353

but this is not beautifull ;)

vboctor

vboctor

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.

JWPlatt

JWPlatt

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:
http://bugs.openuru.org

vendeeglobe

vendeeglobe

2017-02-17 03:41

reporter   ~0055715

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

JWPlatt

JWPlatt

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.

JWPlatt

JWPlatt

2017-02-19 18:08

reporter   ~0055723

I guess a question after looking at your pull request from syncguru:
https://github.com/mantisbt/mantisbt/pull/860/commits
https://github.com/mantisbt/mantisbt/pull/860/commits/89e66ff60cfd2ebebb52ef6587c1eed55911c9ce

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

Xenos

Xenos

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

<code>
$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';
</code>

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.

JWPlatt

JWPlatt

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.

JWPlatt

JWPlatt

2017-04-15 10:23

reporter   ~0056564

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

SteveA

SteveA

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.

Xenos

Xenos

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 README.md in there containing a short description like:

MyKingCustomPlugin

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:

<?php
// 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 = 'https://toile.reinom.com';
    }

    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="https://reinom.com" class="my-brand">
            <img class="logo reinom"
                 src="/custom/blog-icon.png?t=20170415A" alt="Liste des projets Reinom" title="Projets"/>
        </a>
        <?php
    }

    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>
        <?php
    }
    public function header($p_event) {
        ?>
<!-- Header code should go here, but, meh, bugged -->
        <?php
    }
}

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).

SteveA

SteveA

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?

JWPlatt

JWPlatt

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.

Emmanuel

Emmanuel

2017-07-12 12:02

reporter   ~0057209

Hi Mantis Team,
We need to add a logo and add a link to documentation PDF.
$g_top_include_page is not working on 2.5.1.
Have you schedule to fix this feature ? Thank you.

JWPlatt

JWPlatt

2017-07-12 21:32

reporter   ~0057213

@Emmanuel No. They're using the Microsoft approach to Window 8 with all the silence, but without the contrition and apologies to follow.

SteveA

SteveA

2017-07-21 17:27

reporter   ~0057286

I assume that nothing from the Mantis team means that they've actually done nothing and are just hoping this will go away and they can concentrate on the "new shiny"

It would be good if you could at least confirm if you are ever going to re-instate this functionality. If you're not then that means people can look at working round it or moving to another product.

mahindra

mahindra

2017-07-21 17:35

reporter   ~0057287

To change the loge has done this in our mantis.
Ok it's different and not so adaptable - but it also brings back a bit of corporate identity.

mahindra

mahindra

2017-07-21 17:35

reporter   ~0057288

Logo ;)

atrol

atrol

2017-07-23 08:08

developer   ~0057293

No excuse, but keep in mind that Mantis is developed by just a few people, working in their free time without getting paid for it.
At the moment, hardly anyone of us is able to invest time for Mantis.
This might change in some weeks, you never know.
I have hardly any time at the moment to contibute to this issue, I don't need it myself.

The solution is not that simple like some of you might think, at least if you don't want a quick and dirty solution.
https://github.com/mantisbt/mantisbt/pull/860 might give you an impression.
Any input is welcome. Notes like 0022098:0057213 and similar don't help to get any progress.

Finally we might end in a complete other and better solution than what we had in version 1.3.
E.g. we could offer a page where you can upload your logo and enter some additional HTML code.
Until there is a final decision, 0022098:0056602 is a good way to get what you want. Thanks @Xenos for it.

@JWPlatt I had a look at your Mantis installation, but also your Jira installation.
There is no top banner or menu in Jira, so I assume it is no high priority for you to have it in Mantis.

There are two options at the moment

  • stay with 1.3.x, which is still supported and gets security fixes.
  • use 2.x by using a plugin like the one proposed at 0022098:0056602.
SteveA

SteveA

2017-07-23 09:24

reporter   ~0057295

Thanks for giving some update on this matter - its been a long time since anyone from the core Mantis team made any comment and all we've seen is the milestone being pushed out and out.

Staying with 1.3.x is what I suspect most people are planning to do.. it might be worth considering making it easier to find the 1.3.x security updates from the website - the download page only gives access to the current 2.x release....

JWPlatt

JWPlatt

2017-07-23 11:21

reporter   ~0057296

@atrol Don't assume. The feature in Mantis is above a top priority. We will NEVER move to version 2 of Mantis until site integration is reimplemented. If it does not come soon enough such that security is compromised due to lack of maintenance on version 1, we will DELETE the Mantis installation entirely and forever in favor of using Atlassian tools such as JIRA. There is no comparison between JIRA and Mantis. JIRA is an enterprise tool from a large commercial company where we have no hope of influence over their support of any significant site integration. Whereas Mantis is really just a small tool we installed for people who like it, or don't like JIRA, but is entirely disposable. It's do or die for your small team, at least with us.

Candidly, as a professional software developer myself, dropping a long-existing and important feature like this was a bad decision. We wouldn't be having this discussion about finding time to reimplement it if you didn't drop the ball in the first place.

JW

syncguru

syncguru

2017-07-23 11:54

developer   ~0057297

@JWPlatt: Why the threatening hostile tone? Last I checked, Mantis is a free software that is developed and maintained by volunteers ...

The modern UI is much more complex. Supporting a configuration that allows random JS files to be loaded at different points during page load is very fragile and slows down or totally hinders future UI/UX enhancements. I don't think core mantis code should be concerned with that and take the hit to maintain it.
The solution that was proposed earlier in this issue is using a plugin to do the inclusion of JS files. I think that is a workable solution and should be taken seriously. I'd expect professional software developers to arrive at such conclusion, however.

SteveA

SteveA

2017-07-23 12:03

reporter   ~0057298

But the header and footer allowed you to wrap Mantis into another website, basically integrating it. It does seem that the Modern UI was designed without considering that functionality, and I do find it rather ironic that back in January it was pointed out that the mantis site itself uses this now discarded functionality.

JWPlatt

JWPlatt

2017-07-23 12:11

reporter   ~0057299

@syncguru Just giving you the candid reality of our decision process. Mantis has been on our trigger for a long time. I'm the site owner and the one who has kept it alive and integrated through upgrades because I don't believe in dropping important features for our past and future users. Get it?

If the plugin is a viable immediate solution, refine and integrate THAT into your distribution. I spend my volunteer time on our site. I'm not handing yours too.

JW

SteveA

SteveA

2017-07-23 12:20

reporter   ~0057300

And that plugin would possibly be OK apart from the fact that EVENT_LAYOUT_PAGE_HEADER isn't fired at any time due to an unfixed bug...

vboctor

vboctor

2017-07-23 13:46

manager   ~0057302

For the scenario of using the EVENT_LAYOUT_PAGE_HEADER for adding a message to the users (which is what we were using this event for in this tracker), the proper way of doing this now is via the Announce plugin.

https://github.com/mantisbt-plugins/announce

As I said in 0022098:0054897, you should expect that this functionality is likely deprecated as far as MantisBT 2.x core is concerned. A plugin may surface that would enable such functionality in the future by some community member.

To reflect that, I have removed the target version from this issue.

Any product change is likely to not fit 100% of our user base, but our goal is that our product development benefits the majority of our users.

SteveA

SteveA

2017-07-23 13:55

reporter   ~0057303

OK so something that was used by quite a lot of people, and which is still in your documentation for 2.5 has basically been removed and is not going to be re-introduced, and there is now no way of wrapping Mantis into another site because there is no easy way to inject wrapping code (such as divs) round the mantis pages

JWPlatt

JWPlatt

2017-07-23 16:35

reporter   ~0057309

@vboctor It would be interesting to see your poll numbers from the research you did on behalf of your userbase to so well understand where the majority lies prior to dropping a major feature to help them with this beneficial action.

SteveA

SteveA

2017-07-23 16:49

reporter   ~0057310

As you merged 0022117 and 0022494 into this - both of of which are concerned with general usage of the features rather than Mantis's own specific use - you can't really say that the announce plugin is the resolution.

Two features were removed from 2.5 (but not removed from the documentation, nor fully removed from the code base) - apparently after an internal discussion by the Mantis team.

Don't you feel that maybe asking end users about removing this functionality might have been wise?

Xenos

Xenos

2017-07-24 08:19

reporter   ~0057314

@JWPlatt IMO, even if it's interesting to know your decision process, the way you worded it was indeed agressive (like Mantis team would be afraid of you dropping out the free tool they made...?!)
@SteveA I'm unsure about how you make your wrapping, but if you're using iframe then you may just put your stylings and such outside that iframe. If "wrapping" actually means "be on the the website domain and graphically look like the rest of the website", then I would suggest you to add CSS and script tags in the meta part (which works) and use the script to alter your content as you wish. That way, you won't be relying on Mantis' internal "event" thing, and just put your styling as a dedicated layer over the Mantis website. As it's styling, you don't have to worry about non-JS executing users nor search engines (which does seem to execute JS nowadays). If you still want to do it server-side, then you can always use a ob_start in your meta and alter to full content of the result (a bit heavy, but a way that works too).

But I agree with you that, from user point of view, it also seems late to me to be aware of dropped features after the release (or after the decision of removal is taken). I would too appreciate some place to be informed about that (ie: a RSS or, better, a mailing list).

SteveA

SteveA

2017-09-23 06:35

reporter   ~0057798

@Xenos - iframes don't work very well -: one because of the Content-Security-Policy headers but also because of the changing URLs that Mantis uses.

The problem with just editing the meta is that on our site there is a left hand menu and a header which wraps round Mantis - basically Mantis is presented within the main DIV we have set where we render the active part of the site. The last line in the header include we use is <div id="main-content">

JWPlatt

JWPlatt

2017-09-23 11:53

reporter   ~0057800

@vboctor @atrol @syncguru Is such site integration really impossible or beyond reasonable technical abilities to support?

I notice vboctor has not yet released the poll data actually showing what "the majority of our users" actually wants. Until then, I'll take it as a convenient and baseless rationalization for the laziness of dropping a long-time integration feature instead of supporting compatibility with prior work.

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
2017-07-12 12:02 Emmanuel Note Added: 0057209
2017-07-12 21:32 JWPlatt Note Added: 0057213
2017-07-21 17:27 SteveA Note Added: 0057286
2017-07-21 17:35 mahindra Note Added: 0057287
2017-07-21 17:35 mahindra Note Added: 0057288
2017-07-23 08:08 atrol Note Added: 0057293
2017-07-23 09:24 SteveA Note Added: 0057295
2017-07-23 11:21 JWPlatt Note Added: 0057296
2017-07-23 11:54 syncguru Note Added: 0057297
2017-07-23 12:03 SteveA Note Added: 0057298
2017-07-23 12:11 JWPlatt Note Added: 0057299
2017-07-23 12:20 SteveA Note Added: 0057300
2017-07-23 13:46 vboctor Target Version 2.6.0 =>
2017-07-23 13:46 vboctor Note Added: 0057302
2017-07-23 13:55 SteveA Note Added: 0057303
2017-07-23 16:35 JWPlatt Note Added: 0057309
2017-07-23 16:49 SteveA Note Added: 0057310
2017-07-24 08:19 Xenos Note Added: 0057314
2017-09-23 06:35 SteveA Note Added: 0057798
2017-09-23 11:53 JWPlatt Note Added: 0057800