Problem/Motivation

If the supporter_my_donate_page entity is used in an autocomplete element, the search function does not work as expected: All entities are showed and not only the ones which would match.

Proposed resolution

Add "entity keys" definition to the entity definition.

Remaining tasks

User interface changes

API changes

Comments

LukyLuke_ch’s picture

Status: Needs work » Needs review
StatusFileSize
new1.21 KB

Attached a patch to resolve this.
Also I added the defaultLabel function to the MyDonatePage entity which was missing.

berdir’s picture

Status: Needs review » Needs work
+++ b/salsa_my_donate_page/includes/salsa_my_donate_page.entity.inc
@@ -68,4 +68,8 @@ class SalsaEntityMyDonatePage extends SalsaEntity {
+  public function defaultLabel() {
+    return $this->Title;

+++ b/salsa_my_donate_page/salsa_my_donate_page.module
@@ -31,6 +31,9 @@ function salsa_my_donate_page_salsa_object_type_info() {
+      'entity keys' => array(
+        'label' => 'Page_Title',

why Title in one case and Page_Title in the other?