Closed (won't fix)
Project:
Entity Construction Kit (ECK)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2012 at 06:01 UTC
Updated:
5 Feb 2026 at 14:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #0.0
OnkelTem commentedasd
Comment #1
OnkelTem commentedOk, first attempt.
Patch provides DS support for 'title', 'created' and 'author' fields. Now on Manage Display forms on DS-enabled view mode you can add and configure entity properties (see attached screenshot)
Architecture
It was not easy to decide what would be the best approach in adding DS support. This is what I did:
eck_ds.modulewhich is in modules subdirectoryeck_ds.ds_fields_info.inc, but has no fields definitions and is simply triggering a new behaviors hookds_fields_infoauthor.inc,title.incetcOther modifications
To make it possible to display author information it was required to change API:
eck__entity_type__info($entity_type)a defaultload hookis assigned to_entity__loadvalue now,function eck__entity__load($entities) { } [eck.entity.inc]which triggers new property behavior hookentity_loadwith$entities arrayas argument. This is used in patchedauthor.inc behavior, which implements this hook infunction eck_author_property_entity_load($property, $vars) { }and loads users.Please test and review.
Comment #2
dqdTest report:
specs:
git cloned --recursive --branch master http://git.drupal.org/project/eck.git
checked out branch 7.x-2.x
patch http://drupal.org/files/eck-1787460-1.patch applied -v
Test installing/enabling/applying patch worked fine without any errors.
Creating an entity and a bundle works without errors. DS options are available.
Created fields in the entity bundle are also available in the system.
The DS patch seems to integrate flawlessly so far. (RTBC?)
Usability discussion: From the usabilities point of view the interface logic of adding fields in nodes is adapted here in ECK, but the principle behind is slidely different. So, looking from top on it, the user will may be confused at first, why she/he has to create an entity, than a bundle and than to add a bundle again, where a bundle is already created. Also, for the user will not be clear what to do with the properties which are looking similar to fields. Maybe there is some documentation or clarification / changing of labels needed to make the underlying concept of ECK or entities in general better understandable? Just a discussable point?
One small drawback: There only seems to exist an uncompatibility with the custom title module (replace core title). Adding a bundle causes the error
The title property of the entity-type was off in this test. The admin section of the created bundle isn't accessible no more. The error shows on white screen.
After disabling the title module, the error disappers, but the created bundle seems to duplicate. Refreshing the admin section after disabling title module shows two created bundles. But as far as I can see, the title module will become deprecated sooner or later with entities and its bundling logic in core, entity API, ECK or any other entity modules in future. It surely depends on, if core title becomes finally a flexible field like body or an optional entity in the next time. In the moment many modules are sadly still based on the fact, that any node/entity/bundle needs/has a title. (e.g.: node auto label uses core title field). But that's another story ...
Report helpful? RTBC?
Comment #3
jnettikI tested this out on my site, so far no problems. Also seemed to fix an issue I was having at #1829154: Undefined index for #view_mode.
Edit: Also worth noting my test was against 2.0-rc1
Comment #4
webadpro commentedI have tested the patch and everything seems to be working just fine.
Comment #5
mrfelton commentedPatch updated against latest 3.x dev code
Comment #6
Drupa1ish commented#5 works for me. Thanks!
Comment #7
Drupa1ish commentedIf needed #2009594: Passing Arguments to a view of a reference , use argument input from context https://drupal.org/node/2009594#comment-7901681
Comment #7.0
Drupa1ish commentedmore ds support
Comment #8
fmizzell commentedComment #9
dgtlmoon commentedPatch #5 fails against current dev, issue closed? unsure
Comment #11
dieterholvoet commentedWe're dropping support for Drupal 7 since it has officially reached end of life on the 5th of January 2025.