# Can not access to some data's table & error Related Data

**URL:** <https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973>\
**Category:** Help me!\
**Created:** [January 7, 2022, 1:54pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973 "2022-01-07T13:54:23Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![JOOMBO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/joombo/32/1828_2.png) [@JOOMBO](https://community.forestadmin.com/u/JOOMBO)\
**Post date:** [January 7, 2022, 1:54pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/1 "2022-01-07T13:54:23Z")

</div>

check the video =\> [https://streamable.com/k2p55q](https://streamable.com/k2p55q)

## Failure Logs

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/e/e7678f7b98242012d5c0d11e98e744f3dcdea69e.png)

## Context

> Please provide in this **mandatory section** , the relevant information about your configuration:

- Project name: Joombo
- Team name: Thomas EUDE / Operations
- Environment name: Production
- Agent type & version: Admin

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [January 7, 2022, 2:45pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/2 "2022-01-07T14:45:02Z")

</div>

Hello @JOOMBO,

Could you please share with us the details about the query that is failing (request and response)? You’ll be able to see it in the network tab.

I’m not sure to understand what went wrong with only this log.

Thanks

---

<div class="post-metadata">

**Author:** ![JOOMBO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/joombo/32/1828_2.png) [@JOOMBO](https://community.forestadmin.com/u/JOOMBO)\
**Post date:** [January 8, 2022, 8:35pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/3 "2022-01-08T20:35:26Z")

</div>

hello Guillaume,

Are you waiting something like that ?

1. Request URL:

[https://www.joombo.co/forest/CompanyProfile/333/relationships/views/count?fields[View]=id%2Cname%2Conboarding\_customers%2Ccounter\_view%2Cdefault\_view%2Cprofile\_view%2Ccompany\_profile%2Cfooter%2Ccreated\_at%2Cupdated\_at%2Cdesign%2Cslug&fields[profile\_view]=name&fields[company\_profile]=company&fields[footer]=id&fields[design]=id&timezone=America%2FLima](https://www.joombo.co/forest/CompanyProfile/333/relationships/views/count?fields%5BView%5D=id%2Cname%2Conboarding_customers%2Ccounter_view%2Cdefault_view%2Cprofile_view%2Ccompany_profile%2Cfooter%2Ccreated_at%2Cupdated_at%2Cdesign%2Cslug&fields%5Bprofile_view%5D=name&fields%5Bcompany_profile%5D=company&fields%5Bfooter%5D=id&fields%5Bdesign%5D=id&timezone=America%2FLima)

1. Request Method:

GET

1. Status Code:

500 Internal Server Error

1. Remote Address:

3.226.182.14:443

1. Referrer Policy:

origin

1. Response HeadersView source

2. Access-Control-Allow-Credentials:

true

1. Access-Control-Allow-Methods:

GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS

1. Access-Control-Allow-Origin:

[https://app.forestadmin.com](https://app.forestadmin.com)

1. Access-Control-Expose-Headers

2. Access-Control-Max-Age:

86400

1. Cache-Control:

no-cache

1. Connection:

keep-alive

1. Content-Type:

application/json

1. Date:

Sat, 08 Jan 2022 20:31:46 GMT

1. Referrer-Policy:

strict-origin-when-cross-origin

1. Server:

Cowboy

1. Strict-Transport-Security:

max-age=31536000; includeSubDomains

1. Transfer-Encoding:

chunked

1. Vary:

Origin

1. Via:

1.1 vegur

1. X-Content-Type-Options:

nosniff

1. X-Download-Options:

noopen

1. X-Frame-Options:

SAMEORIGIN

1. X-Permitted-Cross-Domain-Policies:

none

1. X-Request-Id:

2e253539-aa03-495b-b9e0-5e49dd495dd8

1. X-Runtime:

0.003287

1. X-Xss-Protection:

1; mode=block

1. Request HeadersView source

2. Accept:

application/json

1. Accept-Encoding:

gzip, deflate, br

1. Accept-Language:

en-GB,en-US;q=0.9,en;q=0.8,fr;q=0.7

1. Authorization:

Edited

1. Connection:

keep-alive

1. Content-Type:

application/json

1. Host:

[www.joombo.co](http://www.joombo.co)

1. Origin:

[https://app.forestadmin.com](https://app.forestadmin.com)

1. Referer:

[https://app.forestadmin.com/](https://app.forestadmin.com/)

1. sec-ch-ua:

" Not;A Brand";v=“99”, “Google Chrome”;v=“97”, “Chromium”;v=“97”

1. sec-ch-ua-mobile:

?0

1. sec-ch-ua-platform:

“macOS”

1. Sec-Fetch-Dest:

empty

1. Sec-Fetch-Mode:

cors

1. Sec-Fetch-Site:

cross-site

1. User-Agent:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [January 10, 2022, 7:39am UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/4 "2022-01-10T07:39:31Z")

</div>

Ok, thanks for your reply.

So, for what I can see here, your agent is returning a 500 error to the call on `GET https://www.joombo.co/forest/CompanyProfile/333/relationships/views/count`.

Do you have any detail in the response’s body?

Also, as your agent is returning this error, can you check if you have any logs on your agent? It would help figure out the origin of this error.

---

<div class="post-metadata">

**Author:** ![JOOMBO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/joombo/32/1828_2.png) [@JOOMBO](https://community.forestadmin.com/u/JOOMBO)\
**Post date:** [January 11, 2022, 9:21pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/5 "2022-01-11T21:21:29Z")

</div>

No detail in the response’s body

For the logs that I have on my app, here you can see :

632 \<158\>1 2022-01-11T21:10:17.508745+00:00 heroku router - - at=info method=GET path="/forest/CompanyProfile/333/relationships/views/count?fields%5BView%5D=id%2Cname%2Conboarding\_customers%2Ccounter\_view%2Cdefault\_view%2Cprofile\_view%2Ccompany\_profile%2Cfooter%2Ccreated\_at%2Cupdated\_at%2Cdesign%2Cslug&fields%5Bprofile\_view%5D=name&fields%5Bcompany\_profile%5D=company&fields%5Bfooter%5D=id&fields%5Bdesign%5D=id&timezone=America%2FLima" host=[www.joombo.co](http://www.joombo.co/) request\_id=7034ebf8-a3fb-4fb5-814c-0fc7791f4459 fwd=“181.66.90.235” dyno=web.1 connect=0ms service=9ms status=500 bytes=750 protocol=https

Go to the log: [https://api.heroku.com/myapps/app186713791@heroku.com/addons/logentries](https://api.heroku.com/myapps/app186713791@heroku.com/addons/logentries)

You are receiving this email because your Logentries alarm “error\_500”  
has been triggered.

Correlation ID: 862efc8d-e234-4c00-922e-7257698639ed

In context:  
2022-01-11 17:14:33.844 416 \<158\>1 2022-01-11T17:14:33.361482+00:00 heroku router - - at=info method=GET path="/magnet\_profiles/1276?4py8188mo9592285&utm\_source=joombo-support&utm\_medium=codeqr&utm\_campaign=2nd-p&utm\_content=fr&utm\_term=lther" host=[www.joombo.co](http://www.joombo.co/) request\_id=c3734c8b-63c3-4262-860e-3df90ff7f9b2 fwd=“80.215.36.192” dyno=web.1 connect=0ms service=103ms status=200 bytes=7804 protocol=https  
2022-01-11 17:14:34.458 325 \<158\>1 2022-01-11T17:14:33.987139+00:00 heroku router - - at=info method=GET path="/codemirror/mode/javascript/javascript.js" host=[www.joombo.co](http://www.joombo.co/) request\_id=1cdf1393-75e3-4a35-bffd-65bd56be7264 fwd=“80.215.36.192” dyno=web.1 connect=0ms service=1ms status=200 bytes=39060 protocol=https  
2022-01-11 17:49:39.805 696 \<134\>1 2022-01-11T17:49:04+00:00 app heroku-postgres - - source=DATABASE addon=postgresql-flexible-14288 sample#current\_transaction=134374 sample#db\_size=23826991bytes sample#tables=24 sample#active-connections=7 sample#waiting-connections=0 sample#index-cache-hit-rate=0.9974 sample#table-cache-hit-rate=0.99678 sample#load-avg-1m=0 sample#load-avg-5m=0 sample#load-avg-15m=0 sample#read-iops=0 sample#write-iops=0.30292 sample#tmp-disk-used=542765056 sample#tmp-disk-available=72436027392 sample#memory-total=4018284kB sample#memory-free=54080kB sample#memory-cached=3357124kB sample#memory-postgres=26268kB sample#wal-percentage-used=0.06576925128100947  
2022-01-11 18:39:32.973 313 \<158\>1 2022-01-11T18:39:32.44154+00:00 heroku router - - at=info method=GET path="/codemirror/lib/codemirror.js" host=[www.joombo.co](http://www.joombo.co/) request\_id=d30ef9c1-0e65-440a-98f3-becb6ecf9194 fwd=“46.211.101.59” dyno=web.1 connect=0ms service=6ms status=200 bytes=398977 protocol=https  
2022-01-11 19:11:11.889 311 \<158\>1 2022-01-11T19:11:11.421218+00:00 heroku router - - at=info method=GET path="/codemirror/lib/codemirror.js" host=[joombo.co](http://joombo.co/) request\_id=218cc437-adc3-4587-9de4-2918a6d5351f fwd=“92.184.118.154” dyno=web.1 connect=0ms service=7ms status=200 bytes=398977 protocol=https  
2022-01-11 19:11:12.102 369 \<158\>1 2022-01-11T19:11:11.658249+00:00 heroku router - - at=info method=GET path="/assets/application-072321194eef6ed8665e223f8d85a760cd146797a51257a33f39df15c72ba45a.css" host=[joombo.co](http://joombo.co/) request\_id=dabd3cad-e5c4-457b-844c-49755896e546 fwd=“92.184.118.154” dyno=web.1 connect=0ms service=2ms status=200 bytes=48991 protocol=https  
2022-01-11 19:23:27.832 676 \<158\>1 2022-01-11T19:23:27.347888+00:00 heroku router - - at=info method=GET path="/forest/CompanyProfile?timezone=America%2FLima&fields%5BCompanyProfile%5D=id%2Ccompany%2Cuser%2Cfirst\_name%2Clast\_name%2Cprofile\_picture\_blob%2Cprofile\_picture\_attachment%2Clanguage%2Conboarding%2Ccreated\_at%2Cupdated\_at&fields%5Bprofile\_picture\_attachment%5D=name&fields%5Bprofile\_picture\_blob%5D=filename&fields%5Buser%5D=email&page%5Bnumber%5D=1&page%5Bsize%5D=15&searchExtended=0&sort=-id" host=[www.joombo.co](http://www.joombo.co/) request\_id=f646702b-b663-4fb8-a66c-1111c04f51aa fwd=“181.66.90.235” dyno=web.1 connect=0ms service=265ms status=304 bytes=747 protocol=https  
2022-01-11 20:32:43.901 329 \<158\>1 2022-01-11T20:32:43.292015+00:00 heroku router - - at=info method=GET path="/packs/js/application-341c06991551bd9d8700.js" host=[www.joombo.co](http://www.joombo.co/) request\_id=d52fc613-e86b-4885-9cb3-a30a1bc2d1c8 fwd=“37.173.79.57” dyno=web.1 connect=0ms service=5ms status=200 bytes=288639 protocol=https  
2022-01-11 20:33:04.578 635 \<158\>1 2022-01-11T20:33:04.10596+00:00 heroku router - - at=info method=GET path="/forest/CompanyProfile/count?fields%5BCompanyProfile%5D=id%2Ccompany%2Cuser%2Cfirst\_name%2Clast\_name%2Cprofile\_picture\_blob%2Cprofile\_picture\_attachment%2Clanguage%2Conboarding%2Ccreated\_at%2Cupdated\_at&fields%5Buser%5D=email&fields%5Bprofile\_picture\_blob%5D=filename&fields%5Bprofile\_picture\_attachment%5D=name&searchExtended=0&timezone=America%2FLima" host=[www.joombo.co](http://www.joombo.co/) request\_id=479cbb7a-53ae-4ed6-a701-5e0b8d162652 fwd=“181.66.90.235” dyno=web.1 connect=0ms service=291ms status=304 bytes=747 protocol=https  
2022-01-11 20:37:56.081 387 \<158\>1 2022-01-11T20:37:55.546146+00:00 heroku router - - at=info method=GET path="/assets/font-awesome/fa-brands-400-c40f9aba3abc6fd5b0b28b1b125daa3b7bc43063955d456ae4d529705a6c975c.woff2" host=[www.joombo.co](http://www.joombo.co/) request\_id=cd59ce89-f419-471c-b20a-db1d657ef442 fwd=“37.165.6.38” dyno=web.1 connect=0ms service=1ms status=200 bytes=78683 protocol=https  
2022-01-11 21:10:17.982 632 \<158\>1 2022-01-11T21:10:17.508745+00:00 heroku router - - at=info method=GET path="/forest/CompanyProfile/333/relationships/views/count?fields%5BView%5D=id%2Cname%2Conboarding\_customers%2Ccounter\_view%2Cdefault\_view%2Cprofile\_view%2Ccompany\_profile%2Cfooter%2Ccreated\_at%2Cupdated\_at%2Cdesign%2Cslug&fields%5Bprofile\_view%5D=name&fields%5Bcompany\_profile%5D=company&fields%5Bfooter%5D=id&fields%5Bdesign%5D=id&timezone=America%2FLima" host=[www.joombo.co](http://www.joombo.co/) request\_id=7034ebf8-a3fb-4fb5-814c-0fc7791f4459 fwd=“181.66.90.235” dyno=web.1 connect=0ms service=9ms status=500 bytes=750 protocol=https

---

<div class="post-metadata">

**Author:** ![JOOMBO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/joombo/32/1828_2.png) [@JOOMBO](https://community.forestadmin.com/u/JOOMBO)\
**Post date:** [January 18, 2022, 3:58pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/6 "2022-01-18T15:58:05Z")

</div>

Hello Guillaume,

Please tell me if you need futher information

Thomas

---

<div class="post-metadata">

**Author:** ![morganperre](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/morganperre/32/1296_2.png) [@morganperre](https://community.forestadmin.com/u/morganperre)\
**Post date:** [January 19, 2022, 8:57am UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/7 "2022-01-19T08:57:50Z")

</div>

Hello @JOOMBO,

> [@JOOMBO](#):
>
> 632 \<158\>1 2022-01-11T21:10:17.508745+00:00 heroku router - - at=info method=GET path=“/forest/CompanyProfile/333/relationships/views/count?fields%5BView%5D=id%2Cname%2Conboarding\_customers%2Ccounter\_view%2Cdefault\_view%2Cprofile\_view%2Ccompany\_profile%2Cfooter%2Ccreated\_at%2Cupdated\_at%2Cdesign%2Cslug&fields%5Bprofile\_view%5D=name&fields%5Bcompany\_profile%5D=company&fields%5Bfooter%5D=id&fields%5Bdesign%5D=id&timezone=America%2FLima” host=[www.joombo.co](http://www.joombo.co/) request\_id=7034ebf8-a3fb-4fb5-814c-0fc7791f4459 fwd=“181.66.90.235” dyno=web.1 connect=0ms service=9ms status=500 bytes=750 protocol=https

Unfortunately this doesn’t give us much more insight on what cause the issue on your side. Do you have any other logs for the agent/server ?

If not could you try to reproduce this in development environment ?

Thanks for your response.

Morgan

---

<div class="post-metadata">

**Author:** ![JOOMBO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/joombo/32/1828_2.png) [@JOOMBO](https://community.forestadmin.com/u/JOOMBO)\
**Post date:** [January 19, 2022, 4:04pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/8 "2022-01-19T16:04:45Z")

</div>

Hello Morgan,

Sure, hope it can help you

Started GET “/forest/CompanyProfile/1/relationships/views/count?fields%5BView%5D=id%2Ccompany\_profile%2Ccounter\_view%2Ccreated\_at%2Cdefault\_view%2Cfooter%2Cname%2Conboarding\_customers%2Cprofile\_view%2Cupdated\_at%2Cslug%2Cdesign&fields%5Bcompany\_profile%5D=id&fields%5Bfooter%5D=id&fields%5Bprofile\_view%5D=name&fields%5Bdesign%5D=id&timezone=America%2FLima” for ::1 at 2022-01-19 11:02:33 -0500

Processing by ForestLiana::AssociationsController#count as JSON

Parameters: {“fields”=\>{“View”=\>“id,company\_profile,counter\_view,created\_at,default\_view,footer,name,onboarding\_customers,profile\_view,updated\_at,slug,design”, “company\_profile”=\>“id”, “footer”=\>“id”, “profile\_view”=\>“name”, “design”=\>“id”}, “timezone”=\>“America/Lima”, “collection”=\>“CompanyProfile”, “id”=\>“1”, “association\_name”=\>“views”}

[2022-01-19 11:02:33] Forest 🌳🌳🌳 Association Index Count error: undefined method `klass’ for nil:NilClass

> **More logs**
>
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activerecord-6.0.4.1/lib/active\_record/reflection.rb:788:in `source\_reflection’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activerecord-6.0.4.1/lib/active\_record/reflection.rb:987:in `derive\_class\_name’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activerecord-6.0.4.1/lib/active\_record/reflection.rb:165:in `class\_name’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activerecord-6.0.4.1/lib/active\_record/reflection.rb:767:in `klass’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/forest\_liana-6.0.5/app/services/forest\_liana/has\_many\_getter.rb:44:in `block in compute\_includes’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/forest\_liana-6.0.5/app/services/forest\_liana/has\_many\_getter.rb:42:in `select’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/forest\_liana-6.0.5/app/services/forest\_liana/has\_many\_getter.rb:42:in `compute\_includes’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/forest\_liana-6.0.5/app/services/forest\_liana/has\_many\_getter.rb:14:in `initialize’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/forest\_liana-6.0.5/app/controllers/forest\_liana/associations\_controller.rb:28:in `new’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/forest\_liana-6.0.5/app/controllers/forest\_liana/associations\_controller.rb:28:in `count’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_controller/metal/basic\_implicit\_render.rb:6:in `send\_action’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/abstract\_controller/base.rb:195:in `process\_action’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_controller/metal/rendering.rb:30:in `process\_action’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/abstract\_controller/callbacks.rb:42:in `block in process\_action’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activesupport-6.0.4.1/lib/active\_support/callbacks.rb:135:in `run\_callbacks’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/abstract\_controller/callbacks.rb:41:in `process\_action’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_controller/metal/rescue.rb:22:in `process\_action’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_controller/metal/instrumentation.rb:33:in `block in process\_action’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activesupport-6.0.4.1/lib/active\_support/notifications.rb:180:in `block in instrument’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activesupport-6.0.4.1/lib/active\_support/notifications/instrumenter.rb:24:in `instrument’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activesupport-6.0.4.1/lib/active\_support/notifications.rb:180:in `instrument’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_controller/metal/instrumentation.rb:32:in `process\_action’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_controller/metal/params\_wrapper.rb:245:in `process\_action’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activerecord-6.0.4.1/lib/active\_record/railties/controller\_runtime.rb:27:in `process\_action’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/abstract\_controller/base.rb:136:in `process’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionview-6.0.4.1/lib/action\_view/rendering.rb:39:in `process’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_controller/metal.rb:190:in `dispatch’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_controller/metal.rb:254:in `dispatch’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/routing/route\_set.rb:50:in `dispatch’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/routing/route\_set.rb:33:in `serve’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/journey/router.rb:49:in `block in serve’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/journey/router.rb:32:in `each’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/journey/router.rb:32:in `serve’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/routing/route\_set.rb:834:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-cors-1.1.1/lib/rack/cors.rb:100:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/railties-6.0.4.1/lib/rails/engine.rb:527:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/railties-6.0.4.1/lib/rails/railtie.rb:190:in `public\_send’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/railties-6.0.4.1/lib/rails/railtie.rb:190:in `method\_missing’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/routing/mapper.rb:19:in `block in class:Constraints’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/routing/mapper.rb:48:in `serve’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/journey/router.rb:49:in `block in serve’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/journey/router.rb:32:in `each’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/journey/router.rb:32:in `serve’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/routing/route\_set.rb:834:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-2.2.3/lib/rack/tempfile\_reaper.rb:15:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-2.2.3/lib/rack/conditional\_get.rb:27:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/http/content\_security\_policy.rb:18:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/cookies.rb:654:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activerecord-6.0.4.1/lib/active\_record/migration.rb:567:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/callbacks.rb:27:in `block in call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activesupport-6.0.4.1/lib/active\_support/callbacks.rb:101:in `run\_callbacks’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/callbacks.rb:26:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/executor.rb:14:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/actionable\_exceptions.rb:18:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/debug\_exceptions.rb:32:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/web-console-4.0.4/lib/web\_console/middleware.rb:132:in `call\_app’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/web-console-4.0.4/lib/web\_console/middleware.rb:28:in `block in call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/web-console-4.0.4/lib/web\_console/middleware.rb:17:in `catch’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/web-console-4.0.4/lib/web\_console/middleware.rb:17:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/show\_exceptions.rb:33:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/railties-6.0.4.1/lib/rails/rack/logger.rb:37:in `call\_app’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/railties-6.0.4.1/lib/rails/rack/logger.rb:26:in `block in call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activesupport-6.0.4.1/lib/active\_support/tagged\_logging.rb:80:in `block in tagged’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activesupport-6.0.4.1/lib/active\_support/tagged\_logging.rb:28:in `tagged’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/activesupport-6.0.4.1/lib/active\_support/tagged\_logging.rb:80:in `tagged’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/railties-6.0.4.1/lib/rails/rack/logger.rb:26:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/quiet\_assets.rb:13:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/remote\_ip.rb:81:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/request\_id.rb:27:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-2.2.3/lib/rack/method\_override.rb:24:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/executor.rb:14:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/static.rb:126:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/actionpack-6.0.4.1/lib/action\_dispatch/middleware/host\_authorization.rb:82:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-cors-1.1.1/lib/rack/cors.rb:100:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/webpacker-4.3.0/lib/webpacker/dev\_server\_proxy.rb:23:in `perform\_request’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/rack-proxy-0.6.5/lib/rack/proxy.rb:57:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/railties-6.0.4.1/lib/rails/engine.rb:527:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/puma-4.3.6/lib/puma/configuration.rb:228:in `call’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/puma-4.3.6/lib/puma/server.rb:713:in `handle\_request’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/puma-4.3.6/lib/puma/server.rb:472:in `process\_client’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/puma-4.3.6/lib/puma/server.rb:328:in `block in run’
> 
> /Users/thomaseude/.gem/ruby/2.6.0/gems/puma-4.3.6/lib/puma/thread\_pool.rb:134:in `block in spawn\_thread’
> 
> Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms | Allocations: 1390)

---

<div class="post-metadata">

**Author:** ![morganperre](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/morganperre/32/1296_2.png) [@morganperre](https://community.forestadmin.com/u/morganperre)\
**Post date:** [January 20, 2022, 12:28pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/9 "2022-01-20T12:28:56Z")

</div>

Hello @JOOMBO,

The issue seems to comes from [active\_record reflect\_on\_all\_associations mechanism](https://apidock.com/rails/v6.1.3.1/ActiveRecord/Reflection/ClassMethods/reflect_on_all_associations) not working as intended.

From your logs I see that your using `forest_liana version 6.0.5` and `active_record version 6.0.4.1`.

- What version of ruby on rails do you use ?
- Can you share the **CompanyProfile** model and also the **View** one ? I want to check your models associations.

Thanks in advance for your time.

Kind regards,  
Morgan

---

<div class="post-metadata">

**Author:** ![JOOMBO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/joombo/32/1828_2.png) [@JOOMBO](https://community.forestadmin.com/u/JOOMBO)\
**Post date:** [January 20, 2022, 5:11pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/10 "2022-01-20T17:11:42Z")

</div>

Hello,

version of rails =\> ‘rails’, ‘~\> 6.0.3’, ‘\>= 6.0.3.2’

**Model View**  
class View \< ApplicationRecord  
extend FriendlyId  
friendly\_id :slug\_candidates, :use =\> :slugged

belongs\_to :company\_profile

has\_one :profile\_view, dependent: :destroy  
has\_one :footer, dependent: :destroy  
has\_one :design, dependent: :destroy

has\_many :stat\_views, dependent: :destroy  
has\_many :magnet\_profiles  
has\_many :magnet, through: :magnet\_profile  
has\_many :links, dependent: :destroy

validates :name, presence: true  
validates :name, length: { in: 1…200 }  
validates :counter\_view, numericality: true

after\_create :create\_all\_after\_view\_creation  
before\_destroy :change\_magnet\_profile\_view

def change\_magnet\_profile\_view  
self.magnet\_profiles.each do |mp|  
self.company\_profile.views.where(default\_view: true).length == 0 ? mp.update(view: nil) : mp.update(view: self.company\_profile.views.where(default\_view: true).first)  
end  
end

def create\_all\_after\_view\_creation  
Footer.create(view: self)  
ProfileView.create(name: “#{self.company\_profile.first\_name.capitalize} #{self.company\_profile.last\_name.capitalize}”, company: self.company\_profile.company, view: self)  
Link.create(view: self)  
Design.create(view: self)  
end

def slug\_candidates  
[:name, [:name, :id]]  
end  
end

**Model CompanyProfile**  
class CompanyProfile \< ApplicationRecord  
belongs\_to :user

has\_many :views, dependent: :destroy

has\_one\_attached :profile\_picture

validates :first\_name, :last\_name, :company, presence: true  
validates :first\_name, :last\_name, :company, length: { in: 1…20 }

before\_create :default\_if\_empty  
after\_create :view\_creation

def default\_if\_empty  
self.first\_name == “” ? “Stranger” : self.first\_name.capitalize  
self.last\_name == “” ? “Thing” : self.last\_name.capitalize  
self.company == “” ? “Netflix” : self.company.capitalize  
end

def view\_creation  
company\_profile = self  
view\_created = View.create(company\_profile: company\_profile, name:“My first view”, counter\_view: 0, default\_view: true)  
end

end

Thanks for your help

---

<div class="post-metadata">

**Author:** ![JOOMBO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/joombo/32/1828_2.png) [@JOOMBO](https://community.forestadmin.com/u/JOOMBO)\
**Post date:** [January 25, 2022, 3:28pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/11 "2022-01-25T15:28:51Z")

</div>

Hello La team forest,

Is this piece of information hep you ?

Thomas

---

<div class="post-metadata">

**Author:** ![JOOMBO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/joombo/32/1828_2.png) [@JOOMBO](https://community.forestadmin.com/u/JOOMBO)\
**Post date:** [January 28, 2022, 3:35pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/12 "2022-01-28T15:35:57Z")

</div>

Hello @morganperre, I’d like your help 🙏

---

<div class="post-metadata">

**Author:** ![morganperre](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/morganperre/32/1296_2.png) [@morganperre](https://community.forestadmin.com/u/morganperre)\
**Post date:** [January 31, 2022, 8:33am UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/13 "2022-01-31T08:33:35Z")

</div>

Hello @JOOMBO,

Sorry for the delay. I’m still unable to reproduce the issue.

I’ll transfer the ticket to a colleague that is expert of the Rails stack. (He should get back to you in a few hours)

Just a small question, could you update to the latest major `version 7.4.5` ?

Kind regards,  
Morgan

---

<div class="post-metadata">

**Author:** ![matthv](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/matthv/32/3269_2.png) [@matthv](https://community.forestadmin.com/u/matthv)\
**Post date:** [January 31, 2022, 9:42am UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/14 "2022-01-31T09:42:17Z")

</div>

Hello @JOOMBO 👋

Could you also share the StatView Model definition ?

---

<div class="post-metadata">

**Author:** ![JOOMBO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/joombo/32/1828_2.png) [@JOOMBO](https://community.forestadmin.com/u/JOOMBO)\
**Post date:** [January 31, 2022, 9:11pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/15 "2022-01-31T21:11:02Z")

</div>

@morganperre, I update Forest to 7.4.5 but it doesn’t work

@matthv For StatView Model, here it is :  
class StatView \< ApplicationRecord  
belongs\_to :view

end

Is it strange that it works well for others relation I have in my app

Thanks for your help 🙏

---

<div class="post-metadata">

**Author:** ![matthv](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/matthv/32/3269_2.png) [@matthv](https://community.forestadmin.com/u/matthv)\
**Post date:** [February 1, 2022, 9:39am UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/16 "2022-02-01T09:39:28Z")

</div>

First I would like to debug the 404 error.  
Does the problem occur in both environments (dev/prod)?

In the development environment, could you drop the .forestadmin-schema.json and restart your server ?

Does the StatView model work well outside forestadmin?

Also, when you run this command, can you confirm that you have some records in your model?

```javascript
rails console
StatView::all

```

---

<div class="post-metadata">

**Author:** ![JOOMBO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/joombo/32/1828_2.png) [@JOOMBO](https://community.forestadmin.com/u/JOOMBO)\
**Post date:** [February 2, 2022, 10:04pm UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/17 "2022-02-02T22:04:56Z")

</div>

Hello @matthv,

Yes problem happen on development and production

In dev, I drop et restart server with rails s. Unfortunately, it doesn’t work !

Outside ForestAdmin, I don’t have any problem

I confirm rails c and StatView:alll work well

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/b/b2c3f60b2f46c71dcff3f5dadb942a8862f9d4c3.jpeg)

The problem looks more on Company Profiles related to View

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/e/e6167a02598c928df2ff3b916f72b1ae805c69e7.png)

Thanks a lot for your help !

---

<div class="post-metadata">

**Author:** ![matthv](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/matthv/32/3269_2.png) [@matthv](https://community.forestadmin.com/u/matthv)\
**Post date:** [February 3, 2022, 10:37am UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/18 "2022-02-03T10:37:38Z")

</div>

I’m pretty sure the issue comes from an association model.

I see there is a typo in the View Model file.

> [@JOOMBO](#):
>
> has\_many :magnet\_profiles  
> has\_many :magnet, through: :magnet\_profile

Could you change this line ?

```javascript
has_many :magnet, through: :magnet_profiles ('s' missing)

```

---

<div class="post-metadata">

**Author:** ![JOOMBO](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/joombo/32/1828_2.png) [@JOOMBO](https://community.forestadmin.com/u/JOOMBO)\
**Post date:** [February 4, 2022, 8:03am UTC](https://community.forestadmin.com/t/can-not-access-to-some-datas-table-error-related-data/3973/19 "2022-02-04T08:03:29Z")

</div>

Great @matthv

It works in dev’ and prod now !

Thanks a lot 🙂
