Failed validation and fatal error on "Link" field

Created on 5 March 2018, almost 7 years ago
Updated 10 May 2024, 8 months ago

Hi I have content type In which my field is "Link" field. When I choose to make LINK field unique the the node submit form will start giving error reason being invalid column name due to code :

the out put query which runs during validation is below :

SELECT n.nid AS nid FROM {node_field_data} n INNER JOIN {node__field_url} f ON n.nid = f.entity_id WHERE (f.field_url_value IN (:db_condition_placeholder_0)) AND (n.type = :db_condition_placeholder_1)

The link field in DB is saved in format field_name_uri not field_name_value

But code is written in module file:

$col_name = $field_type == 'entity_reference' ? $field_name . '_target_id' : $field_name . '_value';

I have done quick dirty changes once to make it working for my self in my test project, attached patch file to see changes required to make it working for LINK type field.

Please let me know if there are any additional settings which may be I am missing. Or might be there are changes required in code.

Thanks!

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India jas1988

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024