Account created on 5 March 2009, over 15 years ago
#

Merge Requests

Recent comments

πŸ‡΅πŸ‡­Philippines dsdeiz

Would there happen to be a way to reproduce this?

There is an issue with creating cases where one or more of the timeline activities has users pre-assigned (ie assigned by default in the Case Type).

I tried adding a configuration similar to this although I am unable to reproduce this - https://monosnap.com/direct/yjflNRZtIEqndOWuaPWot8mpeTJ14p.

As a side note, there are fixes for CE 4.0.x. Might be worth a try to see if it still happens on CE 4.0.x

πŸ‡΅πŸ‡­Philippines dsdeiz

Yeah, in case anyone wants a patch for D10, maybe this would work.

πŸ‡΅πŸ‡­Philippines dsdeiz

I have added an MR although it probably only works for newly installed module. Existing installs most likely needs an upgrade path. What I did is store entity_id as just regular integer and added a field formatter that renders the field the same as an entity reference label.

πŸ‡΅πŸ‡­Philippines dsdeiz

dsdeiz β†’ created an issue.

πŸ‡΅πŸ‡­Philippines dsdeiz

Oh sorry, I didn't know it would automatically update the existing MR. I only added this change though - https://git.drupalcode.org/project/drupal/-/merge_requests/5321/diffs?co....

πŸ‡΅πŸ‡­Philippines dsdeiz

I've re-rolled the diff and added a small fix wherein it throws an error if the username doesn't exist.

πŸ‡΅πŸ‡­Philippines dsdeiz

Yeah, I mostly just noticed this here - https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21F....

Any field types that don't have "value" as one of the field's properties return a different main property name. FieldItemBase by defaults return "value" as the main property.

πŸ‡΅πŸ‡­Philippines dsdeiz

Yeah, marking back as "Needs review" since the test passes now.

πŸ‡΅πŸ‡­Philippines dsdeiz

Patch attached.

πŸ‡΅πŸ‡­Philippines dsdeiz

dsdeiz β†’ created an issue.

πŸ‡΅πŸ‡­Philippines dsdeiz

Yeah, that was the case. Can you give this a try - https://github.com/eileenmcnaughton/civicrm_entity/pull/450? It's on 4.0.x although I think it can be applied to 8.x-3.5 as well.

πŸ‡΅πŸ‡­Philippines dsdeiz

Yeah, can you export your search index configuration? I tested both CiviCRM contact and event and they are working as expected. I am just using search_api_db though.

Is your CiviCRM database separate from Drupal?

πŸ‡΅πŸ‡­Philippines dsdeiz

Yeah, this uses views_aggregator? Is there an example export of the views? I tried Trial 2 although I was able to save the view just fine. This was testing on latest version of CE.

πŸ‡΅πŸ‡­Philippines dsdeiz

Yeah, it's supposed to be there. This is what I see on my end:

"custom_1" => array:18 [β–Ό
    "#theme" => "field"
    "#title" => "Test"
    "#label_display" => "hidden"
    "#view_mode" => "full"
    "#language" => "und"
    "#field_name" => "custom_1"
    "#field_type" => "string"
    "#field_translatable" => false
    "#entity_type" => "civicrm_contact"
    "#bundle" => "civicrm_contact"
    "#object" => Drupal\civicrm_entity\Entity\CivicrmEntity {#2727 β–Ά}
    "#items" => Drupal\Core\Field\FieldItemList {#2677 β–Ά}
    "#formatter" => "string"
    "#is_multiple" => false
    "#third_party_settings" => []
    0 => array:3 [β–Ό
      "#type" => "inline_template"
      "#template" => "{{ value|nl2br }}"
      "#context" => array:1 [β–Ό
        "value" => "1234"
      ]
    ]
    "#cache" => array:3 [β–Ά]
    "#weight" => 0
  ]

Maybe check if the the custom fields are enabled on the "Manage display"?

πŸ‡΅πŸ‡­Philippines dsdeiz

Yeah, seems to work for my case. I tested with Dutch. You can try debugging using this:

@ plugins/context_condition_user.inc:38 @ class context_condition_user extends context_condition {
   function execute($account) {
     $all_roles = user_roles();
     $users_roles = $account->roles;
+    print_r($all_roles);
+    print_r($users_roles);
     foreach ($all_roles as $rid => $role) {
       foreach ($this->get_contexts($role) as $context) {
         $options = $this->fetch_from_context($context, 'options');
πŸ‡΅πŸ‡­Philippines dsdeiz

Yeah, experienced the same as well. For my case, it was because of the language. I wonder if it's a similar case.

Context condition for user was expecting the translated role names for "anonymous" and "authenticated" while context list only had untranslated role names.

I've attached the patch if that helps.

Production build 0.71.5 2024