Skip to content

fix(manager): stop an unknown template id from looping on an empty alert - #2437

Merged
Seiger merged 1 commit into
evolution-cms:3.5.xfrom
elcreator:fix-empty-alert-loop
Aug 30, 2026
Merged

fix(manager): stop an unknown template id from looping on an empty alert#2437
Seiger merged 1 commit into
evolution-cms:3.5.xfrom
elcreator:fix-empty-alert-loop

Conversation

@elcreator

Copy link
Copy Markdown

Opening ?a=16 with an id that has no record produced an alert box with no text, and then reloaded the same URL for as long as the tab was open.

Two causes, one symptom:

  • Controllers\Template::parameterData() passed a literal English sentence to alertAndQuit(), whose second argument defaults to $lexicon = true. getLexicon() returns '' for a key it does not know, so the message was empty. Chunk, Snippet, Plugin and MoveDocument all pass false here for a literal; Template was the one that did not.

  • webAlertAndQuit() falls back to history.back(-1) when it is given no URL. On a page that alerts as soon as it is opened, going back lands on the request that raised the alert, which alerts again. Chrome suppresses repeat dialogs after the first, so it runs silently.

alertAndQuit() takes a $url now and passes it through, and an unknown lexicon key falls back to the string it was given, so no alert can be blank again. Template sends the user to its own Cancel target.

Also fixes the stylesheet the alert page loads for itself: $path already ends in '/', so appending '/css/styles.min.css' asked for media/style/default//css/styles.min.css.

Opening ?a=16 with an id that has no record produced an alert box with no
text, and then reloaded the same URL for as long as the tab was open.

Two causes, one symptom:

  * Controllers\Template::parameterData() passed a literal English sentence
    to alertAndQuit(), whose second argument defaults to $lexicon = true.
    getLexicon() returns '' for a key it does not know, so the message was
    empty. Chunk, Snippet, Plugin and MoveDocument all pass false here for
    a literal; Template was the one that did not.

  * webAlertAndQuit() falls back to history.back(-1) when it is given no
    URL. On a page that alerts as soon as it is opened, going back lands on
    the request that raised the alert, which alerts again. Chrome suppresses
    repeat dialogs after the first, so it runs silently.

alertAndQuit() takes a $url now and passes it through, and an unknown
lexicon key falls back to the string it was given, so no alert can be blank
again. Template sends the user to its own Cancel target.

Also fixes the stylesheet the alert page loads for itself: $path already
ends in '/', so appending '/css/styles.min.css' asked for
media/style/default//css/styles.min.css.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MXdDGZnGP6vGt9zTDG5o3n
@Seiger
Seiger merged commit 1b41230 into evolution-cms:3.5.x Aug 30, 2026
6 checks passed
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.

2 participants