Skip to content

IBX-11038: Content rendering in BO fails after deleting user that created the content#1796

Merged
konradoboza merged 8 commits intomainfrom
IBX-11038-content-deleted-author-fix
Feb 13, 2026
Merged

IBX-11038: Content rendering in BO fails after deleting user that created the content#1796
konradoboza merged 8 commits intomainfrom
IBX-11038-content-deleted-author-fix

Conversation

@Sztig
Copy link
Copy Markdown
Contributor

@Sztig Sztig commented Dec 10, 2025

🎫 Issue IBX-11059

Description:

This is a regression coming from #1697
author in VersionInfo must be nullable so we can still display content of some deleted user.
I have also reverted in AuthorsTab retrieving ownerId to be directly accessed from contentInfo instead of quering the owner as it might be no longer in the database.

@sonarqubecloud
Copy link
Copy Markdown

Comment thread src/lib/Tab/LocationView/AuthorsTab.php Outdated
@Sztig
Copy link
Copy Markdown
Contributor Author

Sztig commented Jan 19, 2026

Since playing around initializing the lazy proxy didn't quite work out I decided to use try catch for the problematic user

Comment thread src/lib/Tab/LocationView/AuthorsTab.php Outdated
@Sztig
Copy link
Copy Markdown
Contributor Author

Sztig commented Feb 11, 2026

I have reverted the fix to the pre regression state, I didn't want to go with option 2 as it wouldn't work without try catch since getOwner method returns proxy that is not a null even if the fetched user doesn't exist anymore, so we would have to fetch the ownerId of this object and handle the exception anyway

@konradoboza konradoboza requested a review from ViniTou February 11, 2026 12:05
@konradoboza konradoboza force-pushed the IBX-11038-content-deleted-author-fix branch from 623ee48 to 28cacd0 Compare February 11, 2026 15:16
@konradoboza
Copy link
Copy Markdown
Contributor

I decided to go for proxy resolving to avoid silencing null value for uninitialized proxy when non-existent user is accessed. This however needs to be deeper investigated concerning owner property coming from core VO.

@konradoboza konradoboza added the Bug Something isn't working label Feb 12, 2026
@konradoboza konradoboza force-pushed the IBX-11038-content-deleted-author-fix branch from 68dd31f to 0e62381 Compare February 12, 2026 07:47
Comment thread src/lib/Tab/LocationView/AuthorsTab.php Outdated
@konradoboza konradoboza requested a review from ViniTou February 12, 2026 09:33
Copy link
Copy Markdown
Contributor

@barbaragr barbaragr left a comment

Choose a reason for hiding this comment

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

When I delete the editor and then go to the content tree, the error message box is displayed. Console shows: Failed to load resource: the server responded with a status of 404 (Not Found).

Image

@konradoboza
Copy link
Copy Markdown
Contributor

Well, it doesn't happen on my end. Is there any specific subtree you visit? Besides, wouldn't this be caught on the Behat tests' level?

@barbaragr
Copy link
Copy Markdown
Contributor

Well, it doesn't happen on my end. Is there any specific subtree you visit? Besides, wouldn't this be caught on the Behat tests' level?

Tested on fresh and clean installation of 5.0.x-dev.

Steps to reproduce:

  1. As admin create new Editor user.
  2. Log in the BO as the editor.
  3. Add a folder content.
  4. Logout and login as admin.
  5. Go to Users/Editors
  6. Remove the Editor user.
  7. Go to the Content/Content structure

@sonarqubecloud
Copy link
Copy Markdown

@konradoboza
Copy link
Copy Markdown
Contributor

Thank you, a long list of content objects on my instance kinda made me overconfident. I hope we are good now but please re-test @barbaragr. 😄

Copy link
Copy Markdown
Contributor

@barbaragr barbaragr left a comment

Choose a reason for hiding this comment

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

Approved ✅

@konradoboza konradoboza merged commit bdcb771 into main Feb 13, 2026
23 checks passed
@konradoboza konradoboza deleted the IBX-11038-content-deleted-author-fix branch February 13, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working QA approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants