Last item in the breadcrumbs in report pages leads to 404

Created on 28 April 2023, over 1 year ago
Updated 30 April 2023, over 1 year ago

Problem/Motivation

On the page of each report the last breadcrumb item leads to a 404.

See screenshot:

Steps to reproduce

Go to a report page and click inthe last breadcrumb item.

Proposed resolution

Not sure, I didn't have the time to examine the reason, I stumble upon this while working on other issue.

Remaining tasks

Found the cause and fix it.

User interface changes

Probaly, breadcrumb is impacted.

API changes

TBD.

Data model changes

TBD.

🐛 Bug report
Status

Fixed

Version

1.2

Component

Code

Created by

🇪🇸Spain tunic Madrid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @tunic
  • Assigned to lpeidro
  • 🇪🇸Spain lpeidro Madrid

    The problem here is caused for a change in the routing architecture of the module during the develop.

    Now we are pass the id of the task plugin using the url to build the page:

    route name: "xray_audit.task_page"
    path: "/admin/reports/xray-audit/{group_plugin}/{task_plugin}/{operation}"
    

    But there is not a page for the path: "/admin/reports/xray-audit/{group_plugin}/{task_plugin}", given that all the operation of a task plugin is show in the drop-down in the Group Plugin page.

    From my point of view there are two options:

    • Replace the way we pass the task plugin id, and not using it as parameter
    • Create a new controller to build the page for the route "/admin/reports/xray-audit/{group_plugin}/{task_plugin}"

    In the new page we can include more information about the different operations of the plugin and of of course, links to the operation.

    Here we are including another click to get the valuable information, so I don not know if at this moment is good increase the complexity.

    I

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇪🇸Spain lpeidro Madrid

    I decided to select the option number 2, "Create a new controller to build the page for the route /admin/reports/xray-audit/{group_plugin}/{task_plugin}/{operation}".

    Now the route path looks: "/admin/reports/xray-audit/{group_plugin}/{task_plugin_operation}", where the last parameter is the combination of the task plugin id and the operation. When the controller receives the value of the parameter, explode the value and get the task plugin id and the operation id.

    I have taken advantage and I have created a service named "xray_audit.plugin_repository" that contains logic related with the plugin, for example, to instance and plugin, get the url for a plugin, etc. This service should grow with the time with new methods.

    I think this is the best option.

  • Status changed to RTBC over 1 year ago
  • 🇪🇸Spain tunic Madrid

    I agree on the selected approach. Tested, it works ok, I just added a commit for a typo.

    I can't find the option to create the MR :(

  • @tunic opened merge request.
  • Status changed to Fixed over 1 year ago
  • 🇪🇸Spain tunic Madrid

    Ok, mental note: be logged in Gitlab when you want to create a MR.

    Found, created MR, merged, fixed!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024