Notice: Trying to get property of non-object in Bundle->save() (line 377 of H:\wamp\www\drupal\sites\all\modules\eck\eck.classes.inc).

Comments

kaizerking’s picture

Priority: Normal » Critical
fmizzell’s picture

When is this happening exactly?

kaizerking’s picture

on fresh install only eck and eck extras are installed , when I have created new bundle i get this message,along with
Status message
"the asset_accounts for entity type financial_year has been saved"and but the bundle is not created.

kaizerking’s picture

StatusFileSize
new38.1 KB

I have started applying some of the patches to get this working
luckily it worked!!! here is the patch generated from net beans for your info
except that it is giving
Notice: Undefined index: test in get_bundle_admin_info() (line 227 of H:\wamp\www\drupal\sites\all\modules\eck\eck.entity.inc).
"test" is the bundle name

tstoeckler’s picture

StatusFileSize
new463 bytes

Sorry for sort of taking this over but all the unrelated and whitespace changes were seriously distracting in your patch. Here's one that contains just the fix for this issue and fixes bundle saving. You now get a notice

Notice: Undefined index: bundle_2_b in get_bundle_admin_info() (line 227 of .../eck/eck.entity.inc).

but that is fixed by #1979658: Clear caches in EntityType::save() and Bundle::save() instead of the form submit handlers (I applied the patch in #1979658-4: Clear caches in EntityType::save() and Bundle::save() instead of the form submit handlers after applying this to test that).

kaizerking’s picture

Thanks for that
The "patch"which I submitted is not actually a patch it contains the the difference of 3.x and after application of patches on 3.x as such should not be considered as patch just that was for information sake.

applying https://drupal.org/files/1977336-5-bundle-saving.patch will be sufficient on latest 3.x ? pl confirm

I have applied https://drupal.org/node/1979658 and the now there are no notices.

tstoeckler’s picture

Re #6: Yes, applying the patch in #5 should be enough to be able to be able to create bundles from the UI again. It will work perfectly, but you will see the notice I mentioned above. If you want the notice to go away, you need to apply the lastest patch from #1979658: Clear caches in EntityType::save() and Bundle::save() instead of the form submit handlers as well. Does that make it clear? :-)

kaizerking’s picture

Perfectly !!!

alphawebgroup’s picture

Status: Active » Reviewed & tested by the community

I've applied that patch from #5.
works good for now.
don't see any notices on bundle creation

acrazyanimal’s picture

Status: Reviewed & tested by the community » Fixed

I've committed what should be a fix for this issue in the 7.x-3.x branch. Unrelated to the issues listed in #5 above.

See http://drupalcode.org/project/eck.git/commit/543be72

Status: Fixed » Closed (fixed)

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

  • Commit 8a1b054 on 7.x-3.x authored by acrazyanimal, committed by fmizzell:
    Issue #1977336 by acrazyanimal: Test if the bundle object is set before...

  • Commit 543be72 on 8.x by acrazyanimal:
    Issue #1977336 by acrazyanimal: Test if the bundle object is set before...