Release Notes

  • added: composer support
  • added: plugin hook to limit outgoing type/subtype notifications
  • changed: AMD load most of the js
  • changed: form buildup to include tag tools description
  • fixed: set correct submit button class
  • fixed: issue when removing or saving tags on notification settings form where the tag has strange characters
  • fixed: php warning for create metadata event handler
  • fixed: sending notifications to users without access to the content
  • Hi Jeroen,

    First of all, many thanks for all these great plugins!

    However, I noticed a small compatibility issue between Tag tools and Profile manager plugins.

    After the creation of a group profile field with a "Field type" set to "tags" and "show on profile as tags" flag set to "yes", I expected the tag tools autocomplete feature to suggest the content of this new group profile field. But it is not.

    I also checked with a tag user profile field, but same issue: no suggestion from tag tools.

    After a few investigations, I noticed that in autocomplete.php file, the SQL request is only working for metastring_id "tags", but not for "output_as_tags" fields which have different "metastring_id"s.

    I am searching for a workaround in the SQL request, but maybe a fix in profile manager would be better?

    Could you please suggest an easy workaround to implement until we get an official fix,

    Olivier

  • This issue seems related to the way group profile and user profile tags are stored in the database, a different way than other entity tags.

    To workaround the issue, I added the "group tags" for instance (same name as in profile manager) in the tag tools autocomplete SQL request (in autocomplete.php):

        $dbprefix = elgg_get_config("dbprefix");
        $tags_id = elgg_get_metastring_id("tags");
        $group_tags_id = elgg_get_metastring_id("group_tags");
        
        $sql = "SELECT msv.string as string, count(*) as total";
        $sql .= " FROM " . $dbprefix . "metadata md";
        $sql .= " JOIN " . $dbprefix . "metastrings msv ON md.value_id = msv.id";
        $sql .= " WHERE (md.name_id = " . $tags_id . " OR md.name_id = " . $group_tags_id . ")";
        $sql .= " AND msv.string LIKE '" . sanitise_string($query) . "%'";
        $sql .= " GROUP BY msv.string";
        $sql .= " ORDER BY total DESC";
        $sql .= " LIMIT 0, 20";

    This is not generic at all, but it works.

     

Jeroen Dalsem

Owner of ColdTrick IT Solutions, developing social networking sites for the dutch market

Stats

  • Category: Misc
  • License: GNU General Public License (GPL) version 2
  • Updated: 2021-11-18
  • Downloads: 2499
  • Recommendations: 9

Other Projects

View Jeroen Dalsem's plugins