### Apache Airflow version

2.6.2

### What happened

If I want see the common information of the N mapped task .

I edit manually the URL cause there is no button in the current airflow console 

```url
http://localhost:8090/task?dag_id=kubernetes_dag&task_id=task-one&execution_date=2023-06-18T00%3A00%3A00%2B00%3A00&map_index=0
```

by removing the `&map_index=0`

if I click on `rendered-templates` it fail

```log
{app.py:1744} ERROR - Exception on /rendered-templates [GET]
 Traceback (most recent call last):
 File "/home/airflow/.local/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app
   response = self.full_dispatch_request()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/airflow/.local/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request
   rv = self.handle_user_exception(e)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/airflow/.local/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
   rv = self.dispatch_request()
        ^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/airflow/.local/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
   return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/airflow/.local/lib/python3.11/site-packages/airflow/www/auth.py", line 47, in decorated
   return func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^
 File "/home/airflow/.local/lib/python3.11/site-packages/airflow/www/decorators.py", line 125, in wrapper
   return f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^
 File "/home/airflow/.local/lib/python3.11/site-packages/airflow/utils/session.py", line 76, in wrapper
   return func(*args, session=session, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/airflow/.local/lib/python3.11/site-packages/airflow/www/views.py", line 1354, in rendered_templates
   ti.refresh_from_task(raw_task)
   ^^^^^^^^^^^^^^^^^^^^
 AttributeError: 'NoneType' object has no attribute 'refresh_from_task'
```

### What you think should happen instead

_No response_

### How to reproduce

[Screencast from 19-06-2023 15:07:02.webm](https://github.com/apache/airflow/assets/10202690/10a3546f-f2ef-4c2d-a704-7eb43573ad83)


### Operating System

ubuntu 22.04

### Versions of Apache Airflow Providers

_No response_

### Deployment

Docker-Compose

### Deployment details

_No response_

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

]
            owner_links_dict = DagOwnerAttributes.get_all(session)
            import_errors = session.query(errors.ImportError).order_by(errors.ImportError.id)
            if (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG) not in user_permissions:
                
                import_errors = import_errors.join(
                    DagModel, DagModel.fileloc == errors.ImportError.filename
                ).filter(DagModel.dag_id.in_(filter_dag_ids))
            for import_error in import_errors:
                flash(
                    f"Broken DAG: [{import_error.filename}] {import_error.stacktrace}",
                    "dag_import_error",
                )
        from airflow.plugins_manager import import_errors as plugin_import_errors
        for filename, stacktrace in plugin_import_errors.items():
            flash(
                f"Broken plugin: [{filename}] {stacktrace}",
                "error",
            )
        num_of_pages = int(math.ceil(num_of_all_dags / float(dags_per_page)))
        state_color_mapping = State.state_color.copy()
        state_color_mapping["null"] = state_color_mapping.pop(None)
        page_title = conf.get(section="webserver", key="instance_name", fallback="DAGs")
        page_title_has_markup = conf.getboolean(
            section="webserver", key="instance_name_has_markup", fallback=False
        )
        dashboard_alerts = [
            fm for fm in settings.DASHBOARD_UIALERTS if fm.should_show(get_airflow_app().appbuilder.sm)
        ]
        def _iter_parsed_moved_data_table_names():