Skip to content

Conversation

@erickcomp
Copy link

@erickcomp erickcomp commented Feb 7, 2025

Fix #106
In the method [\block_quickmail\persistents\message::populate_recip_course_msg], instead of passing an (user) object to the [\block_quickmail\repos\user_repo::get_unique_course_user_ids_from_selected_entities] method, it was passing the [user id] only, making the [\block_quickmail\repos\user_repo::get_unique_course_user_ids_from_selected_entities] method use a string as if it were an object. This PR fix this.

Note2:

  • I applied this hotfix to my production environment and it's been working as intended for 2 days already.
  • I did not write any tests int this PR because my prod env was chaos and I did not (and still don't) have time to study the tests of the package in order to do it.

In the method [\block_quickmail\persistents\message::populate_recip_course_msg], instead of passing an (user) object to the [\block_quickmail\repos\user_repo::get_unique_course_user_ids_from_selected_entities] method, it was passing the [user id] only, making the [\block_quickmail\repos\user_repo::get_unique_course_user_ids_from_selected_entities] method use a string as if it were an object
@rprawel
Copy link

rprawel commented Aug 29, 2025

I am having the same issue as well and all I have tried thus far, does not work. I would love to find a way bring attention to developers as this is creating a bigger issue across the board.

@davidscotson
Copy link

This PR fixes the issue for us.

We hit the error because a student user had been able to send a message due to another bug #112 and then the scheduled task for sending emails failed with the error message mentioned here. It was in code that runs when the user sending the email does not have the viewgroupusers capability.

Giving that capability to the user that is causing the error is a workaround that might be useful to get past the error in some situations, but this PR fixes the root cause.

opitz added a commit to ucl-isd/lsuce-block_quickmail that referenced this pull request Oct 28, 2025
- revoked my previous changes
- included PR lsuonline#110
@sarahjcotton
Copy link

Hello @rrusso could this please be merged? We have a number of sites with this issue that would benefit from the fix being made available.

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.

Send task stuck with NULL user->id

4 participants