- Issue created by @suryabhi
- Merge request !74Issue #3535750: TypeError:getOwner(): Return value must be of type โ (Open) created by suryabhi
I have tested this issue as per the provided steps:
Created a Sitewide Alert.
Edited the alert via /admin/content/sitewide_alert/{id}.
Also tried deleting the user who created the alert (with โDelete the account and make its content belong to the Anonymous userโ option).
However, I was not able to reproduce the TypeError mentioned in the issue summary. The alert edit page loads without any errors, and I do not see any related entries in the Watchdog logs (/admin/reports/dblog).
To ensure I'm not missing something, could you please elaborate on the exact conditions required to trigger the error (e.g., should the owner field be manually unset or reference a missing UID)?
It would also be helpful if you could re-test this on your end and confirm whether it is still reproducible with the current codebase.
Thanks!
- ๐ฎ๐ณIndia suryabhi
1. Create a different role
2. Create a user with that role
3. Give add and edit sitewide alert permission to the user
4. then try access to /admin/content/sitewide_alert/6Hope you will able to reproduce the error. I am not reproduce the error with user 1 and the have followed the above step
@suryabhi
i have also follow these new steps but still i am uable to reproduce this issue , i have created new role and a new user of that role. Then with that new user I tried to edit the content created by the admin and also tried to edit the sitewide created by that new user with the admin's role. In both the cases I did't get ay error, pls tell me if I am missing somethig here.Thanks,
- ๐ฌ๐งUnited Kingdom malcomio
One factor that may be relevant is that @suryabhi and I work on a project which previously used the 2.x branch of the module and has been updated to use the 3.x branch.
I've been able to reproduce this issue when trying to edit an old alert, but it doesn't seem to happen for newly created alerts.
The merge request does not address the problem, as the return value can still be null.
- ๐ฌ๐งUnited Kingdom malcomio
I've pushed a change in the branch that handles this scenario, but I think that the real problem is that the module does not implement hook_user_cancel - see ๐ Implement hook_user_cancel Active