The dependent field functionality passes an entity ID to the user-supplied view. If the user set up the parent argument (i.e. contextual filter) as one that accepts UUIDs instead of entity IDs (e.g. Taxonomy term: UUID), the functionality breaks, and as a result, the dependent field options list becomes empty.

To add support for UUIDs as well, which are portable across sites (unlike entity IDs), we can pass in the UUID instead of the entity ID if the user chooses this option.

I don't believe there a good way to deduce how the user set up the argument. As such, I think we need a configuration option for this. A checkbox should be sufficient.

Comments

colan created an issue. See original summary.

colan’s picture

Status: Active » Needs work
StatusFileSize
new3.87 KB

We still need to implement the update hook to add the new configuration option to the existing configuration.

colan’s picture

Status: Needs work » Needs review
StatusFileSize
new7.05 KB
new9.42 KB

This should do the trick, but more testing would be nice.

  • colan committed 9358f60 on 8.x-1.x
    Issue #3117868 by colan: Allow dependent field parent argument to be...
colan’s picture

Status: Needs review » Fixed

Retested with a clean site update. Works well & doesn't cause any problems.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

colan’s picture

Issue summary: View changes

The form can't be submitted if this functionality is enabled with the Reference parent by UUID instead of entity ID? checkbox even though the field selections work fine. See #3137122: Referencing parent by UUID prevents entity form submissions for that issue.

colan’s picture

Component: Code » Dependent fields