Error with some collections in the Dashboard

Since one or two weeks, some of my collections are not displaying anymore:

Feature(s) impacted

Dashboard collections

Observed behavior

Error displayed

Expected behavior

Should list the records of the collection.

Failure Logs

In console:

Context

  • Project name: lalanguefrancaise
  • Team name: Operations
  • Environment name: production
  • Database type: postgresql
  • Recent changes made on your end if any: NA

And, if you are self-hosting your agent:

  • Agent technology: (nodejs, php, ruby, python) gem ‘forest_liana’ v9.14.1
  • Ruby 3.4.4
  • Rails 7.2.2

Hello @nico_lrx

To better understand and investigate the issue, could you please share the following information:

  • The full response payload from the list request
  • Any customizations applied to the collection in your Forest Admin agent
  • The definition of your model in Rails

This will greatly help us reproduce and troubleshoot the problem :folded_hands:

Quiz collection request:

  1. Started GET “/forest/Quiz/count?fields%5BQuiz%5D=created_at%2Cid%2Cslug%2Ctitle%2Cupdated_at%2Cword%2Cwp_post%2Clevel%2Cauthor%2Clast_shared%2Caverage_score%2Cquiz_scores_count%2Cpremium%2Cquiz_category%2Csponsored_campaign%2Ctag_id%2Cfeatured&fields%5Bword%5D=id&fields%5Bwp_post%5D=id&fields%5Bauthor%5D=name&fields%5Bquiz_category%5D=name&fields%5Bsponsored_campaign%5D=id&timezone=Europe%2FBerlin” for 162.158.172.66 at 2025-06-16 13:17:07 +0200
  2. production.log — D, [2025-06-16T13:17:07.635383 #944961] DEBUG – sentry: [e7e8b57f-7cef-4eca-9f80-1b41ba8a6c03] [Tracing] Starting <http.server> transaction </forest/Quiz/count>
  3. production.log — D, [2025-06-16T13:17:07.635908 #944935] DEBUG – : [b8c6f4c0-5413-41cd-8e29-2acad4149952] e[1me[36mWord Load (2.2ms)e[0m e[1me[34mSELECT “words”.* FROM “words” WHERE “words”.“slug” = $1 LIMIT $2e[0m [[“slug”, “usufruiter”], [“LIMIT”, 1]]
  4. production.log — I, [2025-06-16T13:17:07.637204 #944961] INFO – : [e7e8b57f-7cef-4eca-9f80-1b41ba8a6c03] Processing by ForestLiana::UserSpace::QuizController#count as JSON
  5. production.log — I, [2025-06-16T13:17:07.637286 #944961] INFO – : [e7e8b57f-7cef-4eca-9f80-1b41ba8a6c03] Parameters: {“fields” => {“Quiz” => “created_at,id,slug,title,updated_at,word,wp_post,level,author,last_shared,average_score,quiz_scores_count,premium,quiz_category,sponsored_campaign,tag_id,featured”, “word” => “id”, “wp_post” => “id”, “author” => “name”, “quiz_category” => “name”, “sponsored_campaign” => “id”}, “timezone” => “Europe/Berlin”, “collection” => “Quiz”}
    Customization of Quiz:
    No customization of this collection.

Quiz model:

class Quiz < ApplicationRecord
	validates_uniqueness_of :slug
	
	belongs_to :wp_post, optional: true
	belongs_to :quiz_category, optional: true
	belongs_to :word, optional: true
	belongs_to :author, optional: true
	
	has_many :quiz_questions, :dependent => :destroy
	has_many :quiz_scores, :dependent => :destroy

	has_one :sponsored_campaign, :dependent => :destroy

	def to_param
		slug
	end

	def next
		if quiz_category.present?
    	Quiz.where(quiz_category_id: quiz_category.id).where("id > ?", id).order("id ASC").first || Quiz.first
		else
    	Quiz.where("id > ?", id).order("id ASC").first || Quiz.first
		end
  end

  def previous
		if quiz_category.present?
    	Quiz.where(quiz_category_id: quiz_category.id).where("id < ?", id).order("id DESC").first || Quiz.last
		else
    	Quiz.where("id < ?", id).order("id DESC").first || Quiz.last
		end
  end

end

Thank you.

1 Like

Thanks for sharing! I’ll get back to you as soon as I have a fix.

Version 9.14.4 is now released with the fix you confirmed during our call.
Really appreciate your help and feedback!

1 Like