Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FOUR-10287: Changing a setting while routes are cached causes fatal exception #5243

Merged
merged 2 commits into from Sep 2, 2023

Conversation

runyan-co
Copy link
Contributor

@runyan-co runyan-co commented Sep 1, 2023

Issue & Reproduction Steps

  1. Cache the routes with APP_RUNNING_IN_CONSOLE=false php artisan route:cache
  2. Go to the admin dashboard, then settings and change one of the settings (e.g. turn on a user signal)
  3. Refresh one or two times and notice the fatal error:
Symfony\Component\Routing\Exception\RouteNotFoundException
Route [package.comments.index] not defined.

Solution

  • Remove an unnecessary artisan call to re-cache the routes after the setting(s) are updated. Since this artisan call would've been run without APP_RUNNING_IN_CONSOLE=false set as an environment variable, it fails to cache all routes and causes a fatal error for any HTTP request sent after.

How to Test

You should now be able to update any setting with the config or routes cached without any fatal errors occuring when sending a HTTP request to the app.

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@processmaker-sonarqube
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ryancooley ryancooley merged commit 2dd8f0a into develop Sep 2, 2023
6 checks passed
ryancooley added a commit that referenced this pull request Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants