Skip to content

Conversation

Coussecousse
Copy link
Contributor

Hi!

Issue:
#6814

The flash messages were not displayed on the course_list page. It was the case when you deleted a course or when you click on the category button.

Problem:
When using api_location(api_get_self());, the flash messages were somehow cleared.
I tried using the PHP header() function or attempted to manually write the session with session_write_close(), but nothing worked.
The only way to make it work was to remove this line, but doing so prevented the page from redirecting — leaving the parameters visible in the URL, which I’m not very comfortable with (especially the sec_token).

Resolution:
I changed the actions to use a form with the POST method, and now everything works correctly.
I also removed the 'text-warning' class because it didn’t work before, and now that it does apply, it looked a bit odd :

Capture d’écran du 2025-10-07 11-42-07

Proof:
Capture vidéo du 2025-10-07 11-46-38.webm

@ywarnier ywarnier requested a review from AngelFQC October 7, 2025 11:49
erika added 3 commits October 8, 2025 13:34
Redirecting after deleting the course do not persist the flashes  so they're not displayed.
Passing a post request keep the flash messages
I suspected the flash messages to not work here either and I was right.
I also removed the text-warning class because somehow with the get method it didn't work and the icon was still red. (And in yellow it's weird ?)
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.

1 participant