SUP-19921: Fix the scheduled wastebin purge of a referenced page#817
Open
plyhun wants to merge 3 commits into
Open
SUP-19921: Fix the scheduled wastebin purge of a referenced page#817plyhun wants to merge 3 commits into
plyhun wants to merge 3 commits into
Conversation
plyhun
commented
Jun 18, 2026
| @@ -135,11 +135,7 @@ protected void setCode() throws NodeException { | |||
| DBUtils.executeStatement("SELECT short FROM language WHERE id = ?", new SQLExecutor() { | |||
| @Override | |||
| public void prepareStatement(PreparedStatement stmt) throws SQLException { | |||
Contributor
Author
There was a problem hiding this comment.
Note from TransactionManager::getLanguageId()
// TODO: actually, we should always and only use the
// session's languageId. Calling
// ContentNodeHelper.getLanguageId() is done for backwards
// compatibility, so that we don't change any current
// behaviour. This will actually throw expected exceptions because
// ContentNodeHelper.getLanguageId() isn't used by
// ContentNodeResource. To fix this, one should remove the
// get/setLanguageId() from ContentNodeHelper at some point.
// Another point: this transaction may actually be for user=0
// and sessionId=null (that happens when viewing a page
// it seems). In that case, ContentNodeHelper.getLanguageId()
// may still have a valid languageId - it should be checked whether
// that is so, because then, one _has_ to use
// ContentNodeHelper.getLanguageId() since the languageId can't
// be retrieved if the sessionId is null.
Some of the current usages of ContentNodeHelper.getLanguageId() belongs to the wraps of UserLanguageFactory.getById()`, which looks like working the no-session case correclty. Other usages are somewhat unclear, whether expecting an exception on this method, so I hesitate so far removing it completely, as per comment above.
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.
No description provided.