FOUR-27749 | Editing A Template Displays a Server Error When Returning From Documentation#8715
FOUR-27749 | Editing A Template Displays a Server Error When Returning From Documentation#8715mcraeteisha wants to merge 4 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
|
QA server K8S was successfully deployed https://ci-9eb5e11524.engk8s.processmaker.net |
|
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 21. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
|
QA server K8S was successfully deployed https://ci-9eb5e11524.engk8s.processmaker.net |





Issue
Ticket: FOUR-27749
Clicking the template name breadcrumb from the Documentation page in the template modeler caused a server error. The breadcrumb link used an incorrect ID, leading to a null reference when accessing template properties.
The Alternative Tabs (A/B testing) API is called with the correct process ID and no longer returns 404 when opening Template Documentation from the listing.
Solution
Updated
ProcessMaker/Http/Controllers/TemplateController.php:editing_process_uuidand redirects tomodeler.template.show(templateId)so the URL is always the template URL.ProcessTemplate::show(which would delete the process and create a new one). Users stay on the template modeler URL and see the latest process state (e.g. Alternative B) without getting a new process ID.Updated
vendor/processmaker/package-ai/src/Http/Controllers/PackageAiDocumentationController.php:editing_process_uuid, the controller finds the editing process and setsprocess_id_for_apion the process object passed to the view so the frontend can call the ab-testing API with the correct process ID.Updated
vendor/processmaker/package-ai/resources/js/components/AlternativeTabs.vue:this.process.process_id_for_apiwhen present; if it’s missing, the API call is skipped (no 404).this.processIdorthis.process.id.How To Test
ci:deploy
ci:package-ai:bugfix/FOUR-27749
Code Review Checklist
Note
Medium Risk
Changes routing/lookup logic for template editing and introduces a new Eloquent relationship; incorrect resolution could misroute users or expose unexpected 404s, but scope is limited to template modeler entry points.
Overview
Fixes template modeler navigation errors by making
TemplateController@showaccept either a template ID or an editing process ID, resolving the associatedProcessTemplatesrecord and redirecting to the canonical template URL when needed.Adds a
ProcessTemplates::editingProcess()relationship and uses it to (a) render the modeler with the existing editing process ID when present (avoiding recreating the process) and (b) simplifyProcessTemplate::show’s lookup of the editing process.Written by Cursor Bugbot for commit 8666d3f. This will update automatically on new commits. Configure here.