Morning!

Used this module and loved it. Would be awesome if it could work with the ECK module (Entity Construction Kit).

I made the patch with is attached (as a comment) which seems to work, thought it might be useful for others to use

Cheers

Michael

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tresti88 created an issue. See original summary.

tresti88’s picture

See attached the patch

tresti88’s picture

kenorb’s picture

Status: Active » Needs review
salvis’s picture

Status: Needs review » Needs work

This doesn't seem to work yet.

My eck entity type's machine name is eck_gdplan. After applying your patch I get a new

Override the eck_gdplan edit form with Views Megarow

radio button group, but:

+++ b/views_megarow.admin.inc
@@ -33,6 +33,23 @@ function views_megarow_admin_settings_form($form, &$form_state) {
+        '#description' => t('Allows Views Megarow to override the path user/%user/edit.'),

We should see the correct edit path here, not the user edit path.

My edit path is
eck_gdplan/eck_gdplan/%/edit
but
eck_gdplan/eck_gdplan/1/edit
hangs at "Loading...". (Yes, there exists an entity #1.)

My edit form has a collapsed fieldset, a date picker, and several auto-complete term reference fields. Could any of these be causing the hanging?

How I can get the %eckentity / eck id, would be my next question.

Also, coding style:

  1. +++ b/views_megarow.module
    @@ -430,6 +430,10 @@ function views_megarow_form_alter(&$form, &$form_state, $form_id) {
    +  else if(strstr($form_id, 'eck__entity__form') && $form['entity']['#value']->from_megarow == TRUE) {
    

    if with missing space.

  2. +++ b/views_megarow.module
    @@ -470,6 +477,28 @@ function views_megarow_menu_alter(&$items) {
    +      if(!empty($bundles) && variable_get("views_megarow_override_{$type}_edit", TRUE)) {
    

    if with missing space.

  3. Probably too many empty lines, especially between the closing parentheses.