Upgrade to forest_liana gem 7.0 issue

If you need a fix right now, yeah it’s the culprit. Otherwise, we have found a fix and there will be soon a fix released :wink:

1 Like

Awesome, thanks @vince! Regarding issue #1 (User / month chart with no data available), is it related?

For additional info, here is the SQL query:

Thanks.

Ok, I found something interesting. If I add a filter to the chart (created_at is present), then it works! Not sure why.

Hello @nico_lrx

Do you use the paranoid gem in your rails application ?

Hello @matthv, no I don’t use the paranoid gem.

I can’t reproduce the issue on my end.
However I just added a fix on a branch to remove any orders on the model.
It’s useless for the charts.

Could you try with this branch?
Just edit your Gemfile like this:

gem 'forest_liana', git: 'https://github.com/ForestAdmin/forest-rails.git', branch: 'fix/remove_sort_on_charts'

then run

bundle install

Tell me if it works on your side :pray:

Hi @matthv, unfortunately the new Gem branch doesn’t work neither (same error).

I’m sorry that it doesn’t work, could you share your model please ? :pray:

Here it is:

class Comment < ApplicationRecord
	has_ancestry
	has_secure_token
	default_scope { order(created_at: :desc) }
	
	validates :content, presence: true
	validates :content, uniqueness: true
	validates :content, :exclusion => { :in => %w(<p></p>),
    :message => "Merci d'écrire un commentaire avant de le publier." }

	belongs_to :wp_post, counter_cache: true, optional: true
	belongs_to :dictee, counter_cache: true, optional: true
	belongs_to :quiz, counter_cache: true, optional: true
	belongs_to :user, optional: true

	def to_param
    token
  end
end
1 Like

Hello @nico_lrx

The patch has been released on the new version 7.7.3 :rocket:
It fixes the issue with the sort and removes unnecessary joins.

2 Likes