Skip to content

SUP-19921: Fix the scheduled wastebin purge of a referenced page#817

Open
plyhun wants to merge 3 commits into
hotfix-6.3.xfrom
hotfix-6.3.x-sup-19921
Open

SUP-19921: Fix the scheduled wastebin purge of a referenced page#817
plyhun wants to merge 3 commits into
hotfix-6.3.xfrom
hotfix-6.3.x-sup-19921

Conversation

@plyhun

@plyhun plyhun commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@plyhun plyhun requested a review from npomaroli June 18, 2026 14:21
@@ -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 {

@plyhun plyhun Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

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.

1 participant