Account created on 8 December 2020, over 4 years ago
  • Engineer Drupal - Backend at QED42 
#

Merge Requests

More

Recent comments

🇮🇳India annmarysruthy

Checked the issue. added an article in english(original language). Created a german translation of a node.
All the below options have (all languages) span attached to it when content translation is enabled:

  1. Last saved
  2. Author
  3. Create new revision
  4. Revision log message
  5. However all these values are different for each translation. My suggestion is to change all the suffixes from (all languages) to (this translation) as in save button.

Tests should be updated to reflect the above change.

🇮🇳India annmarysruthy

After upgrading the AI module to 1.1.x-dev, Faced a fatal error:

Fatal error: Declaration of Drupal\ai_vdb_provider_milvus\Plugin\VdbProvider\MilvusProvider::vectorSearch(string $collection_name, array $vector_input, array $output_fields, mixed $filters = '', int $limit = 10, int $offset = 0, string $database = 'default'): array must be compatible with Drupal\ai\AiVdbProviderInterface::vectorSearch(string $collection_name, array $vector_input, array $output_fields, Drupal\search_api\Query\QueryInterface $query, string $filters = '', int $limit = 10, int $offset = 0, string $database = 'default'): array in /var/www/html/modules/contrib/ai_vdb_provider_milvus/src/Plugin/VdbProvider/MilvusProvider.php on line 597

This is mentioned in https://www.drupal.org/project/ai/issues/3515861 🐛 MilvusProvider.php on line 597 Active .

@marcus_johansson Kindly let me know the milvus db provider version to be used for testing. in test setup it is mentioned "Milvus Provider 1.0.2-beta2" . But there is no version 1.0.2-beta2 available. Currently I have used "1.0.0-beta2"

🇮🇳India annmarysruthy

Tried test setup. Assuming the Milvus Provider in step 2 is 1.0.0-beta2. Completed till step 16, On adding a new view with the index, got an error

The submitted value search_api_data in the output as element is not allowed.
The submitted value search_api_data in the Feed row style element is not allowed.

This might be related to core issue https://www.drupal.org/project/facets/issues/3446040 🐛 The submitted value [value] in the [name] element is not allowed. Active

🇮🇳India annmarysruthy

Tested the changes. After applying the MR and running drush updb, agent tool IDs are updated to the new double-colon format (ai_agents::ai_agent::{config_name}). Verified using:

ddev drush ev "\$defs = \Drupal::service('plugin.manager.ai.function_calls')->getDefinitions(); foreach (\$defs as \$id => \$def) { echo \$id . ': ' . (\$def['group'] ?? 'none') . ' / ' . (\$def['custom_type'] ?? 'none') . PHP_EOL; }"

Output before applying MR and running drush updb:

action_plugin:node_make_unsticky_action: drupal_actions / none
action_plugin:node_promote_action: drupal_actions / none
action_plugin:node_make_sticky_action: drupal_actions / none
action_plugin:node_unpromote_action: drupal_actions / none
action_plugin:user_unblock_user_action: drupal_actions / none
action_plugin:user_add_role_action: drupal_actions / none
action_plugin:user_block_user_action: drupal_actions / none
action_plugin:user_remove_role_action: drupal_actions / none
action_plugin:entity:save_action:block_content: drupal_actions / none
action_plugin:entity:save_action:comment: drupal_actions / none
action_plugin:entity:save_action:file: drupal_actions / none
action_plugin:entity:save_action:menu_link_content: drupal_actions / none
action_plugin:entity:save_action:node: drupal_actions / none
action_plugin:entity:save_action:taxonomy_term: drupal_actions / none
action_plugin:entity:save_action:user: drupal_actions / none
action_plugin:action_message_action: drupal_actions / none
action_plugin:action_goto_action: drupal_actions / none
action_plugin:entity:publish_action:block_content: drupal_actions / none
action_plugin:entity:publish_action:comment: drupal_actions / none
action_plugin:entity:publish_action:menu_link_content: drupal_actions / none
action_plugin:entity:publish_action:node: drupal_actions / none
action_plugin:entity:publish_action:path_alias: drupal_actions / none
action_plugin:entity:publish_action:taxonomy_term: drupal_actions / none
action_plugin:entity:unpublish_action:block_content: drupal_actions / none
action_plugin:entity:unpublish_action:comment: drupal_actions / none
action_plugin:entity:unpublish_action:menu_link_content: drupal_actions / none
action_plugin:entity:unpublish_action:node: drupal_actions / none
action_plugin:entity:unpublish_action:path_alias: drupal_actions / none
action_plugin:entity:unpublish_action:taxonomy_term: drupal_actions / none
action_plugin:action_send_email_action: drupal_actions / none
ai_agent:get_entity_type_field_storage: information_tools / none
ai_agent:list_config_entities: information_tools / none
ai_agent:get_field_display_form: information_tools / none
ai_agent:list_field_display_types: information_tools / none
ai_agent:edit_content_type: modification_tools / none
ai_agent:list_taxonomy_term: information_tools / none
ai_agent:content_entity_seeder: modification_tools / none
ai_agent:get_current_content_entity_values: information_tools / none
ai_agent:get_config_schema: information_tools / none
ai_agent:manipulate_field_config: modification_tools / none
ai_agent:get_entity_field_information: information_tools / none
ai_agent:get_field_values_and_context: information_tools / none
ai_agent:list_bundles: information_tools / none
ai_agent:get_field_storage_form: information_tools / none
ai_agent:content_entity_field_value: entity_tools / none
ai_agent:content_entity_field_values_list: entity_tools / none
ai_agent:create_agent_config_tools_enabled:  / none
ai_agent:vision: information_tools / none
ai_agent:modify_taxonomy_term: modification_tools / none
ai_agent:create_field_storage_config: modification_tools / none
ai_agent:get_field_config_form: information_tools / none
ai_agent:web_scraper: information_tools / none
ai_agent:list_field_types: information_tools / none
ai_agent:list_entity_types: information_tools / none
ai_agent:modify_bundle_type: modification_tools / none
ai_agent:get_field_storage: information_tools / none
ai_agent:list_content_entities: information_tools / none
ai_agent:get_field_config: information_tools / none
ai_agent:get_content_type_info: information_tools / none
ai_agent:manipulate_field_display_form: modification_tools / none
ai_agent:create_content_type: modification_tools / none
ai_agent:modify_vocabulary: modification_tools / none
ai_search:rag_search: information_tools / none
ai_agent:taxonomy_agent: agent_tools / none
ai_agent:node_content_type_agent: agent_tools / none
ai_agent:field_type_agent: agent_tools / none

Output after applying MR and running drush updb:

action_plugin:node_make_unsticky_action: drupal_actions / none
action_plugin:node_promote_action: drupal_actions / none
action_plugin:node_make_sticky_action: drupal_actions / none
action_plugin:node_unpromote_action: drupal_actions / none
action_plugin:user_unblock_user_action: drupal_actions / none
action_plugin:user_add_role_action: drupal_actions / none
action_plugin:user_block_user_action: drupal_actions / none
action_plugin:user_remove_role_action: drupal_actions / none
action_plugin:entity:save_action:block_content: drupal_actions / none
action_plugin:entity:save_action:comment: drupal_actions / none
action_plugin:entity:save_action:file: drupal_actions / none
action_plugin:entity:save_action:menu_link_content: drupal_actions / none
action_plugin:entity:save_action:node: drupal_actions / none
action_plugin:entity:save_action:taxonomy_term: drupal_actions / none
action_plugin:entity:save_action:user: drupal_actions / none
action_plugin:action_message_action: drupal_actions / none
action_plugin:action_goto_action: drupal_actions / none
action_plugin:entity:publish_action:block_content: drupal_actions / none
action_plugin:entity:publish_action:comment: drupal_actions / none
action_plugin:entity:publish_action:menu_link_content: drupal_actions / none
action_plugin:entity:publish_action:node: drupal_actions / none
action_plugin:entity:publish_action:path_alias: drupal_actions / none
action_plugin:entity:publish_action:taxonomy_term: drupal_actions / none
action_plugin:entity:unpublish_action:block_content: drupal_actions / none
action_plugin:entity:unpublish_action:comment: drupal_actions / none
action_plugin:entity:unpublish_action:menu_link_content: drupal_actions / none
action_plugin:entity:unpublish_action:node: drupal_actions / none
action_plugin:entity:unpublish_action:path_alias: drupal_actions / none
action_plugin:entity:unpublish_action:taxonomy_term: drupal_actions / none
action_plugin:action_send_email_action: drupal_actions / none
ai_agent:get_entity_type_field_storage: information_tools / none
ai_agent:list_config_entities: information_tools / none
ai_agent:get_field_display_form: information_tools / none
ai_agent:list_field_display_types: information_tools / none
ai_agent:edit_content_type: modification_tools / none
ai_agent:list_taxonomy_term: information_tools / none
ai_agent:content_entity_seeder: modification_tools / none
ai_agent:get_current_content_entity_values: information_tools / none
ai_agent:get_config_schema: information_tools / none
ai_agent:manipulate_field_config: modification_tools / none
ai_agent:get_entity_field_information: information_tools / none
ai_agent:get_field_values_and_context: information_tools / none
ai_agent:list_bundles: information_tools / none
ai_agent:get_field_storage_form: information_tools / none
ai_agent:content_entity_field_value: entity_tools / none
ai_agent:content_entity_field_values_list: entity_tools / none
ai_agent:create_agent_config_tools_enabled:  / none
ai_agent:vision: information_tools / none
ai_agent:modify_taxonomy_term: modification_tools / none
ai_agent:create_field_storage_config: modification_tools / none
ai_agent:get_field_config_form: information_tools / none
ai_agent:web_scraper: information_tools / none
ai_agent:list_field_types: information_tools / none
ai_agent:list_entity_types: information_tools / none
ai_agent:modify_bundle_type: modification_tools / none
ai_agent:get_field_storage: information_tools / none
ai_agent:list_content_entities: information_tools / none
ai_agent:get_field_config: information_tools / none
ai_agent:get_content_type_info: information_tools / none
ai_agent:manipulate_field_display_form: modification_tools / none
ai_agent:create_content_type: modification_tools / none
ai_agent:modify_vocabulary: modification_tools / none
ai_agents::ai_agent::taxonomy_agent: agent_tools / none
ai_agents::ai_agent::node_content_type_agent: agent_tools / none
ai_agents::ai_agent::field_type_agent: agent_tools / none
ai_agents::ai_agent::content_type_agent_triage: agent_tools / none
ai_agents::ai_agent::field_agent_triage: agent_tools / none
ai_agents::ai_agent::taxonomy_agent_config: agent_tools / none
🇮🇳India annmarysruthy

I’ve made a few updates to fix the missing triggerEvent() call:

  • Made $request_thread_id nullable in PostStreamingResponseEvent to avoid test failures.
  • Added a $eventTriggered flag in StreamedChatMessageIterator to prevent duplicate events.
  • Added null check in triggerEvent() and improved __destruct() for safety.
  • Introduced finishStreaming() method so providers can trigger the event explicitly (recommended over relying on __destruct()).

Kindly review.

🇮🇳India annmarysruthy

Reviewed the MR and tested the changes. Even after applying the changes, the Enable RAG checkbox will be disabled on each edit , if no agent is selected.

Kindly check again

🇮🇳India annmarysruthy

Reviewed the MR and tested the changes. The MR fixes the issue when adding ai assistant without ai_agent installed. @anjaliprasannan

🇮🇳India annmarysruthy

Hi @jhedstrom, Tried replicating the issue- Unable to replicate. Im using drupal 11 and ai module 1.1.x-dev. Used plugin "Generate with AI" and response was correctly formatted.

Could you please elaborate the steps/specify the ai module version.

🇮🇳India annmarysruthy

Followed the steps mentioned , installed ai agents 1.1.0-beta2 but unable to replicate the error. able to add new agent.

This might be environment-specific or related to a missing or misconfigured dependency. Might help if the reporter shares more details like core AI module version or any custom code involved.

🇮🇳India annmarysruthy

Reviewed the MR and tested the changes. Found an issue:

  • On changing the Default provider from a valid provider to 'No Default', the dropdown in 'Default model' changes is empty , instead of '-select-' being displayed
🇮🇳India annmarysruthy

I had a look at the different options, and here’s what I think:

  • Moving the permission into core/system would fix the dependency issue, but it might be confusing to have a block-related permission show up even when the Block module is turned off. That could lead to some questions about what it actually does.
  • Adding a new permission, like view broken block messages, feels like the cleanest solution. It avoids relying on the Block module, keeps things clear, and makes it easy to control who can see these messages.
  • Checking something else instead of permissions, like if the user is an admin, could also work. But using a permission is more flexible—site builders can decide exactly who should see the message.

So, I’m thinking of going with the second option: adding a new permission in system.module and updating the Broken block plugin to use it.

Open to suggestions.

🇮🇳India annmarysruthy

Tested the feature and found it very useful—definitely a strong move toward centralizing prompt management.One thing I noticed while testing is that there’s no pager when viewing the list of prompts. It made me think that if there are a lot of prompts, scrolling through them could get tricky. I saw @marcus_johansson mentioned this in comment #5, suggesting an AJAX pager for the table.

🇮🇳India annmarysruthy

Reviewed the MR and tested the changes. issue is fixed. Thank you.

🇮🇳India annmarysruthy

Raised MR !598 for removing the dependency injection for current user. Kindly review.

🇮🇳India annmarysruthy

Raised MR !119 . Kindly review.

🇮🇳India annmarysruthy

I was able to replicate the issue as described. I tested the solution suggested in the proposed resolution by manually replacing the [agent_instructions] token using str_replace(), and it resolved the problem in my testing.

Alternatively, another viable approach would be to formally declare the [agent_instructions] token via hook_token_info() and implement its replacement logic in hook_tokens().

It would be great to hear other thoughts

🇮🇳India annmarysruthy

Hi @anjaliprasannan Is n't this issue a duplicate of https://www.drupal.org/project/ai/issues/3523327 🐛 Select fields toogle not working for content suggestion sections Active .

🇮🇳India annmarysruthy

@marcus_johansson No. There is a remaining part of solution: On the runner make sure to run the secured_system_prompt and replace the tokens and use this.

I could not fix this part. Therefore, Updated the issue description with remaining task and unassigned myself.

🇮🇳India annmarysruthy

annmarysruthy made their first commit to this issue’s fork.

🇮🇳India annmarysruthy

@marcus_johansson Could you please clarify a few details:

  • Is the intention to update only the System Prompt field within ai_agents/src/Form/AiAgentForm.php, or are there other locations that need to be updated as well?
  • Could you elaborate on the purpose and use case for introducing a separate "System Prompt" in addition to "Agent Instructions"?
🇮🇳India annmarysruthy

@smustgrave added commits for review comments. Kindly review.

Checked the existing tests and could not find one related to sorting. Therefore I created a new test.

🇮🇳India annmarysruthy

I was able to reproduce the issue by following these steps:

  1. Enabled the "Convert line breaks into HTML" filter for a text format at /admin/config/content/formats.
  2. Created a node using that text format.
  3. Entered Test in the body using the "Source" view in CKEditor, ensuring no extra whitespace or newlines were present.
  4. Saved the node and viewed the output on the frontend.

Even though the saved source remains

Test

, the rendered output includes a line break (
) between "Test" and the tag.

_filter_autop() function in filter.module is responsible for converting line breaks into
and wrapping text in

tags. Within this function, there's a $block regex pattern that defines all block-level elements:
$block = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|input|p|h[1-6]|fieldset|legend|hr|article|aside|details|figcaption|figure|footer|header|hgroup|menu|nav|section|summary)';
Since is listed as a block-level element,a newline is added before any tag. Later in the processing, this newline gets transformed into

Proposed Resolution:
According to HTML specifications, is an inline-level element, not a block-level one. Therefore, it should not be included in the $block list used by _filter_autop().

Removing input from the $block list resolves the issue, as the newline is no longer added before the tag, and no
is inserted.

🇮🇳India annmarysruthy

Checked all occurrences of function_exists() and changed 6 files. In my opinion, Rest of the occurrences are better kept as function_exists() itself. Kindly review MR

🇮🇳India annmarysruthy

Fixed remaining violations and phpstan issue. Kindly review

🇮🇳India annmarysruthy

Fixed remaining violations. Kindly review

🇮🇳India annmarysruthy

@quietone Should we replace all existences of function_exists() with is_callable() ?

🇮🇳India annmarysruthy

Replicated the issue. The below changes in core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php could fix the issue:

<?php

namespace Drupal\comment\Plugin\views\sort;

use Drupal\views\Attribute\ViewsSort;
use Drupal\views\Plugin\views\sort\Date;

/**
 * Sort handler for the newer of last comment / entity updated.
 *
 * @ingroup views_sort_handlers
 */
#[ViewsSort("comment_ces_last_updated")]
class StatisticsLastUpdated extends Date {

  /**
   * The node table.
   */
  // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing
  protected ?string $node_table;

  /**
   * The field alias.
   */
  // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing
  protected ?string $field_alias;

  /**
   * {@inheritdoc}
   */
  public function query() {
    $this->ensureMyTable();
    $this->node_table = $this->query->ensureTable('node_field_data', $this->relationship);
    $this->query->addField($this->node_table, 'changed');
    $this->field_alias = $this->query->addOrderBy(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->tableAlias . ".last_comment_timestamp)", $this->options['order'], $this->tableAlias . '_' . $this->field);
  }

}

In the above solution, issue is fixed with fewer changes than the proposed solution in the issue: making $field_alias nullable and using the proper table (node_field_data instead of node).

🇮🇳India annmarysruthy

Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies .

🇮🇳India annmarysruthy

Deprecated the block and removed it from theme and profile. still getting a few test failures in merge request !11835.

🇮🇳India annmarysruthy

@acbramley Can I skip deprecating the block and directly remove it? But what if the block is currently being used in sites.

🇮🇳India annmarysruthy

annmarysruthy changed the visibility of the branch 3518990-deprecate-syndicateblock to hidden.

🇮🇳India annmarysruthy

Hi @prashant.c, I was unable to replicate the issue. tried with openai(different models) and gemini.

🇮🇳India annmarysruthy

Raised an MR #2 for improving the readability of code snippets in the Chat Generation Explorer.

🇮🇳India annmarysruthy

Changed validation error message to "This value is not a valid extension name." Kindly review MR.

Production build 0.71.5 2024