MyBB Community Forums

Full Version: [F] Ability to delete templates [C-Chris W B.]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Just found an issue that can cause major issues for some people.

Go to ACP > Templates & Style > Templates > Search/Replace > do a name search for anything that will have a result. Choose a result, and click the name of it. Edit it, and save. Then, go to Go to ACP > Templates & Style > Templates > Search/Replace again, do the same name search, and you'll see the template name in the Global Templates; you can then delete this, meaning there is no version of that template anywhere, so it just loads a blank page (or blank area) when you go to the page that would load that template.

This happens because when you get the results of the search, you're not clicking Options to choose the template set. IMO the template name should be unclickable, forcing you to click Options and choose a template set.

Tested on 1.4.6 and SVN.
Not sure I follow you on this one Matt. I've just tested it on the trunk, and this is what I did.

I searched for "ipaddress", and edited the "modcp_ipsearch" template. Searched for "ipaddress" again, and it wasn't in the global templates, it was in the default templates (where it should be, I guess, as I selected in the options menu). I couldn't click on any template name, I had to edit it through the options.

[Image: ss1icz.jpg]

(Is this a case of me eating and posting, again, and I'm following you wrong?)
It only seems to happen if you search for a template name, rather than the contents.

A title search for 'index'....

This is the results page:

[attachment=13976]

Names are clickable. Now, if you were to go to Options > and choose a set, you'd see this; this is how it should be, note the red boxes:

[attachment=13977]

This is how it is when you just click the name, note again the red boxes and compare them:

[attachment=13978]

There's no template set up at the top and the one in the dropdown box is Global Templates.

Then, save the one that's showing up as being in the Global Templates, and go to the Global Template Set:

[attachment=13979]

Delete it, then do another search for 'index':

[attachment=13980]

Tada, it's gone, no more index template.


So, if you can't click the name when you do a title search, all this goes away... this is tested on the latest (I think) 1.4 SVN, not on the trunk, haven't got that setup at the moment.
Affects the trunk too I guess.

Hmm, really the template shouldn't be clicked, as you suggested, just like search/replace. Not sure what to make of it though - I'll wait for Ryan's input before doing anything.
Yeah, the template shouldn't be "click-able"
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group