Hello,

I am wondering what is the status of ECK integration. I would love to have this for my current project, since it's the last piece i need to "migrate" the data from content types to entities and bundles.

On my test install I was able to use Entity Reference to point to an Entity Created by ECK. I was also able to enable the Entity Connect buttons on the "Field Settings". However, when creating a new entity, the "Add" and "Edit" buttons are not showing up.

By trying this, I was hoping to find some log or watchdog errors that I could follow to solve this issue. However, there are none. I was wondering if you guys could give me some clues on what is causing this incompatibility so I can decide whether or not it is worth it to try and fix it myself.

Best regards,
Joao

Comments

jygastaud’s picture

Hi,

Entiy connect doesn't deal with ECK at the moment.

To start a patch for that, you will must do, a lot of work.
First start will be to allow each ECK entities to be referenced as allowed in the _entityconnect_get_ref_fields() (.module file). and continue with some changes in .form and .menu files.

Then, you will also need to modify entityconnect_form_alter() and the ugly

  if ((isset($_REQUEST['build_cache_id'])
          && ($cid = $_REQUEST['build_cache_id']))
          || ((arg(1) == 'add') && ($cid = arg(3)) && $child = TRUE)
          || ((arg(1) == 'people') && (arg(2) == 'create') && ($cid = arg(3)) && $child = TRUE)
          || ((arg(2) == 'taxonomy') && (arg(4) == 'add') && ($cid = arg(5)) && $child = TRUE)
          || ((arg(2) == 'taxonomy') && (arg(3) == 'add') && ($cid = arg(4)) && $child = TRUE)) {

That function is on my roadmap for V2.
You can start dealing with _entityconnect_get_ref_fields() and post a patch. Then I will try to help you on the next step.

Feel free to ask for any question.

See you.

amen’s picture

Assigned: Unassigned » amen

Thank you for the quick reply. I will look deeper into both Entity Connect and ECK and try to understand whether or not I am up for the task.

amen’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
jygastaud’s picture

I have work on it and I am in a good way.
I should be able to post a start patch soon.

k.skarlatos’s picture

Hello, any news about eck integration?

k.skarlatos’s picture

Issue summary: View changes

typo

primsi’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new8.75 KB

I have been working on a patch for this issue in the last days. So here is an initial patch to be reviewed.

Cheers.

paranojik’s picture

The last patch didn't properly handle the case when the ER field only references one bundle.
This still needs review.

mengi’s picture

Patch in #7 works, but I got the below warnings after I added a entity in the node edit form;

    Warning: array_flip(): Can only flip STRING and INTEGER values! in EntityAPIController->load() (line 219 of../sites/all/modules/contrib/entity/includes/entity.controller.inc).

    Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 350 of ../includes/entity.inc).

The eck entity was created and the site isn't throwing any other warnings.

sevanden’s picture

I applied the patch, the icons/buttons are visible. When I click on, let's say the "Add" icon it nicely opens the edit form for the references entity, however, the submit/save button is no longer visible.

In addition I receive the following error: Undefined index: submit in entityconnect_child_form_alter() (line 720 of sites/all/modules/entityconnect/includes/entityconnect.form.inc).

Those lines display

    case 'eck__entity__form_add_' . $form['#entity_type'] . '_' . $form['#bundle']:
    case 'eck__entity__form_edit_' . $form['#entity_type'] . '_' . $form['#bundle']:
      // The wights is too damn high!
      $form['actions']['#weight'] = 20;
      $form['actions']['cancel']['#weight'] = 10001;

      // Transfer the Save button to our new actions.
      $form['actions']['submit'] = $form['submit'];
      $form['actions']['submit']['#submit'][] = 'eck__entity__form_submit';
      unset($form['submit']);

      // @todo I think we don't need #submit any more..?
      $form['#submit'] = array();
      break;

Any ideas as to what could be wrong?

kgaut’s picture

StatusFileSize
new9.62 KB

I've just edited the patch #7 by paranojik to prevent errors described by sevanden in #9.

Working with 7.x-1.0-rc1 (to be ported to dev)

Status: Needs review » Needs work

The last submitted patch, 10: entityconnect-eck-integration-1883400-10.patch, failed testing.

kgaut’s picture

My bad, forget to commit some files before diff, here's the correct patch

(it's friday...)

jygastaud’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 12: entityconnect-eck-integration-1883400-11.patch, failed testing.

jygastaud’s picture

Kgaut,

Thanks for the patch.
It looks like the test failed because of the internal path inside your site.
Please try something like that to reroll the patch.

git diff --no-prefix [original-SHA] [patched-SHA] > my-patchfile.patch

kgaut’s picture

Ok, I've cloned the project in an other directory this time.

Hope this one will pass.

Sorry for my laziness ;)

jygastaud’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 16: entityconnect-eck-integration-1883400-16.patch, failed testing.

jygastaud’s picture

Status: Needs work » Needs review
StatusFileSize
new9.37 KB

Reroll #16 patch for testbot

  • jygastaud committed fd06eb0 on 7.x-1.x authored by Kgaut
    Issue #1883400 by Kgaut, paranojik, Primsi: Status of ECK integration
    
jygastaud’s picture

Category: Task » Feature request
Status: Needs review » Fixed

Thank you all for your contribution.
Last patch is now commited.

  • jygastaud committed 3f136cc on 7.x-1.x
    Issue #1883400 : Fix typo in ECK.
    
  • jygastaud committed 4189740 on 7.x-1.x
    Issue #1883400 : Remove warning due to ECK support.
    

Status: Fixed » Closed (fixed)

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