Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Allow using "OG-context" for non-group audience fields
This fix is not appropriate, when the URL contains two parameters of Entityreference, e.g. og_group_ref=xxx&other_entityreference_param_not_og_audience=xxx, is not work.
Sorry my bad english.
Comment | File | Size | Author |
---|---|---|---|
#15 | interdiff-15.txt | 7.04 KB | amitaibu |
#15 | 2162811-er-prepopulate-providers-15.patch | 14.43 KB | amitaibu |
#14 | interdiff.txt | 583 bytes | amitaibu |
#14 | 2162811-er-prepopulate-providers-14.patch | 9.42 KB | amitaibu |
#8 | er-provides.jpg | 211.82 KB | amitaibu |
Comments
Comment #1
amitaibu> Sorry my bad english.
Your English is just fine :)
Nofar from Gizra will check it.
Comment #2
broonI can confirm this issue. I have OG setup, each group has folders (node bundle) containing a entityreference field to OG audience (og_group_ref). This works fine.
"Within the folder", users can create files (another node bundle), it also has OG audience field (og_group_ref) and an additional entityreference field pointing to the folder it belongs to (field_folder).
Creating a new file is done by a link, e.g.
/node/add/file?og_group_ref=12&field_folder=37&destination=node/12
. The OG field is prepopulated just fine, however the field_folder throws an error ("Field Folder must be populated via URL.").It used to work before last update, I just rolled back to 1.3 and it works again. So, version 1.4 is introducing this bug.
Comment #3
sayes1 CreditAttribution: sayes1 commentedI confirm too. I have downgrade to 7.x-1.3. and it works again.
Comment #4
ranroz CreditAttribution: ranroz commentedThe attached patch will provide additional control when repopulating fields. If the user chooses to use the OG context option, a source priority will be available in the field settings. This will allow to get a value from the URL even if OG context is used.
zihong0, Paul Broon - Could you try it out and see if that solves your issue?
Comment #5
zihong0 CreditAttribution: zihong0 commentedYes, this patch has solved my problem. Thank you!
Comment #6
amitaibuMissing t().
Make description more clear about what follows what.
Maybe
Use OG-context before/ after URL
Comment #7
ranroz CreditAttribution: ranroz commented@amitaibu-
Added t() function and changed description.
Comment #8
amitaibuI have taken a different approach, where ER-prepopualte now has "providers" that you can enable and set the order from the UI.
Comment #10
amitaibuSetting correct version for test bot.
Comment #11
amitaibu... and correct version.
Comment #12
amitaibu8: 2162811-er-prepopulate-providers-8.patch queued for re-testing.
Comment #14
amitaibuPatch fixes test.
Comment #15
amitaibuPatch adds better backwards computability, and adds tests.
Comment #16
amitaibuBetter title.
Comment #17
amitaibuCommitted.