Skip to content

[WIP] Fix add cohort button navigation blank page issue - #80

Closed
markdav-is with Copilot wants to merge 1 commit into
mainfrom
copilot/bug-add-cohort-button-routing
Closed

[WIP] Fix add cohort button navigation blank page issue#80
markdav-is with Copilot wants to merge 1 commit into
mainfrom
copilot/bug-add-cohort-button-routing

Conversation

Copilot AI commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

make issues for the following

TenTrees.org - GitHub Issues DraftBelow are the drafted GitHub issues for all failed tests identified during the recent test cycles. You can copy and paste these directly into your GitHub repository's issue tracker.Issue 1: [Bug] "Add Cohort" button navigates to blank page (Oqtane routing conflict)Title: [Bug] "Add Cohort" button navigates to blank page (Oqtane routing conflict)
Labels: bug, routing, cohort-moduleDescription:
When a user with appropriate permissions (e.g., Project Manager) attempts to create a new cohort, clicking the "Add Cohort" button results in a completely blank page instead of rendering the Blazor form.Steps to Reproduce:Log in as a user with Project Manager (TestPM) or Administrator credentials.Navigate to the Cohort management page (/cohort).Click the "Add Cohort" button.Observe that the URL changes to /cohort//39/Add and the main content area renders blank.Expected Behavior:
The Blazor "Add Cohort" component should render, allowing the user to input details for a new cohort.Actual Behavior:
The Oqtane CMS intercepts the /cohort/
/39/Add route, treating "Add" as an internal page management action rather than routing to the Blazor component. Because the user may not have page management rights (or the panel fails to load correctly in this context), the page appears blank.Suggested Fix:
Resolve the routing conflict. This may involve renaming the Blazor component route (e.g., to /cohort/*/39/New) or configuring Oqtane to bypass its interceptor for this specific module action.Issue 2: [Bug] Xitsonga localization missing for Enrollment form labelsTitle: [Bug] Xitsonga localization missing for Enrollment form labels
Labels: bug, localization, enrollment-moduleDescription:
The application supports switching the UI language to Xitsonga (South Africa), but the form labels within the Enrollment wizard do not translate and remain in English.Steps to Reproduce:Navigate to the Enrollment page (/enrollment).Click the culture/language toggle button in the top right corner.Select "Xitsonga (South Africa)".Click "Add Enrollment" to open the enrollment wizard.Observe the form labels (e.g., "Participant Information", "Grower Name", "Household Size").Expected Behavior:
All form labels, placeholders, and validation messages should be translated into Xitsonga.Actual Behavior:
The culture cookie (.AspNetCore.Culture) is correctly set to c=ts-ZA|uic=ts-ZA, and the UI refreshes, but the form labels still render in English.Suggested Fix:
Add the missing Xitsonga localization dictionary entries (.resx files) for the Enrollment module components.Issue 3: [Security/RBAC] Anonymous users can access restricted pagesTitle: [Security/RBAC] Anonymous users can access restricted pages (Assessment, Grower, Cohort, Mentor)
Labels: bug, security, rbacDescription:
Unauthenticated (Anonymous) users can navigate directly to several management pages that should be restricted to logged-in users. While Enrollment and Village correctly redirect to the Login page, others do not.Steps to Reproduce:Open an incognito/private browser window (ensure you are not logged in).Navigate directly to https://tentrees.org/assessment.Repeat for /grower, /cohort, and /mentor.Expected Behavior:
The application should redirect the user to the Login page (/login) for all these routes.Actual Behavior:
The pages load and are accessible to the unauthenticated user.Suggested Fix:
Apply [Authorize] attributes to the Blazor components and backend API controllers for the Assessment, Grower, Cohort, and Mentor modules to enforce authentication checks.Issue 4: [RBAC] Mentor module is visible to Mentor and Educator rolesTitle: [RBAC] Mentor module is visible to Mentor and Educator roles
Labels: bug, rbac, mentor-moduleDescription:
According to the project specifications, the Mentor management module should be hidden and access denied for users with the Mentor or Educator roles. Currently, these roles can view the Mentor page and access the underlying API.Steps to Reproduce:Log in as a user with the Mentor (TestMentor) or Educator (TestTeacher) role.Observe the top navigation bar.Click on the "Mentor" link or navigate to /mentor.Expected Behavior:
The "Mentor" link should not be visible in the navigation bar, and navigating to /mentor should result in an access denied message or redirect. The API (/api/Mentor) should restrict access.Actual Behavior:
The Mentor page is accessible, and the API returns the full list of mentors.Suggested Fix:
Update the Oqtane module permissions for the Mentor module to remove "View" access for the Mentor and Educator roles. Ensure the backend API also enforces these role-based restrictions.Issue 5: [Bug] Training page returns 404 Not FoundTitle: [Bug] Training page returns 404 Not Found
Labels: bug, routing, training-moduleDescription:
The "Training" link is present in the navigation bar for authenticated users, but clicking it leads to a 404 error page.Steps to Reproduce:Log in as any authenticated user (e.g., Admin, Project Manager).Click the "Training" link in the top navigation bar (or navigate to /training).Expected Behavior:
The Training module should load, displaying training attendance records.Actual Behavior:
The application returns a 404 Not Found error.Suggested Fix:
If the Training module is not yet implemented, remove the link from the navigation bar. If it is implemented, fix the routing or ensure the page is correctly registered in the Oqtane CMS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants