Edgewall Software
Modify

Opened 5 years ago

Closed 4 years ago

#12571 closed enhancement (wontfix)

Keep sidebar present when showing error "Unknown administration panel" error

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone:
Component: admin/web Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

When the path matches /admin but does not match any IAdminPanelProviders, we see:

It would be nice if we could keep the navigation sidebar visible when rendering the message.

Attachments (3)

Screen Shot 2016-08-30 at 16.12.58.png (98.4 KB ) - added by Ryan J Ollos 5 years ago.
Screen Shot 2016-08-30 at 16.14.26.png (73.6 KB ) - added by Ryan J Ollos 5 years ago.
Screen Shot 2017-07-31 at 22.55.20.png (65.3 KB ) - added by Ryan J Ollos 4 years ago.

Download all attachments as: .zip

Change History (5)

by Ryan J Ollos, 5 years ago

by Ryan J Ollos, 5 years ago

comment:1 by Ryan J Ollos, 5 years ago

Description: modified (diff)

by Ryan J Ollos, 4 years ago

comment:2 by Ryan J Ollos, 4 years ago

Milestone: next-dev-1.3.x
Resolution: wontfix
Status: newclosed
Type: defectenhancement

I experimented with this a bit, but I think it's probably not worth implementing.

  • trac/admin/templates/admin.html

    diff --git a/trac/admin/templates/admin.html b/trac/admin/templates/admin.html
    index 7a077cb7d..51cff72be 100644
    a b  
    4949        </ul>
    5050        # endfor
    5151      </div>
     52      # if error:
     53      <div id="tabcontent">
     54        <h2>${_("Error: Not Found")}</h2>
     55        <div class="system-message">${error}</p>
     56      </div>
     57      # else:
    5258      <div id="tabcontent">
    5359        # block adminpanel
    5460        # endblock adminpanel
    5561        <br style="clear: right" />
    5662      </div>
     63      # endif
    5764    </div>
    5865    ${ super() }
    5966    # endblock content
  • trac/admin/web_ui.py

    diff --git a/trac/admin/web_ui.py b/trac/admin/web_ui.py
    index acd5897f7..59abd3388 100644
    a b class AdminModule(Component):  
    8888                panel_id = \
    8989                    filter(lambda panel: panel[0] == cat_id, panels)[0][2]
    9090            except IndexError:
    91                 raise HTTPNotFound(_("Unknown administration panel"))
     91                cat_id = panel_id = None
    9292
    9393        provider = providers.get((cat_id, panel_id))
    94         if not provider:
    95             raise HTTPNotFound(_("Unknown administration panel"))
    96 
    97         resp = provider.render_admin_panel(req, cat_id, panel_id, path_info)
    98         template, data = resp[:2]
     94        if provider:
     95            resp = provider.render_admin_panel(req, cat_id, panel_id, path_info)
     96            data = resp[1]
     97            data.update({'active_cat': cat_id, 'active_panel': panel_id})
     98        else:
     99            data = {'error': _("Unknown administration panel")}
     100            resp = 'admin.html', data
    99101
    100102        data.update({
    101             'active_cat': cat_id, 'active_panel': panel_id,
    102103            'panel_href': partial(req.href, 'admin', cat_id, panel_id),
    103104            'panels': [{
    104105                'category': {'id': panel[0], 'label': panel[1]},

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.