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-6484 & FOUR-6485: patch-1-cartegraph webentry fixes #4435

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

runyan-co
Copy link
Contributor

@runyan-co runyan-co commented Jul 7, 2022

Environment Setup

  • Set core to this PR's branch, bugfix/FOUR-6485.
  • Set package-webentry to bugfix/FOUR-6485.
  • Set package-collections to patch-1-cartegraph.
  • Set package-savedsearch to patch-1-cartegraph.

Issue(s) & Reproduction Steps

Note: This branch fixes two (2) tickets in Jira.

For FOUR-6485:

  1. Create a custom webentry URL.
  2. Copy the standard webentry URL, then switch it over to a custom URL and save (as well as save the process).
  3. Visit the standard webentry URL.
  4. Notice the standard URL still works as well as the custom webentry URL.

For FOUR-6484:

  • Create a custom URL with a segment and one or more URL variables.
  • Save the webentry URL and save the processes.
  • Attempt to visit the URL without the expected variable(s).
  • You’ll notice you receive a 500 error, which is the HTTP response code for internal server error.

Solution

  • When a standard webentry URL is visited, there is now a check to see if a custom webentry url exists. If one does exists, then it returns a 404 error and exits (since the user should be using the custom url, not the standard).
  • The AuthenticateSession middleware was extended from the framework to catch an uncaught exception which was thrown in specific situations using webentry, including when visiting a custom webentry url which expects variables that aren't present.

How to Test

  • When visiting a standard webentry url that has a custom url set, you should now encounter a 404.
  • When visiting a custom webentry route that expects variables (but the url you're using doesn't have them), you should npw encounter a 404 instead of a 500.

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.

Copy link
Contributor

@agustinbusso agustinbusso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working for both scenarios for ticket FOUR-6484 and FOUR-6485

FOUR-6484

Screen.Recording.2022-07-07.at.17.20.10.mov

FOUR-6485

Screen.Recording.2022-07-07.at.17.18.14.mov

@ryancooley ryancooley merged commit 00d0514 into patch-1-cartegraph Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants