(Maybe this should be handled with Relation Dummy Field, but maybe not. This is what I'm thinking (see related issues below)):

Relation dummy field so far has been the one to define the base 'relation' field type. But it is not fair to require this module in order for other modules to implement field widgets for 'relation' types. To deal with the problem, Relation Select and Relation Autocomplete, for example, have to hi-jack the relation field type in order for their widgets to work.

It should be the responsibility of a generic module to define this base field type. I propose 'relation_field' module, which does no more than take responsibility for this type, as a sub-module of relation (api). This way, any field widget module simply relies on relation_field module, and goes about its business.

If someone want to provide a patch to Relation, it'd be greatly appreciated. Otherwise I will get to it when I can. If you want to take this on, please assign this task to yourself and leave a comment you are working on it.

Thank you.

Related issues:
#1753844: relation select field type collision with relation dummy field
#1816830: Switching widget type does not remove field instance settings.
#1816914: Module uses field settings inappropriately

Comments

steveoliver’s picture

Title: Provide Relation Field module to define base 'relation' field type » Relation Dummy Field uses its own field type
Status: Needs work » Fixed

Relation Dummy Field now (45ad68d) uses relation_dummy field type instead of relation. Run update.php (relation_update_7003).

steveoliver’s picture

woops, forgot a few lines. Done now.

steveoliver’s picture

Status: Fixed » Closed (fixed)
mikran’s picture

Assigned: Unassigned » mikran
Status: Closed (fixed) » Needs review

Please post patches first to give testbot a chance. And another question, how does this affect previous implementations that utilize exported relation fields? How about configuration / features?

I'll try with some projects that use configuration and exported stuff next week.

steveoliver’s picture

You're right, I didn't think about exported fields and config. I will definitely post patches for testbot. Think I should revert the change?

mikran’s picture

Assigned: mikran » Unassigned
Status: Needs review » Needs work

http://qa.drupal.org/pifr/test/160244 tests are red atm so yes, I think it would be good to revert the change

steveoliver’s picture

Status: Needs work » Closed (works as designed)

Reverted last two commits in 5c3e6c4. I'll just leave this field type to the dummy field module for now :)

mikran’s picture

Component: Miscellaneous » Dummy field
Issue summary: View changes
Status: Closed (works as designed) » Active

Re-opening. At least the string changes can be done without breaking existing configurations.

  • steveoliver committed 0b2d85f on 8.x-1.x-der
    Issue #1817002 by steveoliver: Relation Dummy Field uses its own field...
  • steveoliver committed 45ad68d on 8.x-1.x-der
    Issue #1817002 by steveoliver: Relation Dummy Field uses its own field...
  • steveoliver committed 5c3e6c4 on 8.x-1.x-der
    Issue #1817002 steveoliver: Relation Dummy Field uses its own field type...

  • steveoliver committed 0b2d85f on 8.x-2.x
    Issue #1817002 by steveoliver: Relation Dummy Field uses its own field...
  • steveoliver committed 45ad68d on 8.x-2.x
    Issue #1817002 by steveoliver: Relation Dummy Field uses its own field...
  • steveoliver committed 5c3e6c4 on 8.x-2.x
    Issue #1817002 steveoliver: Relation Dummy Field uses its own field type...