New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#29026 [Form] fix: selectForForms issue for manage case where objectdesc don't need to reset #29494
base: 19.0
Are you sure you want to change the base?
#29026 [Form] fix: selectForForms issue for manage case where objectdesc don't need to reset #29494
Conversation
… objectdesc don't need to reset
Strange, you should not need his. |
Array
) |
The method selectForForm is called with a parameter objectfield = control@digiquali:fk_productlot But into the data you sent me, there is no field "fk_productlot" defined into ->fields of the class control@digiquali, so no way to guess the name of the class you want in the combo. So having the error is the expected behaviour. There is a bad consistency between the code that mention "control@digiquali:fk_productlot" and the code into the class "control@digiquali" that miss "fk_productlot". If you don't want to use the definition found into ->fields, the property "objectfield" must remain empty. In such a case, the selectForForm will use only the parameter objectdesc (for exemple ProductLot) to know which class to use. |
commonobject.class.php - L7726 / L7727 In my case, with the use of element_element, I don't want to modify the object->fields of my object. |
I still don't understand. You want to have an object that has a field that is a link to the property fk_productlot of the class control@digiquali but you don't want to have this property ? in your case, $key during the call of selectForForms is coming from where ? What is the class that is calling selectForForms ? Is it custom code that is calling selectForForms ? From where is coming the string "fk_productlot" propagated to selectForForms() ? Can you try this fix: and this one |
In my case, I'm using the element_element table to add a link to the productlot table
In the code above, you can only link an object that has the link in its table, e.g. fk_productlot or with extrafields. However, these two cases only manage 1 - 1 cardinality, whereas with the element_element table you can manage 1 - N cardinality.