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

Commit 25bd5fb

Browse files
jeff-matthewsCJRakeshJesadiyatwosgkeharper
authored
Small changes (#8337)
* Changed the php code for two-level-cache in v2.3 * Changed the generated folder remove command * Updated the command in sample-data-rc1-cli-24.md file * Updated the command in legacy-file-system-perms.md file * Updated the command which differ from v2.3 to v2.4 * Update get-hosted-pro-url.md (#8315) description mismatch. * Update ui_comp_uiregistry.md (#8276) * Update ui_comp_uiregistry.md Added how to get a list of components used on the current page. * Update ui_comp_uiregistry.md Co-authored-by: Sven Geiß <twosg@users.noreply.github.com> Co-authored-by: Kevin Harper <keharper@users.noreply.github.com> * Update available-stores.md (#8307) * Update available-stores.md Extends the storeconfig object parameter. * Update available-stores.md * Fix wrong cli command (#8296) As per steps, the testsuite is defined in phpunit.xml and not phpunit.xml.dist. To run the tests we have to use phpunit.xml file * Update the doc from v2.2 to v2.4 * Update plugins.md * Update plugins.md * Update product-review-ratings-metadata.md (#8321) Formatting issue. Description of the An encoded rating ID in table display as the fourth column value. * Changed the version from 2.4.2 to 2.4.1 * Update directory-currency.md (#8300) * Update directory-currency.md Multiple currency example with response. * Update directory-currency.md * Update directory-currency.md * Update directory-currency.md * Update directory-currency.md * linting Co-authored-by: Kevin Harper <keharper@users.noreply.github.com> * Update directory-countries.md (#8302) * Update directory-countries.md Differential between Country and Countries query. * Update directory-countries.md * Update directory-countries.md * Update src/guides/v2.3/graphql/queries/directory-countries.md Co-authored-by: Barny Shergold <barny.shergold@vaimo.com> * Update directory-countries.md Co-authored-by: Barny Shergold <barny.shergold@vaimo.com> * Update pickup-locations.md (#8308) * Update pickup-locations.md Modify response, Explain Search Term attribute field. * Update pickup-locations.md * Update pickup-locations.md * linting Co-authored-by: Kevin Harper <keharper@users.noreply.github.com> * Update url-resolver.md (#8310) * Update url-resolver.md Add Example of the Category page and CMS page Queries. * Update url-resolver.md * Update url-resolver.md Co-authored-by: Kevin Harper <keharper@users.noreply.github.com> * Update get-payflow-link-token.md (#8320) * Update get-payflow-link-token.md Added Error Message for the invalid cart id in the query. * Update get-payflow-link-token.md * Update get-payflow-link-token.md Co-authored-by: Kevin Harper <keharper@users.noreply.github.com> * Update customer-payment-tokens.md (#8319) Devdocs improvement for the Errors of query if you are not added header with customer token. * Update custom-attribute-metadata.md (#8318) * Update custom-attribute-metadata.md Modify the Request/Response for the custom attribute metadata. * Update custom-attribute-metadata.md * Update custom-attribute-metadata.md Co-authored-by: Kevin Harper <keharper@users.noreply.github.com> * Update directory-country.md (#8301) * Update directory-country.md Differentiate Country and Countries object with GraphQL Query. * Update directory-country.md * Update directory-country.md * Update directory-country.md * Update directory-country.md * Update directory-country.md * linting Co-authored-by: Kevin Harper <keharper@users.noreply.github.com> Co-authored-by: CJ <cperumal@ztech.io> Co-authored-by: Rakesh Jesadiya <jesadiya.rakesh@gmail.com> Co-authored-by: Sven Geiß <sven@geissweb.de> Co-authored-by: Sven Geiß <twosg@users.noreply.github.com> Co-authored-by: Kevin Harper <keharper@users.noreply.github.com> Co-authored-by: Christopher Daniel <chris.daniel@hey.com> Co-authored-by: Tommy Quissens <tommy.quissens@storefront.be> Co-authored-by: chiranjeevi <52098385+chiranjeevi-cj@users.noreply.github.com> Co-authored-by: Barny Shergold <barny.shergold@vaimo.com>
1 parent 346d721 commit 25bd5fb

21 files changed

+471
-47
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
### Apply file system permissions and ownership {#rc1-samp-ownership}
2+
3+
As part of the sample data upgrade process, you must apply current file system permission and ownership as discussed in the following sections.
4+
Failure to do so will cause your upgrade to fail.
5+
6+
For more information about file system ownership and permissions, see [Overview of ownership and permissions].
7+
8+
#### One-user ownership and permissions
9+
10+
If you run the Magento application as one user (which is typical of shared hosting environments), change file system permissions and ownership as follows:
11+
12+
```bash
13+
cd <magento_root>
14+
```
15+
16+
```bash
17+
chmod -R g+w var vendor pub/static pub/media app/etc
18+
```
19+
20+
```bash
21+
chmod u+x bin/magento
22+
```
23+
24+
To optionally enter all commands on one line, enter the following assuming Magento is installed in `/var/www/html/magento2`:
25+
26+
```bash
27+
cd /var/www/html/magento2 && chmod -R g+w var vendor pub/static pub/media app/etc && chmod u+x bin/magento
28+
```
29+
30+
After you set file system permissions, manually clear the `var/cache`, `var/page_cache`, and `generated` directories.
31+
32+
A sample command follows:
33+
34+
```bash
35+
rm -rf var/cache/* var/page_cache/* generated/*
36+
```
37+
38+
#### Two-user ownership and permissions
39+
40+
If you run the Magento application with two users, enter the following commands as a user with `root` privileges:
41+
42+
```bash
43+
cd <magento_root>
44+
```
45+
46+
```bash
47+
find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
48+
```
49+
50+
```bash
51+
find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
52+
```
53+
54+
```bash
55+
chown -R :<web server group> .
56+
```
57+
58+
```bash
59+
chmod u+x bin/magento
60+
```
61+
62+
To optionally enter all commands on one line, enter the following assuming Magento is installed in `/var/www/html/magento2` and the web server group name is `apache`:
63+
64+
```bash
65+
cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :apache . && chmod u+x bin/magento
66+
```
67+
68+
<!-- Link definitions -->
69+
[Overview of ownership and permissions]: {{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
2+
## Install sample data by cloning repositories {#sample-clone}
3+
4+
This topic discusses how to clone and add Magento sample data if you cloned the Magento GitHub repository. This method is intended only for contributing developers (that is, developers who plan to contribute to the Magento 2 codebase).
5+
6+
If you're not a contributing developer, choose one of the other options displayed in the table of contents on the left side of the page.
7+
8+
Contributing developers can use this method of installing sample data *only* if all of the following are true:
9+
10+
* You use {{site.data.var.ce}}
11+
* You [cloned the Magento 2 repository]({{ page.baseurl }}/install-gde/prereq/dev_install.html).
12+
13+
{:.bs-callout-warning}
14+
You can use sample data with either the `develop` branch (more current) or a released branch (such as `2.4` (more stable)). We recommend you use a released branch because it's more stable. If you're contributing code to the Magento 2 repository and you need the most recent code, use the `develop` branch. Regardless of the branch you choose, you must [clone]({{ page.baseurl }}/install-gde/prereq/dev_install.html) the corresponding branch of the Magento 2 GitHub repository. For example, sample data for the `develop` branch can be used *only* with the Magento 2 `develop` branch.
15+
16+
See the following sections:
17+
18+
* [Clone the sample data repository](#clone-sample-repo)
19+
* [Set file system ownership and permissions](#samp-data-perms)
20+
21+
## Clone the sample data repository {#clone-sample-repo}
22+
23+
This section discusses how to install Magento sample data by cloning the sample data repository. You can clone the sample data repository in any of the following ways:
24+
25+
* Clone with the [SSH protocol](#clone-sample-repo-ssh)
26+
* Clone with the [HTTPS protocol](#instgde-prereq-compose-clone-https)
27+
28+
### Clone with SSH {#clone-sample-repo-ssh}
29+
30+
To clone the Magento sample data GitHub repository using the SSH protocol:
31+
32+
1. In a web browser, go to [the Magento sample data repository](https://github.com/magento/magento2-sample-data).
33+
1. Next to the name of the branch, click **SSH** from the list.
34+
1. Click **Copy to clipboard**
35+
36+
The following figure shows an example.
37+
38+
![Clone the Magento GitHub repository using SSH]({{ site.baseurl }}/common/images/install_mage2_clone-ssh.png){:width="650px"}
39+
40+
1. Change to your web server's docroot directory.
41+
42+
Typically, for Ubuntu, it's `/var/www` and for CentOS it's `/var/www/html`.
43+
44+
Need [help locating the docroot?]({{ page.baseurl }}/install-gde/basics/basics_docroot.html)
45+
46+
1. Enter `git clone` and paste the value you obtained from step 1.
47+
48+
An example follows:
49+
50+
```bash
51+
git clone git@github.com:magento/magento2-sample-data.git
52+
```
53+
54+
1. Wait for the repository to clone on your server.
55+
56+
{:.bs-callout-info}
57+
If the following error displays, make sure you [shared your SSH key](https://help.github.com/articles/generating-ssh-keys/) with GitHub:<br>
58+
59+
```terminal
60+
Cloning into 'magento2'...
61+
Permission denied (publickey).
62+
fatal: The remote end hung up unexpectedly
63+
```
64+
65+
1. Ensure you checkout the branch of the sample data repository that corresponds with the branch you used from the main `magento2` repository.
66+
67+
For example:
68+
69+
If you used the `2.4-develop` branch of the Magento 2 repository, the Sample Data branch should be `2.4-develop`.
70+
71+
If you used the `2.4.1` branch of the Magento 2 repository, the Sample Data branch should be `2.4.1`.
72+
73+
To checkout the correct branch, run the following command from the sample data repository's root directory (assuming you need the `2.4.1` branch):
74+
75+
```bash
76+
git checkout 2.4.1
77+
```
78+
79+
1. Change to `<magento_root>`.
80+
1. Enter the following command to create symbolic links between the files you just cloned so sample data works properly:
81+
82+
```bash
83+
php -f <sample-data_clone_dir>/dev/tools/build-sample-data.php -- --ce-source="<path_to_your_magento_instance>"
84+
```
85+
86+
1. Wait for the command to complete.
87+
88+
1. See [Set file system permissions and ownership](#samp-data-perms).
89+
90+
### Clone with HTTPS {#instgde-prereq-compose-clone-https}
91+
92+
To clone the Magento sample data GitHub repository using the HTTPS protocol:
93+
94+
1. In a web browser, go to [the Magento sample data repository](https://github.com/magento/magento2-sample-data).
95+
1. On the right side of the page, under the **clone URL** field, click **HTTPS**.
96+
1. Click **Copy to clipboard**.
97+
98+
The following figure shows an example.
99+
100+
![Clone the Magento GitHub repository using HTTPS]({{ site.baseurl }}/common/images/install_mage2_clone-https.png){:width="650px"}
101+
102+
1. Change to your web server's docroot directory.
103+
104+
Typically, for Ubuntu, it's `/var/www` and for CentOS it's `/var/www/html`.
105+
106+
1. Enter `git clone` and paste the value you obtained from step 1.
107+
108+
An example follows:
109+
110+
```bash
111+
git clone https://github.com/magento/magento2-sample-data.git
112+
```
113+
114+
1. Wait for the repository to clone on your server.
115+
1. Ensure you checkout the branch of the sample data repository that corresponds with the branch you used from the main `magento2` repository.
116+
117+
For example:
118+
119+
If you used the `2.4-develop` branch of the Magento 2 repository, the Sample Data branch should be `2.4-develop`.
120+
121+
If you used the `2.4.1` branch of the Magento 2 repository, the Sample Data branch should be `2.4.1`.
122+
123+
To checkout the correct branch, run the following command from the sample data repository's root directory (assuming you need the `2.4.1` branch):
124+
125+
```bash
126+
git checkout 2.4.1
127+
```
128+
129+
1. Change to `<magento_root>`.
130+
1. Enter the following command to create symbolic links between the files you just cloned so sample data works properly:
131+
132+
```bash
133+
php -f <sample-data_clone_dir>/dev/tools/build-sample-data.php -- --ce-source="<path_to_your_magento_instance>"
134+
```
135+
136+
For example,
137+
138+
```bash
139+
php -f <sample-data_clone_dir>/dev/tools/build-sample-data.php -- --ce-source="/var/www/magento2"
140+
```
141+
142+
1. Wait for the command to complete.
143+
1. See the next section.
144+
145+
{:.bs-callout-warning}
146+
If you're installing sample data _after_ installing Magento, you must also run the following command to update the database and schema:
147+
148+
```bash
149+
<magento_root>/bin/magento setup:upgrade
150+
```
151+
152+
## Set file system ownership and permissions {#samp-data-perms}
153+
154+
Because the `php build-sample-data.php` script creates symlinks between the sample data repository and your Magento 2 repository, you must set file system permissions and ownership in the sample data repository. Failure to do so results in errors accessing the storefront.
155+
156+
To set file system permissions and ownership on the sample data repository:
157+
158+
1. Change to your sample data clone directory.
159+
1. Set ownership:
160+
161+
```bash
162+
chown -R :<your web server group name> .
163+
```
164+
165+
Typical examples:
166+
167+
* CentOS: `chown -R :apache .`
168+
169+
* Ubuntu: `chown -R :www-data .`
170+
171+
1. Set permissions:
172+
173+
```bash
174+
find . -type d -exec chmod g+ws {} +
175+
```
176+
177+
1. Clear static files:
178+
179+
```bash
180+
cd <your {{site.data.var.ce}} install dir>
181+
```
182+
183+
```bash
184+
rm -rf var/cache/* var/page_cache/* generated/*
185+
```
186+
187+
<!-- ABBREVIATIONS -->
188+
189+
*[contributing developer]: A developer who contributes code to the Magento 2 CE codebase
190+
*[contributing developers]: Developers who contribute code to the Magento 2 CE codebase
191+
*[Contributing developers]: Developers who contribute code to the Magento 2 CE codebase

src/_includes/install/sampledata/sample-data-rc1-cli-24.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ After you have reset file system permissions:
6565

6666
1. If you have not done so already, log in to your Magento server as, or switch to, the Magento file system owner.
6767
1. Change to your Magento installation directory.
68-
1. Manually clear the `var/cache`, `var/page_cache`, and `var/generation` directories.
68+
1. Manually clear the `var/cache`, `var/page_cache`, and `generated` directories.
6969

7070
A sample command follows:
7171

7272
```bash
73-
rm -rf var/cache/* var/page_cache/* var/generation/*
73+
rm -rf var/cache/* var/page_cache/* generated/*
7474
```
7575

7676
1. Upgrade Magento:
@@ -79,7 +79,7 @@ After you have reset file system permissions:
7979
bin/magento setup:upgrade
8080
```
8181

82-
{% include install/sampledata/file-sys-perms-digest.md %}
82+
{% include install/sampledata/file-sys-perms-digest-24.md %}
8383

8484
<!-- Link definitions -->
8585
[Magento file system owner]: {{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html

src/guides/v2.3/config-guide/cache/two-level-cache.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,28 @@ Magento stores the hashed data version in Redis, with the suffix ':version' appe
2020

2121
```php
2222
'cache' => [
23-
[
23+
'frontend' => [
2424
'default' => [
25-
'backend' => '\\Magento\\Framework\\Cache\\Backend\\RemoteSynchronizedCache',
26-
'backend_options' => [
27-
'remote_backend' => '\\Magento\\Framework\\Cache\\Backend\\Redis',
28-
'remote_backend_options' => [
29-
'persistent' => 0,
30-
'server' => 'localhost',
31-
'database' => '0',
32-
'port' => '6370',
33-
'password' => '',
34-
'compress_data' => '1',
35-
],
36-
'local_backend' => 'Cm_Cache_Backend_File',
37-
'local_backend_options' => [
38-
'cache_dir' => '/dev/shm/'
39-
]
40-
],
41-
'frontend_options' => [
42-
'write_control' => false,
43-
],
44-
]
25+
'backend' => '\\Magento\\Framework\\Cache\\Backend\\RemoteSynchronizedCache',
26+
'backend_options' => [
27+
'remote_backend' => '\\Magento\\Framework\\Cache\\Backend\\Redis',
28+
'remote_backend_options' => [
29+
'persistent' => 0,
30+
'server' => 'localhost',
31+
'database' => '0',
32+
'port' => '6370',
33+
'password' => '',
34+
'compress_data' => '1',
35+
],
36+
'local_backend' => 'Cm_Cache_Backend_File',
37+
'local_backend_options' => [
38+
'cache_dir' => '/dev/shm/'
39+
]
40+
],
41+
'frontend_options' => [
42+
'write_control' => false,
43+
],
44+
]
4545
],
4646
'type' => [
4747
'default' => ['frontend' => 'default'],

src/guides/v2.3/extension-dev-guide/plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Use the following method names for the `_construct` method in the plugin class:
9595

9696
Magento runs all before methods ahead of the call to an observed method. These methods must have the same name as the observed method with 'before' as the prefix.
9797

98-
You can use before methods to change the arguments of an observed method by returning a modified argument. If there is more than one argument, the method should return an array of those arguments. If the method does not change the argument for the observed method, it should return a `null` value.
98+
You can use before methods to change the arguments of an observed method by returning a modified argument. If there are any arguments, the method should return an array of those arguments. If the method does not change the argument for the observed method, it should return a `null` value.
9999

100100
Below is an example of a before method modifying the `$name` argument before passing it on to the observed `setName` method.
101101

src/guides/v2.3/graphql/queries/custom-attribute-metadata.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,16 @@ The following query returns the attribute type for various custom and EAV attrib
3434
items {
3535
attribute_code
3636
attribute_type
37+
entity_type
38+
input_type
3739
attribute_options {
3840
value
3941
label
4042
}
4143
}
4244
}
4345
}
46+
4447
```
4548

4649
**Response:**
@@ -53,6 +56,8 @@ The following query returns the attribute type for various custom and EAV attrib
5356
{
5457
"attribute_code": "size",
5558
"attribute_type": "Int",
59+
"entity_type": "catalog_product",
60+
"input_type": "select",
5661
"attribute_options": [
5762
{
5863
"value": "91",
@@ -139,6 +144,8 @@ The following query returns the attribute type for various custom and EAV attrib
139144
{
140145
"attribute_code": "color",
141146
"attribute_type": "Int",
147+
"entity_type": "catalog_product",
148+
"input_type": "select",
142149
"attribute_options": [
143150
{
144151
"value": "49",
@@ -203,7 +210,7 @@ The `AttributeInput` input object requires the following attributes.
203210
Attribute | Data Type | Description
204211
--- | --- | ---
205212
`attribute_code` | String | The unique identifier for an attribute code. This value should be in lowercase letters without spaces
206-
`entity_type` | String | The type of entity that defines the attribute
213+
`entity_type` | String | The type of entity that defines the attribute, such as `catalog_product`, `catalog_category`, or `customer`
207214

208215
## Output attributes
209216

@@ -214,7 +221,7 @@ Attribute | Data Type | Description
214221
`attribute_code` | String | The unique identifier for an attribute code. This value should be in lowercase letters without spaces
215222
`attribute_options` | [`AttributeOption`] | An array of attribute options
216223
`attribute_type` | String | The data type of the attribute
217-
`entity_type` | String | The type of entity that defines the attribute
224+
`entity_type` | String | The type of entity that defines the attribute, such as `catalog_product`, `catalog_category`, or `customer`
218225
`input_type` | String | The frontend input type of the attribute
219226

220227
### AttributeOption object

0 commit comments

Comments
 (0)