Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Small changes #8103

Merged
merged 41 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
26bcc5b
remove redundant variable
Sep 25, 2020
65ce922
Merge pull request #7942 from shiftenterdev/price-adjustment-fix
dobooth Sep 28, 2020
9a43459
Add missing leading dot for `.well-known`
fnogatz Sep 29, 2020
f7ccde2
Merge pull request #7954 from fnogatz/patch-1
keharper Sep 30, 2020
f569e9b
Merge master
dobooth Oct 5, 2020
5d673b5
Update attributes.md
mage2pratik Oct 16, 2020
c9f4ebe
Add link to KB article for css and js optimization
meker12 Oct 16, 2020
72440c2
Update technical-details.md
jonashrem Oct 16, 2020
7cfcfb0
Update technical-details.md
jonashrem Oct 16, 2020
db89ff1
Fix duplicated text
meker12 Oct 16, 2020
3f8798f
Added requirement about minimum version of ece-tools for MQP
viktym Oct 17, 2020
8950509
Moved the else logic before if condition
mage2pratik Oct 17, 2020
90ca451
Fix a typo of bin/magento command line setup:config:set argument/option
mage2pratik Oct 18, 2020
24fa249
Fix typo (similiar -> similar)
marvinhinz Oct 18, 2020
1d6d2ff
Correct spelling
marvinhinz Oct 18, 2020
12b6e98
Update index.md
dangminh Oct 19, 2020
cf11aa9
Fixing mispelled 'Braintree' word.
jorgehs91 Oct 19, 2020
def5639
Merge branch 'master' into small-changes
Oct 19, 2020
0939df3
Merge branch 'master' into patch-58
dobooth Oct 19, 2020
f76c131
Merge branch 'master' into small-changes
Oct 19, 2020
e06073f
Merge pull request #8074 from mage2pratik/patch-58
dobooth Oct 19, 2020
65bd80d
Merge pull request #8076 from jonashrem/patch-17
dobooth Oct 19, 2020
c7d154d
Merge pull request #8078 from viktym/patch-3
dobooth Oct 19, 2020
1a9890d
Merge pull request #8080 from mage2pratik/patch-60
dobooth Oct 19, 2020
628c402
Merge pull request #8081 from mage2pratik/patch-59
dobooth Oct 19, 2020
042f13a
Merge pull request #8083 from marvinhinz/patch-2
dobooth Oct 19, 2020
8aa3fa6
Merge pull request #8082 from marvinhinz/patch-1
dobooth Oct 19, 2020
b647b5f
Merge pull request #8086 from jorgehs91/patch-1
dobooth Oct 19, 2020
97aa491
Merge pull request #8084 from dangminh/patch-1
dobooth Oct 19, 2020
b06ae9e
Merge branch 'master' into mae-mcloud-3539-note-about-css-and-js-opti…
dobooth Oct 19, 2020
43353fc
Merge pull request #8075 from magento/mae-mcloud-3539-note-about-css-…
dobooth Oct 19, 2020
e4eba06
Index Status Updated (#8089)
Oct 19, 2020
3a3c8d5
Fix code sample
meker12 Oct 20, 2020
2e241a5
Merge branch 'master' into small-changes
Oct 21, 2020
78cf213
Merge branch 'master' into mae-fix-bypass-vcl-code-sample-1
dobooth Oct 21, 2020
0d4a6c2
Merge pull request #8096 from magento/mae-fix-bypass-vcl-code-sample-1
dobooth Oct 21, 2020
9c1b4b0
Purged Magento 1 reference from Create an Extension
Oct 21, 2020
516f63e
Fixed release line for Packaging a component
Oct 21, 2020
40c163b
Break symlink (#8102)
keharper Oct 21, 2020
3c28d63
removed space from link
dobooth Oct 21, 2020
54b49d6
Merge pull request #8100 from igorin/patch-3
dobooth Oct 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/_data/codebase/v2_4/mrg/b2b/RequisitionList.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ last_modified_at: '2017-02-15 17:02:23 +0300'
content: "## Overview\n\nThe Magento_RequisitionList module allows a customer to create
multiple lists of frequently-purchased items and use those lists for order placement.
This feature is available for both logged-in users and guests.\n \nRequisitionList
functionality is similiar to wish lists, but it has the following differences: \n\n*
functionality is similar to wish lists, but it has the following differences: \n\n*
A requisition list is not purged after sending items to the shopping cart. It can
be used to place multiple orders.\n\n* The UI for requisition lists has been modified
to a compact view in order to display large number of items. \n\nThe merchant can
Expand Down
2 changes: 1 addition & 1 deletion src/_data/whats-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ entries:
contributor: jeff-matthews
profile: https://github.com/jeff-matthews
- description: Standardized [release terminology](https://devdocs.magento.com/release/policy/)
related to patch releases, hotfixes, invdividual fixes, and custom patches.
related to patch releases, hotfixes, individual fixes, and custom patches.
versions: 2.4.0
type: Major Update
date: July 27, 2020
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/cdn/fastly-vcl-allowlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ After reviewing and updating the code for your environment, use either of the fo
- Add the **VCL** snippet content:

```conf
if ((req.url ~ "^/admin") && !(client.ip ~ allowlist) && !req.http.Fastly-FF) { error 403 "Forbidden"}
if ((req.url ~ "^/admin") && !(client.ip ~ allowlist) && !req.http.Fastly-FF) { error 403 "Forbidden";}
```

1. Click **Create** to generate the VCL snippet file with the name pattern `type_priority_name.vcl`, for example `recv_5_allowlist.vcl`
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/project/project-patch.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ When you update `{{ site.data.var.ct }}` or the {{ site.data.var.mcp-prod }} pac

{% include cloud/note-upgrade.md %}

The Magento Quality Patches package is a dependency for the {{ site.data.var.mcp-prod }} and {{site.data.var.ct}} packages. To apply the latest patches, you must have [the latest version of {{ site.data.var.ct }}]({{site.baseurl}}/cloud/project/ece-tools-update.html) installed.
The Magento Quality Patches package is a dependency for the {{ site.data.var.mcp-prod }} and {{site.data.var.ct}} packages. To apply the latest patches, you must have [the latest version of {{ site.data.var.ct }}]({{site.baseurl}}/cloud/project/ece-tools-update.html) installed. The minimum required version of {{site.data.var.ct}} is 2002.1.2.

## View available patches and status

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,4 @@ Next steps
* [Set up your development systems]({{ page.baseurl }}/config-guide/deployment/pipeline/development-system.html)
* [Set up your build system]({{ page.baseurl }}/config-guide/deployment/pipeline/build-system.html)
* [Set up your production system]({{ page.baseurl }}/config-guide/deployment/pipeline/production-system.html)
* [config-cli-config-set]: {{ page.baseurl }}/config-guide/cli/config-cli-subcommands-config-mgmt-set.html#config-cli-config-set
* [Set configuration values]({{ page.baseurl }}/config-guide/cli/config-cli-subcommands-config-mgmt-set.html#config-cli-config-set)
2 changes: 1 addition & 1 deletion src/guides/v2.3/config-guide/redis/redis-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ where
|session-save-redis-sentinel-master|sentinel_master|Redis Sentinel master name|empty|
|session-save-redis-sentinel-servers|sentinel_servers|List of Redis Sentinel servers, comma separated|empty|
|session-save-redis-sentinel-verify-master|sentinel_verify_master|Verify Redis Sentinel master status flag|0 (false)|
|session-save-redis-sentinel-connect-retires|sentinel_connect_retries|Connection retries for sentinels|5|
|session-save-redis-sentinel-connect-retries|sentinel_connect_retries|Connection retries for sentinels|5|

### Example command

Expand Down
22 changes: 20 additions & 2 deletions src/guides/v2.3/extension-dev-guide/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,25 @@ use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\Patch\PatchVersionInterface;

/**
* Class add customer example attribute to customer
*/
class AddCustomerExampleAttribute implements DataPatchInterface
{

/**
* @var ModuleDataSetupInterface
*/
private $moduleDataSetup;

/**
* @var CustomerSetupFactory
*/
private $customerSetupFactory;

/**
* @param ModuleDataSetupInterface $moduleDataSetup
* @param CustomerSetupFactory $customerSetupFactory
*/
public function __construct(
ModuleDataSetupInterface $moduleDataSetup,
CustomerSetupFactory $customerSetupFactory
Expand All @@ -73,6 +85,9 @@ class AddCustomerExampleAttribute implements DataPatchInterface
$this->customerSetupFactory = $customerSetupFactory;
}

/**
* @inheritdoc
*/
public function apply()
{
$customerSetup = $this->customerSetupFactory->create(['setup' => $this->moduleDataSetup]);
Expand All @@ -82,7 +97,7 @@ class AddCustomerExampleAttribute implements DataPatchInterface
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public static function getDependencies()
{
Expand All @@ -91,6 +106,9 @@ class AddCustomerExampleAttribute implements DataPatchInterface
];
}

/**
* @inheritdoc
*/
public function getAliases()
{
return [];
Expand Down
12 changes: 8 additions & 4 deletions src/guides/v2.3/extension-dev-guide/indexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,15 @@ The following figure shows the logic for partial reindexing.

### Indexer status {#m2devgde-indexing-status}

Depending on whether an index data is up to date, an indexer status value is one of the following:
Depending on whether index data is up to date, an indexer status value is one of the following:

* valid - data is synchronized, no reindex required
* invalid - the original data was changed, the index should be updated
* working - indexing is in progress
Database Status|Admin Status|Description
`valid`|Ready|Data is synchronized, no reindex required
`invalid`|Reindex Required|The original data was changed, the index should be updated
`working`|Processing|Indexing is in progress

The database status can be seen when viewing the SQL table `indexer_state`.
The admin status can be seen when viewing the indexer grid in Magento Admin or when running the index status from the CLI.

The Magento indexing mechanism uses the status value in reindex triggering process. You can check the status of an indexer in the [Admin](https://glossary.magento.com/admin) panel in **System >** Tools **> Index Management** or manually using the [command line]({{ page.baseurl }}/config-guide/cli/config-cli-subcommands-index.html#view-indexer-status).

Expand Down
3 changes: 1 addition & 2 deletions src/guides/v2.3/extension-dev-guide/price-adjustments.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ class Adjustment implements AdjustmentInterface
*/
public function applyAdjustment($amount, SaleableInterface $saleableItem, $context = [])
{
$return = $amount + self::ADJUSTMENT_VALUE;
return $return;
return $amount + self::ADJUSTMENT_VALUE;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Following is an example of the command pool configuring for the Braintree paymen

```xml
...
<!-- BrainreeCommandPool - a command pool for the Braintree payments provider -->
<!-- BraintreeCommandPool - a command pool for the Braintree payments provider -->
<virtualType name="BraintreeCommandPool" type="Magento\Payment\Gateway\Command\CommandPool">
<arguments>
<argument name="commands" xsi:type="array">
Expand All @@ -38,7 +38,7 @@ Following is an example of the command pool configuring for the Braintree paymen
</arguments>
</virtualType>
...
<!-- Adding BrainreeCommandPool to the Braintree payment method configuration:-->
<!-- Adding BraintreeCommandPool to the Braintree payment method configuration:-->
<virtualType name="BraintreeFacade" type="Magento\Payment\Model\Method\Adapter">
<arguments>
...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ If you are integrating Magento entities such as variable and widget as plugins,

After loading, modifying, and merging all configurations, Magento serializes the result into a JSON object and passes it to the UI component.

In your module's `view/base/requirejs-config.php` file, add a shim configuration entry for your editor in order to have RequireJS load it correctly.
In your module's `view/base/requirejs-config.js` file, add a shim configuration entry for your editor in order to have RequireJS load it correctly.

**Example:** CKEditor\CKEditor4\view\base\requirejs-config.js

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,11 @@ class ProductCategoryFilter implements CustomFilterInterface
{
$value = $filter->getValue();
$conditionType = $filter->getConditionType() ?: 'in';
$filterValue = [$value];
if (($conditionType === 'in' || $conditionType === 'nin') && is_string($value)) {
$value = explode(',', $value);
} else {
$value = [$value];
$filterValue = explode(',', $value);
}
$categoryFilter = [$conditionType => $value];
$categoryFilter = [$conditionType => $filterValue];

/** @var Collection $collection */
$collection->addCategoriesFilter($categoryFilter);
Expand Down

This file was deleted.

80 changes: 80 additions & 0 deletions src/guides/v2.4/graphql/mutations/generate-customer-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
group: graphql
title: generateCustomerToken mutation
---

Use the `generateCustomerToken` mutation to create a new customer token.

To return or modify information about a customer, Magento recommends you use customer tokens in the header of your GraphQL calls. However, you also can use [session authentication]({{ page.baseurl }}/get-started/authentication/gs-authentication-session.html).

## Syntax

```graphql
mutation {
generateCustomerToken(
email: String!
password: String!
) {
CustomerToken
}
}
```

## Example usage

The following call creates a new customer token.

**Request:**

```graphql
mutation {
generateCustomerToken(
email: "[email protected]"
password: "b0bl0bl@w"
) {
token
}
}
```

**Response:**

```json
{
"data": {
"generateCustomerToken": {
"token": "ar4116zozoagxty1xjn4lj13kim36r6x"
}
}
}
```

## Input attributes

The `generateCustomerToken` mutation requires the following inputs:

Attribute | Data Type | Description
--- | --- | ---
`email` | String | The customer's email address
`password` | String | The customer's password

## Output attributes

The `generateCustomerToken` mutation returns a valid token for the customer.

Attribute | Data Type | Description
--- | --- | ---
`token` | String | The customer token

## Errors

Error | Description
--- | ---
`Specify the "email" value.` | The value specified in the `email` argument is empty.
`Specify the "password" value.` | The value specified value in the `password` argument is empty.
`The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.` | Authentication error. The email or password is incorrect, or the customer account is locked.

## Related topics

* [customer query]({{page.baseurl}}/graphql/queries/customer.html)
* [revokeCustomerToken mutation]({{page.baseurl}}/graphql/mutations/revoke-customer-token.html)
3 changes: 3 additions & 0 deletions src/guides/v2.4/performance-best-practices/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ The **Developer** tab and options are only available in [Developer mode]({{ page

When you activate the **Enable JavaScript Bundling** option, you allow Magento to merge all JS resources into one or a set of bundles that are loaded in storefront pages. Bundling JS results in fewer requests to the server, which improves page performance. It also helps the browser cache JS resources on the first call and reuse them for all further browsing. This option also brings lazy evaluation, as all JS is loaded as text. It initiates analysis and evaluation of code only after specific actions are triggered on the page. However, this setting is not recommended for stores where the first page load time is extremely critical, because all JS content will be loaded on the first call.

{:.bs-callout-info}
See [CSS and Javascript file optimization on Magento Commerce Cloud and Magento Commerce](https://support.magento.com/hc/en-us/articles/360044482152) in the _Magento Help Center_ for more information about optimizing CSS and Javascript.

### Bundling tips

* Magento recommends that you use third-party tools for minification and bundling (like [r.js](http://requirejs.org/)). Magento built-in mechanisms are not optimal and are shipped as fallback alternatives.
Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/security/security-txt.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ When security vulnerabilities are discovered by researchers, proper reporting ch
Magento merchants can enter their contact information for [security issue reporting](https://docs.magento.com/user-guide/stores/security-issue-reporting.html) from the Magento _Admin_. For developers, the `Magento_Securitytxt` module provides the following functionality:

- Allows security configurations to be saved from the _Admin_.
- Contains a router to match application action class for requests to the `well-known/security.txt` and `.well-known/security.txt.sig` files.
- Contains a router to match application action class for requests to the `.well-known/security.txt` and `.well-known/security.txt.sig` files.
- Serves the content of the `.well-known/security.txt` and `.well-known/security.txt.sig` files.

A valid `security.txt` file might look like the following:
Expand Down
2 changes: 1 addition & 1 deletion src/marketplace/sellers/extension-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Magento Marketplace does not support encrypted extensions at this time.

Testing your extension in advance reduces the time it takes to pass Technical Review. For a list of code sniffer rules, see [Magento Extension Quality Program Coding Standard][2].

1. Prepare, validate, and zip your extension as described in Packaging a Component for Magento version [2.x]({{ site.baseurl }}/guides/v2.3/extension-dev-guide/package/package_module.html) or [1.x]({{ site.baseurl }}/marketplace/sellers/packaging-v1x-extensions.html).
1. Prepare, validate, and zip your extension as described in [Packaging a Component]({{site.baseurl}}/guides/v2.4/extension-dev-guide/package/package_module.html).

1. Prepare the following preliminary documentation:

Expand Down