Hi, i'm was having a problem with the prepopulate module and an pupload module looping and not working correctly. I notice the issue #1502972: Issues with ajax file upload fields who is suppose to solve the problem but in my case it is worst ! Now when i click to upload i'm getting a blank screen and these errors. Since it is supposed to be fix, i'm starting this issue because it is, maybe, a new problem, i do not know.

Notice: Undefined variable: ids in entityreference_prepopulate_get_values_from_url() (line 280 of /home/sw3b/www/ng/sites/all/modules/entityreference_prepopulate/entityreference_prepopulate.module).
Recoverable fatal error: Argument 1 passed to EntityReference_SelectionHandler_Views::validateReferencableEntities() must be an array, null given, called in /home/sw3b/www/ng/sites/all/modules/entityreference_prepopulate/entityreference_prepopulate.module on line 280 and defined in EntityReference_SelectionHandler_Views->validateReferencableEntities() (line 134 of /home/sw3b/www/ng/sites/all/modules/entityreference/plugins/selection/EntityReference_SelectionHandler_Views.class.php).

With the version 1.2 it does not create the error, it only loop back has describe in #1502972: Issues with ajax file upload fields, only with the dev version i'm getting the error.

I'm using this sandbox http://drupal.org/sandbox/pyrollo/1256156 to upload images. This modules is working correctly before the last dev version and only looping.

Comments

mrfelton’s picture

Also getting this error with latest dev of er_prepopulate and og, when trying to create an og group node that where the group audience field is prepopulated via the url, and the field is set to be hidden.

mrfelton’s picture

Actually, whilst I dont get the fatal error with 1.2 it doesn't actually work either as the group reference field gets left empty. I prefer the fatal error, as at least that way you know that the reference hasn't been created!

sw3b’s picture

Status: Active » Closed (fixed)

I use the patch in this issue and it solve my problem !

http://drupal.org/node/1502972#comment-7078788

danylevskyi’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Needs work

I am using latest development version fetch from git. I am getting next errors after submitting node.

Notice: Undefined variable: ids in entityreference_prepopulate_get_values_from_url() (line 278 of sites/all/modules/contrib/entityreference_prepopulate/entityreference_prepopulate.module).

a.ross’s picture

Priority: Critical » Normal
danylevskyi’s picture

Priority: Normal » Major

Thanks guys! Notice gone, but problem exists...

Problem

Node can't be saved due to entity_prepopulate error.

Field ref must be populated via URL

How to reproduce

  1. Add entityreference field with select list widget. Field name is field_ref.
  2. Check Entity reference prepopulate on the field settings page.
  3. Set Action to Disable field
  4. Check Apply action on edit
  5. Set Fallback behaviour to Set form error
  6. Save field.
  7. Go to /node/add/article?field_ref=1
  8. You should see disabled entityreference field.
  9. Click submit button.
  10. Get your error...

P.S. To reproduce this bug I used fresh Drupal install and latest development version of entity_prepopulate fetched from git.

a.ross’s picture

Priority: Major » Normal

I'm not sure if I understand what you did there. Does the entity with ID "1" even exist in the first place?

danylevskyi’s picture

Yes. Entity with id 1 exists.

a.ross’s picture

Status: Needs work » Closed (duplicate)