Repository navigation
Conversation
Contributor
Author
|
@lmajano I don't think the ACF test error is related to the PR. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused guard matches existing behavior and has regression coverage, with no identified blocking issues; tests were not run during this review.
0 open findings
What changed in this PR
Fixes missing-handler resolution so view-only events reach invalid event handling when implicitViews is disabled.
Changes:
- Guards view dispatch with the cached
implicitViewssetting. - Adds service and request-level regression coverage.
- Updates existing view-dispatch tests to enable implicit views temporarily and clean up cached beans.
| File | Description |
|---|---|
| tests/specs/web/services/HandlerServiceTest.cfc | Tests disabled implicit views and isolates enabled-view tests. |
| tests/specs/integration/EventExecutionsSpec.cfc | Verifies view-only requests return the invalid-handler 404. |
| system/web/services/HandlerService.cfc | Checks implicitViews before missing-handler view lookup. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
homestar9
force-pushed
the
fix/implicitviews-missing-handler
branch
from
October 16, 2026 19:22
4fc5fc8 to
c927789
Compare
…view lookup getHandlerBean() called isViewDispatch() for every event without a handler, even with implicitViews off. An event matching a view name was then flagged as a view dispatch and failed with Renderer.ViewNotSetException instead of reaching invalid event handling. It now checks the setting first, like getHandler() does for a missing action.
homestar9
force-pushed
the
fix/implicitviews-missing-handler
branch
from
October 16, 2026 19:30
c927789 to
76b8343
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
With
implicitViewsset tofalse(the default since 8.3.0), an event with no matching handler should go through invalid event handling.HandlerService.getHandlerBean()still checks for a view with the same name, though. When it finds one, it flags the event as a view dispatch. The renderer then has no view to render, because implicit views are off, and the request fails withRenderer.ViewNotSetExceptioninstead of reaching theinvalidEventHandleror returning a 404.getHandler()already checks the setting before it callsisViewDispatch()for a missing action. This PR adds the same check togetHandlerBean():if ( variables.implicitViews AND isViewDispatch( arguments.event, oHandlerBean ) ) {Apps with
implicitViewsturned on behave as before.Two existing
HandlerServiceTestspecs expectedsimpleviewto dispatch while the test harness hasimplicitViewsoff. They only passed because of this bug. They now turn the setting on for their duration, withprepareMock().$property()because the service caches the setting, and restore it afterwards. They also remove thesimpleviewbean they cache, so it doesn't carry over into later specs.Jira Issues
Type of change
Checklist
HandlerServiceTest: with implicit views off,getHandlerBean( "simpleview" )isn't a view dispatch and returns the invalid event handler's bean;EventExecutionsSpec: requestingsimpleviewwith implicit views off returns the invalid event handler's 404. Both fail without the fix, the second withRenderer.ViewNotSetException)runner.cfmandrunner-integration.cfm, compared with a run ofdevelopmentwithout the change: no new failures, and the new specs pass, on Lucee 5.4, Adobe 2023, Adobe 2025, BoxLang 1 and BoxLang 1 with CFML compat. Integration runner 98/98 on each engine. MySQL wasn't available locally, so ORM was turned off and the DB log appender removed for these runs. The specs that need the database fail the same way with and without the change.)