I want to add a file attachment field (Required) in the user registration form of the listinghive theme. I have added a custom code using a code snippet in the child theme. I am getting the error that the 'id is required even if I have already uploaded the file.
Unfortunately there’s no simple snippet for this in the current version, attachments must be assigned to some user ID (the user ID field is required for the Attachment model) but it’s not available on registration. A possible solution is to upload the file temporarily somewhere, and using it in the user register action, saving it for a newly created user profile.
I recommend using a custom Attachment attribute for vendors if this attachment is meant for vendors, they will not be able to save profile form or add a listing without uploading the attachment in this case, and code changes will not be required.
Please try adding vendor-specific fields with attachment type in Vendors/Attributes (if you mark them as Editable and Required, then users who attempt to list something will have to fill them in for their profile).
We checked this issue from our side, and it seems okay.
Please disable third-party plugins and customizations (if there are any) and check if this issue persists. If you use a caching plugin, ensure that caching is disabled for logged-in users.
Also, please check in more detail the CSS or PHP snippets you have added; there may be a conflict with them.