The Git Hang and the Admin/Mod user Accs Oops Error Page Error

Let me backtrack… what I was doing there was trying to change the admin preferences in the hope that the code which throws the exception wouldn’t need to run.

But what we really want is to see if there’s a code bug which needs fixing, or something odd in your database which shouldn’t be there. Or indeed both.

The backtrace leads to this code in app/serializers/current_user_serializer.rb

  def has_new_upcoming_changes
    last_visited = object.custom_fields["last_visited_upcoming_changes_at"]
    return false if last_visited.blank? && object.created_at < Discourse.site_creation_date + 1.hour
    cutoff = last_visited.present? ? Time.zone.parse(last_visited) : object.created_at
    UpcomingChangeEvent.added.not_backfilled.where("created_at > ?", cutoff).exists?
  end

One could run a data explorer query to see what value of last_visited_upcoming_changes_at your admin accounts have.

SELECT 
    ucf.id AS custom_field_id, 
    ucf.user_id, 
    u.username,
    ucf.name, 
    ucf.value 
FROM user_custom_fields ucf
INNER JOIN users u ON u.id = ucf.user_id
WHERE ucf.name = 'last_visited_upcoming_changes_at'
  AND u.admin = true

and that might be fruitful. In my case (recently updated to v2026.7.3) it’s just a date string, which I think it should be.