Dear Dev:

I found a issue for entity reference popup.

A problem that when you upload the image>1, the OG audience value lost. I mean that i use "entityreference prepopulate" set OG audience values automatically, but, if i upload two images, the OG audience values lost. if i upload the only one image, set OG audience value successfully.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alesr’s picture

I have this issue too and it does't not only happen when an image is uploaded inside the form, but every time a form is updated. For example this also happens if you're using Inline Entity Form and add new entities into a (node/add/*) form.

Here is a graphical replication of this issue:

Visiting node/add/response (empty form part). Two entityreference fields that are on top are hidden with entityrefernce prepopulate module.

1

Photo uploaded

2

Clicked "Save"
... and here is the form error with unselected value (the value is still set up in url - works ok if I don't upload an image!)
and also both fields are now exposed to the user (that shouldn't view them!)

3

Here is the entityreference prepopulate settings for the first field (same for the second one)

4

Because this is a big security issue I cannot use this module and have to choose the "ugly" solution with hook_form_alter.
@Amitaibu, do you have a clue why this happens? I rather help fixing this issue then going for the ugly hook_form_alter solution (I used for OG 7.x-1.x btw).

amitaibu’s picture

Status: Active » Postponed (maintainer needs more info)

@alesr ,

I have re-tested, and it works fine for me with the latest dev (i.e. after ER-prepopupatle cleanup issue #1958800: AJAX causes entityreference_prepopulate_get_values_from_url to fail)

alesr’s picture

Status: Postponed (maintainer needs more info) » Fixed

Fixed after Entityreference Prepopulate 7.x-1.3 and OG 7.x-2.2 update.
Thanks.

yutaolife’s picture

if possibly, would you please give me a patch firstly?

alesr’s picture

@yutaolife, update OG and Entityreference Prepopulate modules to their latest stable releases and it should work.
No patch is needed.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

TO Be clear issue description

tanius’s picture

Issue summary: View changes

There was still work going on in the related issue #1958800: AJAX causes entityreference_prepopulate_get_values_from_url to fail until very recently. The final patch is available in the dev version but not yet in a release version. As a quick workaround until then, this works for me:

  1. Enable "Entity Reference Prepopulate" for your entity reference field in the field settings, but set the action to "Nothing" instead of "Hide". This prevents the issue from occuring.
  2. To still not see the field, you can hide the entity reference field with CSS via display:none.