Adobe AD0-E722 Practice Test - Questions Answers, Page 4
List of questions
Question 31

A custom cron job has been added to an Adobe Commerce system to collect data for several reports. Its crontab. xml configuration is as follows:
The job is data intensive and runs for between 20 and 30 minutes each night.
Within a few days of deployment, it is noticed that the sites sitemap. xml file has not been updated since the new job was added.
What should be done to fix this issue?
Explanation:
The issue here is that the gather_reporting_data job is running for a long time and blocking the sitemap_generate job from running. The solution is to create a new cron group for the reporting job and specify <use_separate_process>i</use_separate_process> so that the reporting job runs in a separate process and does not block the sitemap_generate job.Reference: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/architecture/starter-architecture.html?lang=en#cron-groups-and-processes
Question 32

A developer needs to uninstall two custom modules as well as the database data and schemas. The developer uses the following command: bin/magento module:uninstall Vendor_SampleMinimal Vendor_SampleModifyContent
When the command is run from CLI, the developer fails to remove the database schema and data defined in the module Uninstall class. Which three requirements should the Architect recommend be checked to troubleshoot this issue? (Choose three.)
Question 33

A merchant is utilizing an out-of-the-box Adobe Commerce application and asks to add a new reward card functionality for customers. During the code review, the Adobe Commerce Architect notices the reward_card_number attribute setup created for this functionality is causing the customer attribute to be unavailable in the My account/My rewards page template.
What should be added to set the customer attribute correctly?
Explanation:
The group property determines which section of the customer account the attribute belongs to. By setting the group property to 1, the reward_card_number attribute will be assigned to the default group, which is the Account Information section.This will make the attribute available in the My account/My rewards page template.Reference: https://experienceleague.adobe.com/docs/commerce-admin/customers/customer-accounts/attributes/attribute-properties.html?lang=en#group1
Question 34

An Architect needs to review a custom product feed export module that a developer created for a merchant. During final testing before the solution is deployed, the product feed output is verified as correct. All unit and integration tests for code pass.
However, once the solution is deployed to production, the product price values in the feed are incorrect for several products. The products with incorrect data are all currently part of a content staging campaign where their prices have been reduced.
What did the developer do incorrectly that caused the feed output to be incorrect for products in the content staging campaign?
Explanation:
Option C is correct because the developer did not check for an active content staging campaign and emulate the campaign state when retrieving product data. Content staging campaigns can modify the product data such as price, name, description, and so on, based on a schedule.To get the correct product data for a specific date and time, the developer needs to use the Magento\Staging\Model\VersionManager class to set the current version ID and emulate the campaign state1. Otherwise, the product data will be retrieved from the default store view without applying the campaign changes.
Option A is incorrect because retrieving product data directly from the database using the entity_id column is not necessarily wrong. It may not be the best practice, but it does not cause the feed output to be incorrect for products in the content staging campaign.The content staging campaigns are stored in separate tables with a version ID that links to the main product table2. The developer can still join these tables and query the product data based on the version ID and date.
Option B is incorrect because there is no such method as getContentStagingValue in Magento 2. The developer cannot use this method to retrieve the active campaign value of the product data. The correct way to get the product data for a specific campaign is to use the Magento\Staging\Model\VersionManager class as mentioned above.
1: Content Staging | Adobe Commerce Developer Guide
2: Content Staging | Adobe Commerce Developer Guide
Question 35

An Architect agrees to improve company coding standards and discourage using Helper classes in the code by introducing a new check with PHPCS.
The Architect creates the following:
* A new composer package under the AwesomeAgency\CodingStandard\ namespace
* The ruleset. xml file extending the Magento 2 Coding Standard
What should the Architect do to implement the new code rule?
A)
B)
C)
Explanation:
Option C is correct because adjusting the ruleset.xml file with the new rule is the simplest and most effective way to implement the new code rule. The ruleset.xml file defines the coding standards that are applied by PHP_CodeSniffer. By extending the Magento 2 Coding Standard and adding a new rule, the Architect can customize the code analysis and enforce the company coding standards.The new rule can use the Magento2.Namespaces.ForbiddenNamespaces sniff to check for any usage of Helper classes in the code and report them as errors or warnings1.
Option A is incorrect because creating a new composer package under the AwesomeAgency\CodingStandard\ namespace is not enough to implement the new code rule. The composer package is just a way to distribute and install the coding standard, but it does not define the rules themselves.The Architect still needs to create a ruleset.xml file and register it with PHP_CodeSniffer2.
Option B is incorrect because creating a new class \AwesomeAgency\CodingStandard\Ruleset\ForbiddenNamespaces and specifying the rule inside the process method is unnecessary and complicated. The Architect does not need to create a new class or a new sniff for this rule, as there is already an existing sniff in the Magento 2 Coding Standard that can be used for this purpose.The Magento2.Namespaces.ForbiddenNamespaces sniff can be configured with an include-pattern element to specify which namespaces are forbidden1.
1: Magento 2 Coding Standards | Adobe Commerce Developer Guide
2: How to create a custom coding standard | PHP_CodeSniffer Documentation
Question 36

A merchant notices that product price changes do not update on the storefront.
The index management page in the Adobe Commerce Admin Panel shows the following:
* All indexes are set to 'update by schedule'
* Their status is 'ready'
* There are no items in the backlog
* The indexes were last updated 1 minute ago
A developer verifies that updating and saving product prices adds the relevant product IDs into the catalog_product_price_cl changelog table. Which two steps should the Architect recommend to the developer to resolve this issue? (Choose two.)
Explanation:
The issue here is that the product price changes are not reflected on the storefront, even though the indexes are set to update by schedule and there are no items in the backlog. This indicates that there might be some problem with the changelog and indexing process, which are responsible for tracking and applying the data changes to the index tables. Therefore, the Architect should recommend the developer to check if any custom or third-party modules interfere with the changelog and indexing process, and disable or fix them if needed. Additionally, the Architect should recommend the developer to verify that the version_id for the price indexer in the mview_state table is consistent with the last entry for the same column in the changelog table, and re-synchronize them if they are out of sync.This will ensure that the indexer can process all the data changes correctly and update the index tables accordingly.Reference: https://experienceleague.adobe.com/docs/commerce-admin/systems/tools/index-management.html?lang=en#cron-groups-and-processes1https://devdocs.magento.com/guides/v2.4/extension-dev-guide/indexing.html#m2devgde-mview2
Question 37

The development of an Adobe Commerce website is complete. The website is ready to be rolled out on the production environment.
An Architect designed the system to run in a distributed architecture made up of multiple backend webservers that process requests behind a Load Balancer.
After deploying the system and accessing the website for the first time, users cannot access the Customer Dashboard after logging in. The website keeps redirecting users to the sign-in page even though the users have successfully logged in The Architect determines that the session is not being saved properly.
In the 'app/etc/env.php', the session is configured as follows:
What should the Architect do to correct this issue?
Question 38

An Adobe Commerce Architect designs and implements functionality that introduces a new Complex Product Type to the existing Adobe Commerce website. Besides visual demonstration of the new product type, the changes include adjustments to the price index.
The website utilizes a multi-dimensional indexer feature to store the price index. The Architect decides to cover it with integration tests. After creating and running one test, the Architect discovers that database storage is not being fully cleaned.
The test method has the following annotation declaration:
Which adjustment should the Architect make to fix this issue?
Question 39

An Adobe Commerce Architect needs to ensure zero downtime during the deployment process of Adobe Commerce on-premises. Which two steps should the Architect follow? (Choose two.)
Question 40

An Adobe Commerce Architect is working on a scanner that will pull prices from multiple external product feeds. The Architect has a list of vendors and decides to create new config file marketplace.feeds.xml.
Which three steps can the Architect take to ensure validation of the configuration files with unique validation rules for the individual and merged files? (Choose three.)
Question