Skip to content
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

selectForForms: Error bad setup of field objectdescorig=Adherent, objectfield=partnership@partnership:fk_member, objectdesc=Adherent:adherents/class/adherent.class.php:1 #32113

Open
fmatias1 opened this issue Nov 26, 2024 · 1 comment
Labels
Bug This is a bug (something does not work as expected)

Comments

@fmatias1
Copy link

fmatias1 commented Nov 26, 2024

Bug

In the new association there is an error when displaying the membership list.

selectForForms: Error bad setup of field objectdescorig=Adherent, objectfield=partnership@partnership:fk_member, objectdesc=Adherent:adherents/class/adherent.class.php:1

I am sending a screenshot to see how it could be corrected.

Captura de pantalla 2024-11-26 a las 20 36 46

Dolibarr Version

20.0.1

Environment PHP

8.2.25

Environment Database

MySQL or MariaDB 10.5.26-MariaDB

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

@fmatias1 fmatias1 added the Bug This is a bug (something does not work as expected) label Nov 26, 2024
@ShohruxNizomovv
Copy link

It seems that you're facing an issue related to displaying the membership list in your association due to a bad setup in the field configuration.

The error message you provided:

selectForForms: Error bad setup of field objectdescorig=Adherent, objectfield=partnership@partnership:fk_member, objectdesc=Adherent:adherents/class/adherent.class.php:1

selectForForms: Error bad setup of field objectdescorig=Adherent, objectfield=partnership@partnership:fk_member, objectdesc=Adherent:adherents/class/adherent.class.php:1

indicates that there is an issue with how the Adherent (membership) object and its association with the partnership field are configured.

Here's what you can try to resolve the issue:

  1. Check the association setup:

The field partnership@partnership:fk_member seems to be linking the Adherent object with the partnership field.

Ensure that the fk_member field in the partnership object is correctly defined and is pointing to the correct Adherent class.

Check the object field setup in your database schema or object definitions to ensure the relationships are correctly configured.

  1. Review the adherent.class.php file:

The error mentions adherents/class/adherent.class.php:1, which suggests the issue could be in the Adherent class.

Open the adherent.class.php file and check for any errors or misconfigurations related to fields or object relations. It might be worth reviewing the constructor and methods to ensure the object setup is correct.

  1. Check the field definitions:

Double-check the field definitions in the database and make sure the field types match (e.g., foreign key relationships, field types like integer or varchar).

Ensure that any field values expected to be linked, such as the fk_member, are correctly populated.

  1. Verify the selectForForms function:

If this function is part of a custom setup, check how it is being used in the code and whether it’s interacting with the form and object fields properly.

  1. Testing:

After making changes to the configuration, test by viewing the membership list again and see if the error persists. You can also use debug logs to help identify where the issue is.

If you send the screenshot, I could provide more specific guidance on the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

2 participants