Pune
Account created on 21 March 2016, over 9 years ago
#

Merge Requests

More

Recent comments

🇮🇳India rajeshreeputra Pune

Created MR with following:

  • Add key module in dev dependency
  • Update configuration form allowing to use the Key module to get api key and shared secret.
  • Manually created a simple authentication key using file key provider and used in config form for key based authentication.
  • Added new getCredentials() to retrieve API key and shared secret from keyValue or config as per key module used.
  • Verified connection is successful with key module as well as with config.

How to use key module with Acquia SEO Content Insights:

  1. Require and install key module.
  2. Create new key with file key provider or any other, I am using the file key provider to create the Conductor credentials key.
  3. Add required details to file, i.e. api_key and shared_secret as json.
  4. Visit /admin/config/development/conductor:
    • You will see a new checkbox option(Use Key module for API credentials storage) under the API Credentials.
    • Check the checkbox option.
    • The API Key dropdown field will appear, allowing you to select the key from the list.
    • Choose the Conductor credentials key.
    • Click on Save configurations.

  5. You will receive a success or error message based on the data in the file path provided in the key.

Remaining work:

  • Update Acquia SEO Content Insights extention to support key module integration.
  • Verified the functionality.
  • Add test coverage for key module integration.
🇮🇳India rajeshreeputra Pune

Created MR with following:

  • Add key module in dev dependency
  • Update configuration form allowing to use the Key module to get api key.
  • Manually created a simple authentication key using file key provider and used in config form for key based authentication.
  • Added new getCredentials() to retrieve API key and url from keyValue or config as per key module used.
  • Verified the functionality.
  • Added test coverage for key module integration.

How to use key module with Acquia Optimize:

  1. Require and install key module.
  2. Create new key with file key provider or any other, I am using the file key provider to create the Acquia Optimize credentials key.
  3. Add required details to file, i.e. api_key and api_url as json.
  4. Visit /admin/config/content/acquia-optimize:
    • You will see a new checkbox option(Use Key module for API key storage) under the API Key Configuration.
    • Check the checkbox option.
    • The API Key dropdown field will appear, allowing you to select the key from the list.
    • Choose the Acquia Optimize credentials key.
    • Click on Save configurations.

  5. You will receive a success or error message based on the data in the file path provided in the key.

Remaining work:

  • Update Acquia Optimize extention to support key module integration.
🇮🇳India rajeshreeputra Pune

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

🇮🇳India rajeshreeputra Pune

Regarding the CI, in the Acquia DAM module, we need to run tests with Drupal versions 9.5, 10, and 11. Therefore, we have set the current version to 10, allowing us to test 9.5 under the previous major version and 11 under the next major version, while also testing with the current version, Drupal 10.

The problem: this is currently testing against 11.x, it should be testing against 11.2. Which is the current minor, yet this project's "current" is actually testing against Drupal 10.3. I wonder if this is a problem with https://www.drupal.org/project/gitlab_templates , or with this project. I haven't touched https://git.drupalcode.org/project/cdn in well over a year, and that is testing against 11.2 🤔

🇮🇳India rajeshreeputra Pune

@wim leers, validated this with the latest 1.x-dev version of XB and Drupal 11.2, following the steps outlined, but encountered an error.

  1. New Drupal project setup
  2. XB UI setup completed
  3. XB site installation completed
  4. Installed test modules (xb_test_sdc, xb_dev_standard, sdc_test_all_props)
  5. Installed Acquia DAM
  6. Applied patch from MR!147
  7. Edited test article with XB
  8. Added XB test SDC with optional image and heading component
  9. Clicked on Add media; selected Acquia DAM from the media source options.
  10. Selected and inserted media; asset thumbnail appears in the settings tab, but the asset does not render in the body.
  11. Error in dblog:
🇮🇳India rajeshreeputra Pune

Adding this to README sound good, let's make it.

🇮🇳India rajeshreeputra Pune

You can also use a stream wrapper if both asset_id and version_id are available.
\Drupal::service('stream_wrapper.acquia_dam')->getViaUri('acquia-dam://<asset_id>/<version_id>')->getExternalUrl();

🇮🇳India rajeshreeputra Pune

I believe this is no longer necessary due to the changes made in the AssetRepository class.
@jappery what's your opinion on this?

🇮🇳India rajeshreeputra Pune

I understand your point, whoever wants to use the collection filter can simply add it to view, since not everyone may need it. Hence we can probably merge this without adding the collection filter in the view.

🇮🇳India rajeshreeputra Pune

@japerry do we need to add the collection filter in the view? and update hook for existing customers/users?

🇮🇳India rajeshreeputra Pune

The anchor mapping differs between Drupal and the DAM system. In Drupal, the key is used to map the attribute, while the value is presented in a dropdown(or other) field for better readability (e.g., "Top Left," "Top Right"). Conversely, the DAM expects the equivalent values in a different format (e.g., "nw," "ne," etc.). This is why we have the $anchor_mapping array in the DAM's EmbedCodeUrlBuilder class.

Hope this resolves your concern. Hence closing.

🇮🇳India rajeshreeputra Pune

You can also try

    /** @var \Drupal\acquia_dam\Plugin\media\Source\Asset $source */
    $source = $media->getSource();
    $embed_codes = $source->getMetadata($media, 'embeds');
    $url = $embed_codes['original']['url'];
🇮🇳India rajeshreeputra Pune

Requesting an early review.
Note: These commands can be further improved.

🇮🇳India rajeshreeputra Pune

Patch for site studio install issue with Drupal 11.2 version.

🇮🇳India rajeshreeputra Pune

@patrickfweston - can you try 1.1.x version with download and sync option enabled?

🇮🇳India rajeshreeputra Pune

This issue was reported for 1.0.x(somewhere around 1.0.6 to 1.0.10). @roam2345 can your verify if this still occurs in the latest version (1.0.x or 1.1.x)? If the issue is resolved, we can close this.

🇮🇳India rajeshreeputra Pune

Tested with 1.1.x - the integration link registration now completes successfully without throwing errors. When assets are deleted from Acquia DAM, the system now removes the corresponding queue entries instead of keeping it in queue and throwing the error.

🇮🇳India rajeshreeputra Pune

The error occurs because the AssetFileEntityHelper constructor requires a strict LoggerChannel type. Updated the type hint in AssetFileEntityHelper.php to use the interface instead.

🇮🇳India rajeshreeputra Pune

Try using getAsset($asset_id) method.

$asset_data = \Drupal::service('acquia_dam.client.factory')->getSiteClient()->getAsset($asset_id);
if ($asset_data) {
  $asset_url = $asset_data['embeds']['original'];
}
🇮🇳India rajeshreeputra Pune

I've implemented the solution suggested by @baluertl in comment #3 Make expand parameters in getAsset configurable so users can select what information is requested Active . After reviewing the codebase, making the expand parameters configurable would provide minimal benefit since:

  1. The expand parameter is only used in getAsset() methods where the detailed data is actually needed.
  2. Each API endpoint has its own dedicated method with optimized or no parameters.
  3. Making it configurable would add unnecessary complexity without significant value.

The changes in MR !181 include:

  • Removed the @todo comment from the $expand property documentation, as keeping it hardcoded is the preferred approach.
  • Removed unnecessary expand parameter from the getAssetVersions() method call, as version endpoints don't require the same expanded data as asset detail endpoints.

This keeps the expand parameters optimized for get asset data endpoint while cleaning up the outdated todo comments. The current implementation is already efficient and doesn't require user configuration.

🇮🇳India rajeshreeputra Pune

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

🇮🇳India rajeshreeputra Pune

rajeshreeputra changed the visibility of the branch 3531765-handling-media-items to hidden.

🇮🇳India rajeshreeputra Pune

With information provided in #5, I have removed the latest commit. Requesting review.

🇮🇳India rajeshreeputra Pune

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

🇮🇳India rajeshreeputra Pune

Added hook to alter media_library_mediaLibrary plugin and added media-library-widget-modal class.

🇮🇳India rajeshreeputra Pune

The default view mode in CKEditor is configured for Drupal local media but does not apply to Acquia DAM media. This distinction arises because Drupal media utilizes view displays, whereas Acquia DAM media relies on embed codes (similar to image styles used for image media types in Drupal).

I hope this clarifies the your concern.

🇮🇳India rajeshreeputra Pune

Missed to remove queueAssets() method removal from processQueue(). Requesting review.

🇮🇳India rajeshreeputra Pune

The Acquia DAM asset rendering from local functions operates as expected. However, the challenge arises with the Site Studio templates. We will address this issue in Acquia DAM, particularly for the custom templates created by users.

🇮🇳India rajeshreeputra Pune

rajeshreeputra changed the visibility of the branch 3476376-provide-local-file to hidden.

🇮🇳India rajeshreeputra Pune

Hello @ankitv18 - test coverage will be added once the discussion from #7 Support Drush Command for Bulk Import Feature Active gets resolved.

🇮🇳India rajeshreeputra Pune

I would like to propose a discussion regarding the implementation of the commands acquiadam:queue-assets and acquiadam:import-assets. Specifically, we need to consider whether these should be implemented as two separate commands or combined into a single command that handles both queuing and processing of assets.

Additionally, I suggest we introduce an option to limit the asset import process. For instance, we could allow users to specify a limit on the number of assets imported from the queue. An example:
./vendor/bin/drush acquiadam:import-assets --batch-size=50 --item-limit=500

This command would process 10 batches to import a total of 500 assets and then stop, even if there are remaining items in the queue. I believe this feature would enhance the flexibility and usability of the asset import process, especially for users dealing with large datasets.

Looking forward to your thoughts on this!

Production build 0.71.5 2024