Hi Sergey,
When I used a entity field to take all records of specifical entity, in the first level it works good, below the screenshot:
But when I have a Parent and I am in the second level all the records of application shows in my page ..
I am always in the same projet for information..
But in second level il presents all records for all projects..
Is possible that shows like the first level?? Only the records concerning the project activated
Thanks
Miguel Sousa
Error with field entity records in second level
-
- Posts: 19
- Joined: 30 Jun 2016, 17:43
- Name: Miguel SOUSA
- Location: Paris
- Company Name: In Extenso
- support
- Site Admin
- Posts: 6222
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Error with field entity records in second level
Can you provide screenshot from Application structure and tell me which Entities you try to relate.
I have to understand levels for sub-entities
I have to understand levels for sub-entities
-
- Posts: 19
- Joined: 30 Jun 2016, 17:43
- Name: Miguel SOUSA
- Location: Paris
- Company Name: In Extenso
Re: Error with field entity records in second level
Hi Sergey,
Below my structure of entities: So I am inside of "Congrés" then I go to "Billets" or "Interventions" and I have the field type "entities" with "Stands" ..
I can chose all "stands" that are inside of "Congrés" works very well!!
If I go to "Resa_Hotels" sub-entities " Chambres" and I use the same fiels type "entities" with "Stands", we gives me not only the stands inside of "Congrés" but all "stands" of all "congrés"..
You know what I mean?
Thanks
Miguel
Below my structure of entities: So I am inside of "Congrés" then I go to "Billets" or "Interventions" and I have the field type "entities" with "Stands" ..
I can chose all "stands" that are inside of "Congrés" works very well!!
If I go to "Resa_Hotels" sub-entities " Chambres" and I use the same fiels type "entities" with "Stands", we gives me not only the stands inside of "Congrés" but all "stands" of all "congrés"..
You know what I mean?
Thanks
Miguel
- support
- Site Admin
- Posts: 6222
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Error with field entity records in second level
Yes, now it's clear and added in plan to fix this issue.
- support
- Site Admin
- Posts: 6222
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Error with field entity records in second level
Replace attached file to:
includes\classes\fieldstypes\fieldtype_entity.php
let me know if problem is fixed
includes\classes\fieldstypes\fieldtype_entity.php
let me know if problem is fixed
- Attachments
-
- fieldtype_entity.php
- (9.9 KiB) Downloaded 663 times
-
- Posts: 19
- Joined: 30 Jun 2016, 17:43
- Name: Miguel SOUSA
- Location: Paris
- Company Name: In Extenso
Re: Error with field entity records in second level
Hi Sergey,
I continue with all records of all projects in "Congrès>Resa_Hotel>"Chambres"!!
But you have fixed another issue, when I have field type entity "Imputations" in a sub-entity " Chambres" I have only the records that belongs to a specific entity " Congrès>Resa_Hotels>Chambres>Imputations".. IS OK..
Before I have all records ("Congrès>Resa_Hotels>Chambres>Imputations") of all projects inside of my typefield "Entity" in "Chambres"
I hope you understand what i mean..
Thanks
Miguel SOUSA
I continue with all records of all projects in "Congrès>Resa_Hotel>"Chambres"!!
But you have fixed another issue, when I have field type entity "Imputations" in a sub-entity " Chambres" I have only the records that belongs to a specific entity " Congrès>Resa_Hotels>Chambres>Imputations".. IS OK..
Before I have all records ("Congrès>Resa_Hotels>Chambres>Imputations") of all projects inside of my typefield "Entity" in "Chambres"
I hope you understand what i mean..
Thanks
Miguel SOUSA
- support
- Site Admin
- Posts: 6222
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Error with field entity records in second level
Yes, I understand and I can say this way is not supported at the moment.
At the moment you have complex Entities tree and if you try link entities from different branches deep we don't know which parent level we have to check. Yes, in page view it's clear:) but in code we have to have some special configuration where we set which parents we have to check, some think like this.
At the moment we check only first parent.
Fore example if we have:
level 0: Projects
-level 1: Tasks
then if we have Entity field it task we will check Projects
but if we have
level 0: Projects
-level 1: Tasks
--lever 2: Job
and if Job have Entity field then we check parent Task but not Project because Tasks is parent for Job and we have Tasks ID in Job record
This is how current core works.
So as suggestion, try to make Entities tree more simple, or use the same level branch to check the same parent.
At the moment you have complex Entities tree and if you try link entities from different branches deep we don't know which parent level we have to check. Yes, in page view it's clear:) but in code we have to have some special configuration where we set which parents we have to check, some think like this.
At the moment we check only first parent.
Fore example if we have:
level 0: Projects
-level 1: Tasks
then if we have Entity field it task we will check Projects
but if we have
level 0: Projects
-level 1: Tasks
--lever 2: Job
and if Job have Entity field then we check parent Task but not Project because Tasks is parent for Job and we have Tasks ID in Job record
This is how current core works.
So as suggestion, try to make Entities tree more simple, or use the same level branch to check the same parent.
-
- Posts: 19
- Joined: 30 Jun 2016, 17:43
- Name: Miguel SOUSA
- Location: Paris
- Company Name: In Extenso
Re: Error with field entity records in second level
I understand..
I gone simplify the tree or put the "Jobs" in the first level like that I have parent " Projects" to check..
Thanks for your proposal
Miguel
I gone simplify the tree or put the "Jobs" in the first level like that I have parent " Projects" to check..
Thanks for your proposal
Miguel