Bug #266
Ability to delete templates
| Status: | Closed | Start date: | 05/27/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Tom Moore | % Done: | 100% |
|
| Category: | Admin Control Panel | |||
| Target version: | 1.4.8 | |||
| Reproducibility: | Database Type: | |||
| Reported In MyBB Version: | Database Version: | |||
| PHP Version: | SQA assignments: | |||
| Browser: |
Description
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.
Associated revisions
Fixes Validation Issue (fixes:276)
Fixes Ability to delete templates (fixes:266)
History
#1 Updated by Tom Moore almost 3 years ago
To fix, in ./admin/modules/style/templates.php, around line 849, replace:
$table->construct_cell("<span style=\"padding: 20px;\"><a href=\"index.php?module=style/templates&action=edit_template&title=".urlencode($template['title'])."&sid={$sid}\">{$template['pretty_title']}</a></span>", array("width" => "85%"));
with
$table->construct_cell("<span style=\"padding: 20px;\">{$template['pretty_title']}</span>", array("width" => "85%"));#2 Updated by Tom Moore almost 3 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Applied in changeset r4377.
#3 Updated by Ryan Gordon almost 3 years ago
- Target version changed from 1.4.7 to 1.4.8
#4 Updated by Chris W. B. almost 3 years ago
- Status changed from Resolved to Closed