After going through the ForestAdmin install steps, I see all the collections in Forest but no data.
Expected behavior
See the data related to the selected collection
Actual behavior
“Cannot reach your data” error message
Failure Logs
Started OPTIONS "/forest/User?fields%5BUser%5D=authentication_token%2Ccreated_at%2Cemail%2Cfirst_name%2Cid%2Cip_address%2Clast_name%2Cpassword_digest%2Csuperuser%2Ctenant%2Cupdated_at%2Cuser_agent&fields%5Btenant%5D=name&page%5Bnumber%5D=1&page%5Bsize%5D=15&searchExtended=0&sort=-id&timezone=Europe%2FBrussels" for ::1 at 2021-02-08 15:23:05 +0100
Started GET "/forest/User?fields%5BUser%5D=authentication_token%2Ccreated_at%2Cemail%2Cfirst_name%2Cid%2Cip_address%2Clast_name%2Cpassword_digest%2Csuperuser%2Ctenant%2Cupdated_at%2Cuser_agent&fields%5Btenant%5D=name&page%5Bnumber%5D=1&page%5Bsize%5D=15&searchExtended=0&sort=-id&timezone=Europe%2FBrussels" for ::1 at 2021-02-08 15:23:05 +0100
Processing by ForestLiana::UserSpace::UserController#index as JSON
Parameters: {"fields"=>{"User"=>"authentication_token,created_at,email,first_name,id,ip_address,last_name,password_digest,superuser,tenant,updated_at,user_agent", "tenant"=>"name"}, "page"=>{"number"=>"1", "size"=>"15"}, "searchExtended"=>"0", "sort"=>"-id", "timezone"=>"Europe/Brussels", "collection"=>"User"}
No template found for ForestLiana::UserSpace::UserController#index, rendering head :no_content
Completed 204 No Content in 1ms (ActiveRecord: 0.0ms | Allocations: 667)
Started OPTIONS "/forest/User/count?fields%5BUser%5D=authentication_token%2Ccreated_at%2Cemail%2Cfirst_name%2Cid%2Cip_address%2Clast_name%2Cpassword_digest%2Csuperuser%2Ctenant%2Cupdated_at%2Cuser_agent&fields%5Btenant%5D=name&searchExtended=0&timezone=Europe%2FBrussels" for ::1 at 2021-02-08 15:23:05 +0100
Started GET "/forest/User/count?fields%5BUser%5D=authentication_token%2Ccreated_at%2Cemail%2Cfirst_name%2Cid%2Cip_address%2Clast_name%2Cpassword_digest%2Csuperuser%2Ctenant%2Cupdated_at%2Cuser_agent&fields%5Btenant%5D=name&searchExtended=0&timezone=Europe%2FBrussels" for ::1 at 2021-02-08 15:23:05 +0100
Processing by ForestLiana::UserSpace::UserController#count as HTML
Parameters: {"fields"=>{"User"=>"authentication_token,created_at,email,first_name,id,ip_address,last_name,password_digest,superuser,tenant,updated_at,user_agent", "tenant"=>"name"}, "searchExtended"=>"0", "timezone"=>"Europe/Brussels", "collection"=>"User"}
(0.2ms) SELECT COUNT(*) FROM "users"
Completed 200 OK in 2ms (Views: 0.1ms | ActiveRecord: 0.2ms | Allocations: 1275)
Context
Please provide any relevant information about your setup.
Hi @jbescoyez !
You have Cannot reach your data displayed ?
The logs you shared are not error logs, do you have any other log ? What about your browser logs ?
Actually it should, can you try changing mount ForestLiana::Engine => '/forest' to mount ForestLiana::Engine => '/forest', defaults: { format: 'json' } in your routes.rb ?
Thank you. It solved the problem but another one arose.
Now, I get the following error:
Records Index error: undefined local variable or method `object' for #<ForestLiana::UserSpace::DocumentSerializer:0x00007ff83db0cfd8>
Did you mean? object_id
/Users/johndoe/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/forest_liana-5.4.3/app/serializers/forest_liana/serializer_factory.rb:63:in `type'
/Users/johndoe/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/jsonapi-serializers-1.0.1/lib/jsonapi-serializers/serializer.rb:406:in `serialize_primary'
/Users/johndoe/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/jsonapi-serializers-1.0.1/lib/jsonapi-serializers/serializer.rb:438:in `block in serialize_primary_multi'
/Users/johndoe/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/jsonapi-serializers-1.0.1/lib/jsonapi-serializers/serializer.rb:438:in `map'
/Users/johndoe/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/jsonapi-serializers-1.0.1/lib/jsonapi-serializers/serializer.rb:438:in `serialize_primary_multi'
/Users/johndoe/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/jsonapi-serializers-1.0.1/lib/jsonapi-serializers/serializer.rb:321:in `serialize'
/Users/johndoe/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/forest_liana-5.4.3/app/controllers/forest_liana/application_controller.rb:46:in `serialize_models'
/Users/johndoe/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/forest_liana-5.4.3/app/controllers/forest_liana/resources_controller.rb:227:in `render_jsonapi'
/Users/johndoe/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/forest_liana-5.4.3/app/controllers/forest_liana/resources_controller.rb:36:in `block (2 levels) in index'
...
Hi @jbescoyez, sorry we delayed this topic, waiting for a dedicated Rails developer to join the team.
As we didn’t find the right teammate (yet), I think we’ll have to prioritise the investigations about this issue and have a look at it next week.
Hi @jbescoyez, the team is still looking for the appropriate solution here.
There is no easy win, but we are getting closer to decide how to prevent this conflict.
We are currently working on it. I opened a PR available here that still need some work in order to be fully operational. It might also introduce a breaking change, meaning it’ll be available in the beta release, hopefully this week.
You can definitely try it out though, using the github path or by cloning the forest rails repo and installing the gem via