diff --git a/Gemfile.lock b/Gemfile.lock index d8dbbb40078..655ee3732d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/magento-devdocs/devdocs-theme.git - revision: 7628949ce6d16a6232a0582b32465757a6e446a9 + revision: 42b6ebb8748ae5a3dc836d6891063dbebf31cbfe specs: devdocs (7) jekyll (>= 4.0) diff --git a/_data/toc/cloud-guide.yml b/_data/toc/cloud-guide.yml index 8580beb5f33..80926792ef2 100644 --- a/_data/toc/cloud-guide.yml +++ b/_data/toc/cloud-guide.yml @@ -257,6 +257,9 @@ pages: - label: Set up RabbitMQ service url: /cloud/project/project-conf-files_services-rabbit.html + - label: Restore an environment + url: /cloud/env/restore-environment.html + - label: Configuration management for store settings url: /cloud/live/sens-data-over.html include_versions: [2.2","2.3"] @@ -292,6 +295,9 @@ pages: - label: Manage disk space url: /cloud/project/manage-disk-space.html + - label: Monitor performance + url: /cloud/project/monitor-performance.html + - label: Snapshots and backup management url: /cloud/project/project-webint-snap.html diff --git a/_data/toc/mbi.yml b/_data/toc/mbi.yml index 5d9043c2394..06a7a8206fb 100644 --- a/_data/toc/mbi.yml +++ b/_data/toc/mbi.yml @@ -10,10 +10,6 @@ pages: url: /mbi/docs/import-api.html versionless: true -- label: Cloud onboarding API - url: /mbi/docs/cloud-api.html - versionless: true - - label: Libraries url: /mbi/docs/libraries.html versionless: true diff --git a/_data/toc/module-reference-guide.yml b/_data/toc/module-reference-guide.yml index 513229686ff..53fb5e58c1d 100644 --- a/_data/toc/module-reference-guide.yml +++ b/_data/toc/module-reference-guide.yml @@ -1,6 +1,6 @@ label: Module Reference Guide pages: - - label: INTRODUCTION + - label: Introduction url: /mrg/intro.html - label: Sales @@ -11,46 +11,14 @@ pages: exclude_versions: ["2.0"] children: - - label: Analytics - url: /mrg/ce/Analytics.html - exclude_versions: ["2.1"] - - - label: CatalogAnalytics - url: /mrg/ce/CatalogAnalytics.html - exclude_versions: ["2.1"] - - - label: CustomerAnalytics - url: /mrg/ce/CustomerAnalytics.html - exclude_versions: ["2.1"] - - - label: Instant Purchase - url: /mrg/ce/instant-purchase/ - exclude_versions: ["2.1"] - - - label: QuoteAnalytics - url: /mrg/ce/QuoteAnalytics.html - exclude_versions: ["2.1"] - - - label: ReviewAnalytics - url: /mrg/ce/ReviewAnalytics.html - exclude_versions: ["2.1"] - - label: Sales url: /mrg/ce/Sales.html include_versions: ["2.1", "2.2"] - - label: SalesAnalytics - url: /mrg/ce/SalesAnalytics.html - exclude_versions: ["2.1"] - - label: Signifyd url: /mrg/ce/Signifyd.html include_versions: ["2.2"] - - label: WishlistAnalytics - url: /mrg/ce/WishlistAnalytics.html - exclude_versions: ["2.1"] - - label: Commerce include_versions: ["2.1","2.2"] children: diff --git a/_data/toc/rest-api.yml b/_data/toc/rest-api.yml index 1de1b73cfb5..57ee8978b68 100644 --- a/_data/toc/rest-api.yml +++ b/_data/toc/rest-api.yml @@ -54,6 +54,9 @@ pages: - label: Search using REST url: /rest/performing-searches.html + - label: Search with the /search endpoint + url: /rest/search-endpoint.html + - label: Retrieve filtered search responses url: /rest/retrieve-filtered-responses.html diff --git a/_data/whats-new.yml b/_data/whats-new.yml index 7d8ad7eb593..f7f026189ba 100644 --- a/_data/whats-new.yml +++ b/_data/whats-new.yml @@ -4,8 +4,83 @@ description: | We exclude from this list proofreading, spelling checks, and all minor updates. link: /whats-new.html thread: /whatsnew-feed.xml -updated: Mon Nov 4 13:09:57 2019 +updated: Tue Nov 19 11:49:12 2019 entries: +- description: Added the [Search for products with the /search endpoint](https://devdocs.magento.com/guides/v2.2/rest/search-endpoint.html) + topic to the _REST API Reference_. + versions: 2.2.x, 2.3.x + type: New topic + date: November 19, 2019 + link: https://github.com/magento/devdocs/pull/5929 +- description: Added the "To change the directory from your module" section to the + [Configure Elasticsearch Stopwords](https://devdocs.magento.com/guides/v2.3/config-guide/elasticsearch/es-config-stopwords.html) topic + in the _Configuration Guide_. + versions: 2.3.x + type: Major update + date: November 18, 2019 + link: https://github.com/magento/devdocs/pull/5917 +- description: Published the release notes for [Magento Commerce Cloud v2002.0.22](https://devdocs.magento.com/guides/v2.3/cloud/release-notes/cloud-tools.html) + . + versions: 2.x + type: Major update + date: November 15, 2019 + link: https://github.com/magento/devdocs/pull/5997 +- description: Added additional steps and code to the [Creating a dynamic row system + config](https://devdocs.magento.com/guides/v2.3/ext-best-practices/tutorials/dynamic-row-system-config.html) + section in the _Extensions Best Practices Guide_. + versions: 2.2.x, 2.3.x + type: Major update + date: November 14, 2019 + link: https://github.com/magento/devdocs/pull/5992 +- description: Added a section about consumer handlers to the [Configure message queues](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/message-queues/config-mq.html) + topic in the _PHP Developer Guide_. + versions: 2.2.x, 2.3.x + type: Major update + date: November 11, 2019 + link: https://github.com/magento/devdocs/pull/5964 +- description: Added the [Amazon Sales Channel Release Notes](https://devdocs.magento.com/extensions/amazon-sales/release-notes/) + for version 3.0.1. + versions: 3.0.1-asc + type: Major update + date: November 11, 2019 + link: https://github.com/magento/devdocs/pull/5969 +- description: Added the Examples section to the [ColumnsControls component](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/ui-columnscontrols.html) + topic. + versions: 2.2.x, 2.3.x + type: Technical changes + date: November 6, 2019 + link: https://github.com/magento/devdocs/pull/5944 +- description: Added example and results information to the [ActionsColumn component](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/ui-actionscolumn.html) + topic in the _UI Components Guide_. + versions: 2.2.x, 2.3.x + type: Major update + date: November 6, 2019 + link: https://github.com/magento/devdocs/pull/5940 +- description: Added "Examples" section to the [ActionDeleteComponent](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/ui-actiondelete.html) + topic. + versions: 2.2.x, 2.3.x + type: Technical changes + date: November 6, 2019 + link: https://github.com/magento/devdocs/pull/5937 +- description: Added example and results information to the [ActionsColumn component](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/ui-actionscolumn.html) + topic in the _UI Components Guide_. + versions: 2.2.x, 2.3.x + type: Major update + date: November 6, 2019 + link: https://github.com/magento/devdocs/pull/5940 +- description: Updated procedure to use Fastly Edge Modules to create and upload the + custom VCL
for rerouting specified URL requests to a WordPress backend. See + [Reroute requests to WordPress or another backend](https://devdocs.magento.com/guides/v2.3/cloud/cdn/fastly-vcl-wordpress.html). + versions: 2.x + type: Technical changes + date: November 6, 2019 + link: https://github.com/magento/devdocs/pull/5865 +- description: Added source files, example, and results information to the [Date Component](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/ui-date.html) + topic in the _UI Components Guide_. + versions: 2.2.x, 2.3.x + type: Major update + date: November 5, 2019 + link: https://github.com/magento/devdocs/pull/5831 - description: Updated the [Marketplace EQP API](https://devdocs.magento.com/marketplace/eqp/v1/api.html) documentation for the Early Access Program. versions: '' @@ -573,7 +648,7 @@ entries: date: August 15, 2019 link: https://github.com/magento/devdocs/pull/5123 - description: Added the [Change increment ID for a database entity on particular - store](http://devdocs.magento.com/guides/v2.2/config-guide/multi-site/change-increment-id.html) + store](https://devdocs.magento.com/guides/v2.2/config-guide/multi-site/change-increment-id.html) topic to the Configuration Guide. versions: 2.2.x, 2.3.x type: New topic @@ -2586,7 +2661,7 @@ entries: versions: 2.1.x, 2.2.x, 2.3.x type: Major update date: Aug 04 2018 -- description: Updated the [Configure Docker](https://devdocs.magento.com/guides/v2.2/cloud/reference/docker-config.html) +- description: Updated the [Configure Docker](https://devdocs.magento.com/guides/v2.2/cloud/docker/docker-config.html) documentation to include instructions for deploying to a read-only file system. versions: 2.2.x, 2.3.x type: Technical changes @@ -2736,7 +2811,7 @@ entries: versions: 2.1.x, 2.2.x, 2.3.x type: Technical changes date: Jun 13 2018 -- description: The new ece-tools command—`docker:build`—generates a [Docker Compose](https://devdocs.magento.com/guides/v2.2/cloud/reference/docker-config.html) configuration. +- description: The new ece-tools command—`docker:build`—generates a [Docker Compose](https://devdocs.magento.com/guides/v2.2/cloud/docker/docker-config.html) configuration. versions: 2.1.x, 2.2.x, 2.3.x type: New topic date: Jun 09 2018 @@ -4497,7 +4572,7 @@ entries: versions: 2.x type: New date: Oct 21 2016 -- description: "[How to apply the SUPEE-8788 security patch](https://devdocs.magento.com/guides/m1x/other/ht_install-patches.html#apply-8788)" +- description: "[How to apply the SUPEE-8788 security patch](https://devdocs.magento.com/guides/m1x/other/ht_install-patches.html)" versions: 1.x type: Updated date: Oct 21 2016 diff --git a/_includes/layout/header-scripts.html b/_includes/layout/header-scripts.html index 7ec4e3004a8..4db2ef590d8 100644 --- a/_includes/layout/header-scripts.html +++ b/_includes/layout/header-scripts.html @@ -24,6 +24,11 @@ name: "merchdocs_ee", baseUrl: "https://docs.magento.com/m2/ee/user_guide" }, + { + label: "MBI User Guide", + name: "merchdocs-mbi", + baseUrl: "https://docs.magento.com/mbi" + }, { label: "PWA", name: "pwa-devdocs", diff --git a/_plugins/liquid-tags/remote_markdown.rb b/_plugins/liquid-tags/remote_markdown.rb deleted file mode 100644 index cd3dc09e147..00000000000 --- a/_plugins/liquid-tags/remote_markdown.rb +++ /dev/null @@ -1,39 +0,0 @@ -# "THE BEER-WARE LICENSE" (Revision 42): -# wrote this file. As long as you retain this -# notice you can do whatever you want with this stuff. If we meet some day, and -# you think this stuff is worth it, you can buy me a beer in return. -# Robin Hahling - -require 'net/http' - -module Jekyll - # Remotely fetch a markdown file. - class RemoteMarkdownTag < Liquid::Tag - def initialize(tag_name, text, tokens) - super - - text.strip! - check_protocol(text) - uri = URI(text) - - res = Net::HTTP.get_response(uri) - fail 'resource unavailable' unless res.is_a?(Net::HTTPSuccess) - - @content = res.body.force_encoding("UTF-8") - end - - def render(_context) - @content - end - - private - - def check_protocol(text) - error_message = "remote_markdown: invalid URI given #{text}" - fail error_message unless text =~ URI.regexp(%w(http https ftp ftps)) - end - - end -end - -Liquid::Template.register_tag('remote_markdown', Jekyll::RemoteMarkdownTag) diff --git a/common/images/cloud/cloud-new-relic-notification-channels.png b/common/images/cloud/cloud-new-relic-notification-channels.png new file mode 100644 index 00000000000..636bdbd2d9a Binary files /dev/null and b/common/images/cloud/cloud-new-relic-notification-channels.png differ diff --git a/common/images/cloud/cloud-newrelic-alert-policies.png b/common/images/cloud/cloud-newrelic-alert-policies.png new file mode 100644 index 00000000000..efb763b6bad Binary files /dev/null and b/common/images/cloud/cloud-newrelic-alert-policies.png differ diff --git a/common/images/cloud/cloud-newrelic-dashboard-basic.png b/common/images/cloud/cloud-newrelic-dashboard-basic.png new file mode 100644 index 00000000000..6a7147cdd50 Binary files /dev/null and b/common/images/cloud/cloud-newrelic-dashboard-basic.png differ diff --git a/common/images/cloud/cloud-project-details-new-relic.png b/common/images/cloud/cloud-project-details-new-relic.png new file mode 100644 index 00000000000..3b08c6e5fc6 Binary files /dev/null and b/common/images/cloud/cloud-project-details-new-relic.png differ diff --git a/common/images/copy-git-clone.png b/common/images/copy-git-clone.png new file mode 100644 index 00000000000..eb6a225841b Binary files /dev/null and b/common/images/copy-git-clone.png differ diff --git a/common/images/index_index-modes.png b/common/images/index_index-modes.png index ccf7b7ad319..85d7299e2fb 100644 Binary files a/common/images/index_index-modes.png and b/common/images/index_index-modes.png differ diff --git a/common/images/select-commit-hash.png b/common/images/select-commit-hash.png new file mode 100644 index 00000000000..7e7b936af52 Binary files /dev/null and b/common/images/select-commit-hash.png differ diff --git a/common/images/ui_comps/fieldset-component-result.png b/common/images/ui_comps/fieldset-component-result.png new file mode 100644 index 00000000000..611aa51cf08 Binary files /dev/null and b/common/images/ui_comps/fieldset-component-result.png differ diff --git a/common/images/ui_comps/ui-column-result.png b/common/images/ui_comps/ui-column-result.png new file mode 100644 index 00000000000..23f2577e500 Binary files /dev/null and b/common/images/ui_comps/ui-column-result.png differ diff --git a/common/images/ui_comps/ui-columns-list-result.png b/common/images/ui_comps/ui-columns-list-result.png new file mode 100644 index 00000000000..665f0ddcdf3 Binary files /dev/null and b/common/images/ui_comps/ui-columns-list-result.png differ diff --git a/common/images/ui_comps/ui-columns-result.png b/common/images/ui_comps/ui-columns-result.png new file mode 100644 index 00000000000..5ff7607b2aa Binary files /dev/null and b/common/images/ui_comps/ui-columns-result.png differ diff --git a/common/images/ui_comps/ui-date-column-result.png b/common/images/ui_comps/ui-date-column-result.png new file mode 100644 index 00000000000..e2e1f83d18f Binary files /dev/null and b/common/images/ui_comps/ui-date-column-result.png differ diff --git a/common/images/ui_comps/ui-draganddrop-columns-result.png b/common/images/ui_comps/ui-draganddrop-columns-result.png new file mode 100644 index 00000000000..66e76df2023 Binary files /dev/null and b/common/images/ui_comps/ui-draganddrop-columns-result.png differ diff --git a/common/images/ui_comps/ui-paging-result.png b/common/images/ui_comps/ui-paging-result.png new file mode 100644 index 00000000000..8ab50f522fd Binary files /dev/null and b/common/images/ui_comps/ui-paging-result.png differ diff --git a/extensions/google-shopping-ads/release-notes/index.md b/extensions/google-shopping-ads/release-notes/index.md index 826c2ab146b..48f22bd8e50 100644 --- a/extensions/google-shopping-ads/release-notes/index.md +++ b/extensions/google-shopping-ads/release-notes/index.md @@ -25,7 +25,7 @@ The release notes include: ### v3.0.1 -Google Shopping ads Channel 3.0.1 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, and 2.3.2 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. +Google Shopping ads Channel 3.0.1 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, 2.3.2, and 2.3.3 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. - {:.fix}**Resolved Index Management Issues**: @@ -43,7 +43,7 @@ Google Shopping ads Channel 3.0.1 is compatible with versions 2.2.4+, 2.3.0, 2.3 ### v3.0.0 -Google Shopping ads Channel 3.0.0 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, and 2.3.2 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. +Google Shopping ads Channel 3.0.0 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, 2.3.2, and 2.3.3 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. - {:.new}**Magento Log Exceptions**: Implemented **Enable Services Logs** feature to help with troubleshooting. See the [Channels](https://docs.magento.com/m2/ce/user_guide/configuration/services/channels.html) topic in the Configuration Reference. @@ -69,31 +69,31 @@ Google Shopping ads Channel 3.0.0 is compatible with versions 2.2.4+, 2.3.0, 2.3 ### v2.0.2 -Google Shopping ads Channel 2.0.2 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, and 2.3.2 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. +Google Shopping ads Channel 2.0.2 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, 2.3.2, and 2.3.3 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. - {:.fix}**Resolved Startup Issue**: Corrected an issue that prevented Google Shopping ads Channel from starting up correctly after installing v2.0.1. ### v2.0.1 -Google Shopping ads Channel 2.0.1 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, and 2.3.2 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. +Google Shopping ads Channel 2.0.1 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, 2.3.2, and 2.3.3 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. - {:.fix}**Resolved Update/Install Issue**: Corrected a problem with the update package that prevented Google Shopping ads Channel v2.0.0 from installing correctly. ### v2.0.0 -Google Shopping ads Channel 2.0.0 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, and 2.3.2 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. +Google Shopping ads Channel 2.0.0 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, 2.3.2, and 2.3.3 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. - {:.fix}**Resolved Database Issue**: Corrected a database issue that caused some users to experience delayed processing times. ### v1.1.2 -Google Shopping ads Channel 1.1.2 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, and 2.3.2 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. +Google Shopping ads Channel 1.1.2 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, 2.3.2, and 2.3.3 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. - {:.fix}**Intermittent Load Error**: Resolved an intermittent error preventing Google Shopping ads Channel from loading after install. ### v1.1.1 -Google Shopping ads Channel 1.1.1 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, and 2.3.2 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. +Google Shopping ads Channel 1.1.1 is compatible with versions 2.2.4+, 2.3.0, 2.3.1, 2.3.2, and 2.3.3 of {{site.data.var.ce}}, {{site.data.var.ee}}, and {{site.data.var.ece}}. - {:.new}**Simplified Onboarding and Maintenance**: Add GMC accounts with ease through a step-by-step process with detailed instructions available through the Magento Admin. diff --git a/guides/v2.2/advanced-reporting/modules.md b/guides/v2.2/advanced-reporting/modules.md index bceb324310b..79ca6ceab6d 100644 --- a/guides/v2.2/advanced-reporting/modules.md +++ b/guides/v2.2/advanced-reporting/modules.md @@ -33,13 +33,13 @@ Advanced reporting functionality is implemented in the following Magento modules -[Analytics]: {{ page.baseurl }}/mrg/ce/Analytics.html -[CatalogAnalytics]: {{ page.baseurl }}/mrg/ce/CatalogAnalytics.html -[CustomerAnalytics]: {{ page.baseurl }}/mrg/ce/CustomerAnalytics.html -[QuoteAnalytics]: {{ page.baseurl }}/mrg/ce/QuoteAnalytics.html -[ReviewAnalytics]: {{ page.baseurl }}/mrg/ce/ReviewAnalytics.html -[SalesAnalytics]: {{ page.baseurl }}/mrg/ce/SalesAnalytics.html -[WishlistAnalytics]: {{ page.baseurl }}/mrg/ce/WishlistAnalytics.html +[Analytics]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Analytics/README.md +[CatalogAnalytics]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/CatalogAnalytics/README.md +[CustomerAnalytics]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/CustomerAnalytics/README.md +[QuoteAnalytics]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/QuoteAnalytics/README.md +[ReviewAnalytics]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/ReviewAnalytics/README.md +[SalesAnalytics]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/SalesAnalytics/README.md +[WishlistAnalytics]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/WishlistAnalytics/README.md [report data collection]: ./data-collection.html diff --git a/guides/v2.2/architecture/archi_perspectives/components/modules/mod_and_areas.md b/guides/v2.2/architecture/archi_perspectives/components/modules/mod_and_areas.md index 9516cf13dce..c2ea9b9d28d 100644 --- a/guides/v2.2/architecture/archi_perspectives/components/modules/mod_and_areas.md +++ b/guides/v2.2/architecture/archi_perspectives/components/modules/mod_and_areas.md @@ -50,7 +50,7 @@ You can enable or disable an area within a module. If this module is enabled, it Magento processes a URL request by first stripping off the base URL. The first path segment of the remaining URL identifies the request area. -After the area name, the URI segment specifies the *frontname*. When an HTTP request arrives, Magento extracts the handle from the URL and interprets it as follows: `[frontName]/[controller folder]/[controller class]` where `frontName` is a value defined in the module. For example, in `catalog/product/view`, `catalog` is the name of the module used, `product` is the controller folder, and `view` is the controller class. For deeper directory structures, the controller folders are separated with `_` (for example, `catalog/product_compare/add` for `Magento/Catalog/Controller/Product/Compare/Add.php`). +After the area name, the URI segment specifies the *frontname*. When an HTTP request arrives, Magento extracts the handle from the URL and interprets it as follows: `[frontName]/[controller folder]/[controller class]` where `frontName` is a value defined in the module. For example, in `catalog/product/view`, `catalog` is the (frontName defined in the module area's `routes.xml`)[{{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Catalog/etc/frontend/routes.xml#L10], `product` is the (controller folder)[{{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Catalog/Controller/Product], and `view` is the (controller class)[{{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Catalog/Controller/Product/View.php]. For deeper directory structures, the controller folders are separated with `_` (for example, `catalog/product_compare/add` for `Magento/Catalog/Controller/Product/Compare/Add.php`). Note that only the **execute()** method of any given controller is executed. diff --git a/guides/v2.2/architecture/archi_perspectives/service_layer.md b/guides/v2.2/architecture/archi_perspectives/service_layer.md index a28a46247b7..704ef72191c 100644 --- a/guides/v2.2/architecture/archi_perspectives/service_layer.md +++ b/guides/v2.2/architecture/archi_perspectives/service_layer.md @@ -76,5 +76,5 @@ Related topics * [Architectural diagrams]({{page.baseurl}}/architecture/archi_perspectives/arch_diagrams.html) * [Architectural layers overview]({{page.baseurl}}/architecture/archi_perspectives/ALayers_intro.html) -[catalog-api]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Customer/Api -[catalog-api-data]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Customer/Api/Data +[catalog-api]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Catalog/Api +[catalog-api-data]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Catalog/Api/Data diff --git a/guides/v2.2/cloud/architecture/cloud-architecture.md b/guides/v2.2/cloud/architecture/cloud-architecture.md index 869fb1fab03..507d9e44867 100644 --- a/guides/v2.2/cloud/architecture/cloud-architecture.md +++ b/guides/v2.2/cloud/architecture/cloud-architecture.md @@ -56,7 +56,7 @@ For comparison, each plan includes the following infrastructure features and sup
  • Continuous cloud integration tools with unlimited users
  • Fastly Content Delivery Network (CDN), Image Optimization (IO), and added security with generous bandwidth allowances. The Web Application Firewall (WAF) service is available on Production environments only.
  • - New Relic Infrastructure on Production + APM (Performance Monitoring) on Staging and Production + New Relic Infrastructure on Production + APM (Performance Monitoring) on Staging and Production. Adobe-generated alert policies implement monitoring best practices to proactively notify you about application and infrastructure issues affecting site performance.
  • Blackfire.io Enterprise (Performance Testing) @@ -83,7 +83,7 @@ For comparison, each plan includes the following infrastructure features and sup Dedicated Technical Account Manager - Dedicated technical account management for the initial launch period, starting with your subscription until your initial site launch + Dedicated technical account management for the initial launch period, starting with your subscription until your initial site launch diff --git a/guides/v2.2/cloud/cdn/cloud-fastly-custom-response.md b/guides/v2.2/cloud/cdn/cloud-fastly-custom-response.md index dcd8f2cc4d0..3bcece4de25 100644 --- a/guides/v2.2/cloud/cdn/cloud-fastly-custom-response.md +++ b/guides/v2.2/cloud/cdn/cloud-fastly-custom-response.md @@ -143,6 +143,61 @@ To edit the WAF error page: - On the Cache Management page, click **Flush Magento Cache**. +## Display Magento error report number + +By default, Fastly hides all Magento errors behind the _503 Service Unavailable_ error. To display the Magento error log report number so that you can find and review the error details in the logs, open the website omitting Fastly using these steps: + +1. Retrieve the IP address of your store: + + - For Pro Staging and Production environments: + + ```bash + nslookup {your_project_id}.ent.magento.cloud + ``` + + - For Pro Integration environments and Starter environments: + + ```bash + nslookup gw.{your_region}.magentosite.cloud + ``` + +1. Add your application domain and IP address to the hosts file on your local workstation: + + ```text + {server_IP} {store_domain} + ``` + +1. Clear the browser cache and cookies (or switch to incognito mode). + +1. Open your store website again to view the Magento error code. + +1. Use the Magento error code to find the details in the error report file: + + - [Connect to the affected environment using SSH](https://devdocs.magento.com/guides/v2.3/cloud/env/environments-ssh.html#ssh). + + - Locate the `./var/report/{error_number}` file. + + + +[Edit 503 error page]: {{site.baseurl}}/common/images/cloud/cloud-fastly-custom-synthetic-pages-edit-html.png +{: width="650px"} + +[Update 503 error page]: {{site.baseurl}}/common/images/cloud/cloud-fastly-customize-503-response.png +{: width="650px"} + +[Edit WAF error page option]: {{site.baseurl}}/common/images/cloud/cloud-fastly-custom-synthetic-pages-edit-waf.png +{: width="650px"} + +[Fastly default error page]: {{site.baseurl}}/common/images/cloud/cloud-fastly-503-example.png + +[Fastly custom error page]: {{site.baseurl}}/common/images/cloud/cloud-fastly-new-error-page.png +{: width="650px"} + +[WAF error page]: {{site.baseurl}}/common/images/cloud/cloud-fastly-waf-403-error.png + +[Update WAF error page]: {{site.baseurl}}/common/images/cloud/cloud-fastly-edit-waf-html.png +{: width="650px"} + [Edit 503 error page]: {{site.baseurl}}/common/images/cloud/cloud-fastly-custom-synthetic-pages-edit-html.png diff --git a/guides/v2.2/cloud/cdn/configure-fastly.md b/guides/v2.2/cloud/cdn/configure-fastly.md index 0cc0c3f1527..ca0dce80daf 100644 --- a/guides/v2.2/cloud/cdn/configure-fastly.md +++ b/guides/v2.2/cloud/cdn/configure-fastly.md @@ -278,11 +278,23 @@ For details on this TXT record, see the Fastly [DNS TXT record validation](https ## Upgrade the Fastly module {#upgrade} -Fastly updates the Fastly CDN for Magento 2 module to resolve issues, increase performance, and provide new features. You can find information about the latest release in the Fastly [Fastly release notes](https://github.com/fastly/fastly-magento2/releases) on GitHub. +Fastly updates the Fastly CDN for Magento 2 module to resolve issues, increase performance, and provide new features. +We recommend that you update the Fastly module in your Staging and Production environments to the [latest version](https://github.com/fastly/fastly-magento2/releases). -We recommend that you upgrade to the latest version of the Fastly module. See [Upgrade an extension]({{ page.baseurl }}/cloud/howtos/install-components.html): +After you update the module, you must upload the VCL code to apply the changes to the Fastly service configuration. -When you upgrade the Fastly module, you get a new version of the default Fastly VCL code that enables the integration with {{ site.data.var.ece }}. You must upload the new VCL code to apply the changes to the Fastly service configuration for your Staging and Production environments. +{:.procedure} +To check the version of Fastly CDN module for Magento 2: + +1. Change to the root directory of your Cloud environment. + +1. Use Composer to check the installed version. + + ```bash + composer show *fastly* + ``` + +1. If the [latest release]((https://github.com/fastly/fastly-magento2/releases)is not installed, complete the steps to upgrade the Fastly module. {:.procedure} To upgrade the Fastly module: @@ -303,4 +315,4 @@ To upgrade the Fastly module: After you verify Fastly services on the Staging site, repeat the upgrade process in the Production environment. {: .bs-callout-warning } -If you have uploaded a custom VCL snippet that has the same name as a default snippet, you may need to verify and update those snippets after you upgrade the Fastly module. We do not recommend replacing existing default snippets with custom snippets of the same name. For details on custom VCL, see [Custom Fastly VCL snippets]({{ page.baseurl }}/cloud/cdn/cloud-vcl-custom-snippets.html). +If you have added a custom VCL snippet that has the same name as a default snippet, you may need to verify and update those snippets after you upgrade the Fastly module. We do not recommend replacing existing default snippets with custom snippets of the same name. For details on custom VCL, see [Custom Fastly VCL snippets]({{ page.baseurl }}/cloud/cdn/cloud-vcl-custom-snippets.html). diff --git a/guides/v2.2/cloud/env/environment-vars_magento.md b/guides/v2.2/cloud/env/environment-vars_magento.md index 0d14ac265fb..e0a08e47118 100644 --- a/guides/v2.2/cloud/env/environment-vars_magento.md +++ b/guides/v2.2/cloud/env/environment-vars_magento.md @@ -14,12 +14,12 @@ Use the ADMIN variables in the following table to override credentials for the M If you want to change the values after installation, connect to your environment using ssh and use the the Magento CLI [`admin:user` command]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-admin.html) to create or edit the Magento Admin user credentials. -| Variable | Default | Description | -| -------- | -------- | ----------- | -| `ADMIN_USERNAME`| License Owner email address | A username for the administrative user with the ability to create other users, including administrative users.| -|`ADMIN_EMAIL`| | Email address for the administrative user. This address is used to send password reset notifications.| -|`ADMIN_PASSWORD`| | Password for the administrative user. When the project is created a random password is generated and an email is sent to the {{ site.data.var.ece }} License Owner. During project creation, the License Owner should have already changed the password. You might need to contact the License Owner for the updated password.| -| `ADMIN_LOCALE` | `en_US` | The default locale used by the Magento Admin. +| Variable | Default | Description | +| -------------- | --------------------------- | ----------- | +|`ADMIN_USERNAME`| License Owner email address | A username for the administrative user with the ability to create other users, including administrative users.| +|`ADMIN_EMAIL` | | Email address for the administrative user. This address is used to send password reset notifications.| +|`ADMIN_PASSWORD`| | Password for the administrative user. When the project is created a random password is generated and an email is sent to the {{ site.data.var.ece }} License Owner. During project creation, the License Owner should have already changed the password. You might need to contact the License Owner for the updated password.| +|`ADMIN_LOCALE` | `en_US` | The default locale used by the Magento Admin.| ## Admin URL @@ -27,4 +27,8 @@ Use the following environment variable to secure access to your Magento Admin UI `ADMIN_URL`—The relative URL to access the Magento Admin UI. The default URL is `/admin`. For security reasons, Magento recommends that you change the default to a unique, custom Admin URL that is not easy to guess. -If you need to change the Admin URL after installation, connect to your environment using SSH and use the Magento CLI [`magento setup:config`]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-deployment.html) command to change the URL. +If you need to change the Admin URL after installation, use the `magento-cloud variable:set` command-line tool to change the URL. For example, to set the Admin URL to `magento_A8v10`, use: + +```bash +magento-cloud variable:set ADMIN_URL magento_A8v10 -e master +``` diff --git a/guides/v2.2/cloud/env/restore-environment.md b/guides/v2.2/cloud/env/restore-environment.md new file mode 100644 index 00000000000..93f8ae7bade --- /dev/null +++ b/guides/v2.2/cloud/env/restore-environment.md @@ -0,0 +1,146 @@ +--- +title: Restore an environment +group: cloud-guide +--- + +If you encounter issues in your environment and do not have a [valid snapshot]({{ page.baseurl }}/cloud/project/project-webint-snap.html), you can try restoring your environment in one of the following ways: + +- SSH +- Git + +## SSH + +If you have not created a snapshot, but you can access the environment using SSH, follow these steps to restore your environment: + +1. Disable configuration management +1. Uninstall Magento +1. Reset the git branch + +Performing these steps: + +- Returns your Magento installation to its original state by restoring the database, removing the deployment configuration, and clearing `var/` subdirectories. +- Resets your git branch to a stable state in the past. + +### Disable configuration management + +You must disable [configuration management]({{ page.baseurl }}/cloud/live/sens-data-over.html) so that it does not automatically apply the previous configuration settings during deployment. + +To disable configuration management, make sure that your `app/etc/` directory does not contain the `config.php` file. + +{:.procedure} +To remove the configuration file: + +1. [SSH to your environment]({{ page.baseurl }}/cloud/env/environments-ssh.html#ssh). +1. Remove the configuration file: + - For Magento 2.2: + + ```bash + rm app/etc/config.php + ``` + + - For Magento 2.1: + + ```bash + rm app/etc/config.local.php + ``` + +### Uninstall Magento + +Uninstalling the Magento software drops and restores the database, removes the deployment configuration, and clears `var/` subdirectories. + +{:.procedure} +To uninstall the Magento software: + +1. [SSH to your environment]({{ page.baseurl }}/cloud/env/environments-ssh.html#ssh). +1. Uninstall the Magento application. + + ```bash + php bin/magento setup:uninstall + ``` + +1. Confirm that Magento was successfully uninstalled. + + The following message displays to confirm a successful uninstallation: + + ```terminal + [SUCCESS]: Magento uninstallation complete. + ``` + +### Reset the git branch + +Resetting your branch reverts the code to a stable state in the past. + +{:.procedure} +To reset your branch: + +1. Clone the project to your local development environment. You can find the command in your Project Web Interface: + + ![Click to copy the git clone command]({{ site.baseurl }}/common/images/copy-git-clone.png) + +1. Review the git history. Use `--reverse` to display history in reverse chronological order: + + ```bash + git log --reverse + ``` + +1. Choose a commit hash that represents the last known stable state of your code. + + To reset your branch to its original initialized state, find the very first commit that created your branch. + + ![Select a commit hash in the git console]({{ site.baseurl }}/common/images/select-commit-hash.png) + +1. Use the hard reset option to reset your branch. + + ```bash + git reset --h + ``` + +1. Push your changes to trigger a redeploy, which reinstalls Magento. + + ```bash + git push --force + ``` + +## Git + +If you have not created a snapshot, cannot access your environment using SSH, and your deployment keeps failing, you must complete the steps in the [previous section](#ssh), and then force a redeployment. + +### Force a redeployment + +Make a commit (this might be an empty commit, although we do not recommend it) and push it to the server to trigger redeploy: + +```bash +git commit --allow-empty -m "" && git push +``` + +## Uninstall failed + +If executing the `setup:uninstall` command fails and cannot be completed, you might need to manually reset the database: + +1. [SSH to your environment]({{ page.baseurl }}/cloud/env/environments-ssh.html#ssh). +1. Connect to the database. + + ```bash + mysql -h database.internal + ``` + +1. Drop the `main` database. + + ```shell + drop database main; + ``` + +1. Create an empty `main` database. + + ```shell + create database main; + ``` + +1. Delete the following configuration files. + + - `config.php` + - `config.php.bak` + - `env.php` + - `env.php.bak` + +After resetting the database, [push your changes to trigger a redeploy]({{ page.baseurl }}/cloud/reference/cli-ref-topic.html#git-commands) and install Magento using the new database Or [run the redeploy command]({{ page.baseurl }}/cloud/reference/cli-ref-topic.html#environment-commands). diff --git a/guides/v2.2/cloud/env/variables-deploy.md b/guides/v2.2/cloud/env/variables-deploy.md index e2a24219c50..825d35116b5 100644 --- a/guides/v2.2/cloud/env/variables-deploy.md +++ b/guides/v2.2/cloud/env/variables-deploy.md @@ -379,7 +379,7 @@ The following example merges new values to an existing configuration: stage: deploy: RESOURCE_CONFIGURATION: - _merge: false + _merge: true default_setup: connection: default ``` @@ -604,6 +604,9 @@ stage: STATIC_CONTENT_SYMLINK: false ``` +{: .bs-callout .bs-callout-warning } +The `STATIC_CONTENT_SYMLINK` environment variable is marked as deprecated and will be removed in future releases. It's not recommended to use it in your deployment configuration. Ece-tools will always generate symlinks for static content. + ### `UPDATE_URLS` - **Default**—`true` diff --git a/guides/v2.2/cloud/live/go-live-checklist.md b/guides/v2.2/cloud/live/go-live-checklist.md index 4d192897554..c07982ab364 100644 --- a/guides/v2.2/cloud/live/go-live-checklist.md +++ b/guides/v2.2/cloud/live/go-live-checklist.md @@ -85,6 +85,10 @@ You can also test using the following 3rd party options: * [Blackfire]({{ page.baseurl }}/cloud/project/project-integrate-blackfire.html) (provided): Helps track through the issues New Relic finds and helps you dig deeper into the issue for specifics. Blackfire profiles the environment and helps locate bottlenecks in depth: process, method call, query, load, and so on. * [WebPageTest](https://www.webpagetest.org/) and [Pingdom](https://www.pingdom.com/): Real-time analysis of your site pages load time with different origin locations. Pingdom may cost a fee. WebPageTest is a free tool. +## Performance monitoring + +You can use New Relic services for performance monitoring on Pro and Starter environments. On Pro plan accounts, we provide Adobe-generated alert policies to monitor application and infrastructure performance using New Relic APM and Infrastructure agents. For details on using these services, see [New Relic]({{ page.baseurl }}/cloud/project/new-relic.html). + {:.ref-header} Next step diff --git a/guides/v2.2/cloud/project/monitor-performance.md b/guides/v2.2/cloud/project/monitor-performance.md new file mode 100644 index 00000000000..f1285cd9086 --- /dev/null +++ b/guides/v2.2/cloud/project/monitor-performance.md @@ -0,0 +1,13 @@ +--- +group: cloud-guide +title: Monitor performance +functional_areas: + - Cloud + - Storage +--- + +You can use the following services to monitor performance of your Cloud environments: + +- **[Health notifications]({{ page.baseurl }}/cloud/integrations/health-notifications.html)**–Monitor disk space on Pro Integration and Starter environments. + +- **[New Relic services for performance monitoring]({{ page.baseurl }}/cloud/project/new-relic.html)**–Monitor application performance on Pro Staging and Production and Starter environments using the New Relic Application Performance Monitoring service. Additionally, on Pro Production environments, you can also use New Relic Infrastructure (NRI) for dynamic server monitoring. \ No newline at end of file diff --git a/guides/v2.2/cloud/project/new-relic.md b/guides/v2.2/cloud/project/new-relic.md index a5f8cd4a47e..6942b5ad21a 100644 --- a/guides/v2.2/cloud/project/new-relic.md +++ b/guides/v2.2/cloud/project/new-relic.md @@ -13,23 +13,31 @@ functional_areas: - **Focus on specific transactions**—Actively mark and monitor key customer actions in your site, such as adding to the cart, checking out, or processing a payment. - **Database query monitoring**—Locate and monitor database queries affecting performance. - **App Map**—View all application dependencies within your Magento site, extensions, and external services. -- **Apdex scores**—Evaluate performance and create alerts that identify issues and notify you when they occur, such as site performance affected by a flash sale or web event. +- **Apdex scores**—Evaluate performance and create alerts that identify issues and notify you when they occur, such as site performance affected by a flash sale or web event. [Apdex score](https://docs.newrelic.com/docs/apm/new-relic-apm/apdex/apdex-measure-user-satisfaction). +- **Adobe-generated alert policies**–Monitor application and infrastructure performance using alert policies that monitor key performance indicators like apdex score, disk space, and error rate based on industry best practices. See [Monitor performance using alerts](#monitor-performance-with-alert-policies). -For {{site.data.var.ece}} Pro accounts, the Production environment includes the [New Relic Infrastructure (NRI)](https://newrelic.com/products/infrastructure) service, which automatically connects with the application data and performance analytics to provide dynamic server monitoring. +Your {{site.data.var.ece}} account includes the software for the New Relic APM service along with a license key. You do not need to purchase or install any additional software. -{:.bs-callout .bs-callout-info} -Your {{site.data.var.ece}} account includes the software for the New Relic APM service along with a license key. You do not need to purchase or install any additional software. For Pro accounts, if New Relic APM is not installed on the Staging and Production environments or New Relic Infrastructure is not available in the Production environment, submit a [support ticket]({{ page.baseurl }}/cloud/trouble/trouble.html) to request installation. +On {{site.data.var.ece}} Pro accounts, the Production environment also includes the [New Relic Infrastructure (NRI)](https://newrelic.com/products/infrastructure) service, which automatically connects with the application data and performance analytics to provide dynamic server monitoring. -## New Relic account credentials +{:.bs-callout-info} +For Pro accounts, if New Relic APM is not installed on the Staging and Production environments or New Relic Infrastructure is not available in the Production environment, submit a [support ticket]({{ page.baseurl }}/cloud/trouble/trouble.html) to request installation. -When Magento provisions your {{site.data.var.ece}} project, the Project Owner should receive an email from New Relic with the credentials and instructions for accessing the account. If you did not receive the email, you can use the Project Owner email address to [reset the password](https://rpm.newrelic.com/forgot_password). +## Manage your New Relic account -Also, we recommend adding at least one Admin user to your New Relic account to manage all access, integrations, and usage of the tool. {{site.data.var.ece}} Project Owners and Admin users can add and remove users from the New Relic account. +When Magento provisions your {{site.data.var.ece}} project, the Project Owner receives an email from New Relic with credentials and instructions for accessing the account. If you did not receive the email, use the Project Owner email address to [reset the New Relic password](https://rpm.newrelic.com/forgot_password). + +An account can have only one person assigned to the Owner role. If you must change the account owner, assign the Admin role to the current Owner, then assign the Owner role to another user. See [Update the account owner](https://docs.newrelic.com/docs/accounts/accounts/roles-permissions/change-account-owner) in the New Relic documentation for instructions. + +{:.bs-callout-tip} +Before assigning the Owner role to a user, verify that the user exists on the New Relic account for {{site.data.var.ece}}. If you need to add the user to that account and an existing account Owner or Admin cannot help, any Magento user with access to the [Magento Partnership Owner Account][3] for New Relic can add users on behalf of the customer. + +We recommend adding at least one Admin user to your New Relic account to manage all access, integrations, and tool usage. {{site.data.var.ece}} Project Owners and Admin users can add and remove users from the New Relic account. {:.procedure} To add a user: -1. Using your Project Owner New Relic credentials, log in to [New Relic](https://login.newrelic.com/login). +1. Using your Project Owner New Relic credentials, [log in to New Relic](https://login.newrelic.com/login). 1. From the [account dropdown](https://docs.newrelic.com/docs/using-new-relic/welcome-new-relic/getting-started/glossary#account-dropdown) menu, select **Account settings** > **Account** > **Users and roles**. @@ -43,11 +51,11 @@ To add a user: 1. Ask the new user to check their email for a New Relic notification with account information. -See [Accounts](https://docs.newrelic.com/docs/accounts/accounts) in the New Relic documentation for information about user roles, managing user accounts, and changing account ownership. +## Set up the New Relic service -## Configure New Relic +Pro environments are preconfigured to use New Relic services. -Pro accounts are preconfigured to use the New Relic service. If you have a Starter account, you need to verify that the New Relic service is configured properly. Check if the `.magento.app.yaml` file includes the New Relic extension in the `runtime` list. If not, then add the following: +For Starter environments, you must check the `.magento.app.yaml` file to verify that the `runtime` section includes the New Relic extension. If the extension has not been configured, add the following: > .magento.app.yaml @@ -57,11 +65,13 @@ runtime: - newrelic ``` -## Manage license keys +## Connect to New Relic + +To connect a Cloud environment to New Relic, you must add the New Relic license key to the environment. -For Pro accounts, there is no need to apply the license key to any environments. This has already been done. You can log in to your New Relic account and verify connectivity. +- For Pro accounts, Magento adds the license key to your Cloud environments during the provisioning process. You can log in to your New Relic account and verify connectivity. -The {{site.data.var.ece}} Starter plan supports up to three instances of a New Relic license across all environments. For Starter projects, we recommend adding a New Relic license key to the Staging and Production (master) environments, and you can add the license key to one other environment of your choice. If you have more than three active environments using the same New Relic license key, you need to remove a license variable from an existing environment. +- For Starter accounts, you have a New Relic license key that supports up to three environments. You must add the New Relic license key to your Starter Project environments. We recommend adding the key to the Staging and Production (master) environments, and one other environment of your choice. If you have more than three active environments using the same New Relic license key, you must remove the license variable from an existing environment. {:.procedure} To find your New Relic license key: @@ -70,10 +80,12 @@ To find your New Relic license key: 1. On the _Projects_ tab, find your project. -1. Click **View Details** to see the project plan information. +1. Click **View Details** to see the project infrastructure information. 1. Expand the **NewRelic Service** section to view the license key. + ![Cloud project details page]({{ site.baseurl }}/common/images/cloud/cloud-project-details-new-relic.png){:width="650px"} + 1. Copy the license key. {:.procedure} @@ -83,52 +95,56 @@ To add a license key to an environment: 1. Set the variable. - ```bash - magento-cloud variable:set php:newrelic.license - ``` + ```bash + magento-cloud variable:set php:newrelic.license + ``` - {:.bs-callout .bs-callout-info} - Adding a variable to an environment triggers a redeployment to update the environment variables and values. See [Working with variables]({{page.baseurl}}/cloud/env/working-with-variables.html). + {:.bs-callout-info} + Adding a variable to an environment triggers a redeployment to update the environment variables and values. See [Working with variables]({{page.baseurl}}/cloud/env/working-with-variables.html). -1. Log in to your New Relic account and verify it is receiving data. +1. [Log in to New Relic](https://login.newrelic.com/login) to verify that it is receiving data. {:.procedure} To remove a license key from an environment: 1. List environment variables. - ```bash - magento-cloud vget - ``` + ```bash + magento-cloud vget + ``` - Response: + Response: - ```terminal - +----------------------+-------------+------------------------+ - | Name | Level | Value | - +----------------------+-------------+------------------------+ - | php:newrelic.license | environment | | - +----------------------+-------------+------------------------+ - ``` - {: .no-copy} + ```terminal + +----------------------+------------+------------------------+ + | Name | Level | Value | + +----------------------+------------+------------------------+ + | php:newrelic.license | environment| | + +----------------------+------------+------------------------+ + ``` + {: .no-copy} - {:.bs-callout .bs-callout-warning} - If you added the license key as a _project_ variable, you must remove that project-level variable. A project variable adds the license to every environment branch created, which can consume or exceed the license limit. To list project variables: `magento-cloud pvget` + {:.bs-callout-warning} + If you added the license key as a _project_ variable, you must remove that project-level variable. A project variable adds the license to every environment branch created, which can consume or exceed the license limit. To list project variables: `magento-cloud pvget` 1. Delete a variable. - ```bash - magento-cloud variable:delete php:newrelic.license - ``` + ```bash + magento-cloud variable:delete php:newrelic.license + ``` - {:.bs-callout .bs-callout-info} - Removing a variable from an environment triggers a redeployment to update the environment variables and values. See [Working with variables]({{page.baseurl}}/cloud/env/working-with-variables.html). + {:.bs-callout-info} + Removing a variable from an environment triggers a redeployment to update the environment variables and values. See [Working with variables]({{page.baseurl}}/cloud/env/working-with-variables.html). ## Investigate performance -New Relic connects and monitors your site using a PHP agent. As it collects data, you can log in and review the responses through the [New Relic dashboard](https://docs.newrelic.com/docs/apm/applications-menu/monitoring/apm-overview-page). +New Relic connects and monitors your infrastructure and application using PHP agents. After a Cloud environment [connects to New Relic](#connect-to-new-relic), you can review the data collected by the agent by logging into your New Relic account. + +On the APM Applications page, use the [New Relic APM Overview](https://docs.newrelic.com/docs/apm/applications-menu/monitoring/apm-overview-page-view-transaction-apdex-usage-data) to view information about your application. + + ![Cloud project New Relic overview page]({{ site.baseurl }}/common/images/cloud/cloud-newrelic-dashboard-basic.png){:width="650px"} -Using the New Relic dashboard, you can immediately track and find: +From this view, you can track and find the following types of information: - Applications and transactions encountering slow responses or bottlenecks - Customer comments about issues with your site @@ -137,14 +153,98 @@ Using the New Relic dashboard, you can immediately track and find: We recommend reviewing tracked data: -- **Most time consuming**—Determine time consumption by tracking requests in parallel. For example, you may have the highest transaction time spent in product and category views. If a customer account page suddenly ranks very high in time consumption, there may be a call or query dragging performance. +- **Most time consuming**—Determine time consumption by tracking requests in parallel. For example, you may have the highest transaction time spent in product and category views. If a customer account page suddenly ranks very high in time consumption, your application might be affected by a call or query dragging performance. + - **Highest throughput**—Identify pages hit the most based on the size and frequency of bytes transmitted. -All collected data details the time spent on an action transmitting data, queries, or _Redis_ data. If queries cause issues, New Relic provides information to track and respond to it. +All collected data details the time spent on an action transmitting data, queries, or _Redis_ data. If queries cause issues, New Relic provides information to track and respond to those issues. + +{:.bs-callout-info} +You can learn more about using the New Relic APM and Infrastructure agents to collect and analyze application data from the [New Relic APM](https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/introduction-new-relic-apm) and [New Relic Infrastructure](https://docs.newrelic.com/docs/infrastructure/new-relic-infrastructure/getting-started/introduction-new-relic-infrastructure) documentation. + +## Monitor performance with alert policies + +The New Relic service for {{ site.data.var.ece }} Pro Production environments includes a set of Adobe-generated alert policies to track the following performance metrics: + +- [Apdex score](https://docs.newrelic.com/docs/apm/new-relic-apm/apdex/apdex-measure-user-satisfaction) +- error rate +- disk space + +These policies set thresholds for warning and critical conditions that affect performance based on industry best practices. When your site experiences infrastructure or application issues that trigger an alert threshold, New Relic sends alert notifications so you can proactively address the issue. To use these policies, you must configure notification channels to receive the alert messages. + +{:.bs-callout-info} +For Pro Staging and Integration environments and Starter environments, use [Health notifications]({{ page.baseurl }}/cloud/integrations/health-notifications.html) to monitor disk space. + +{:.procedure} +Prerequisites + +- Credentials to log in to the [New Relic account](#manage-your-new-relic-account) for your Cloud project. +- Verify that your Cloud environment is [connected to New Relic](#connect-to-new-relic). + +{:.procedure} +To review Adobe-generated alert policies: + +1. Use your Project Owner New Relic credentials to [log in to New Relic](https://login.newrelic.com/login). + +1. From the navigation menu, select  **Alerts**  > **Alert Policies**. + +1. In the Search Policies field, search for _Adobe Generated Policy_. + +1. You should see a set of policies like the ones below: + + ![Generated alert policies]({{ site.baseurl }}/common/images/cloud/cloud-newrelic-alert-policies.png){:width="650px"} + + {:.bs-callout-info} + If you do not see these alert policies, submit a Magento support ticket. Include your project ID in the ticket. These policies are available only on the Pro Production environment. -To learn more about using and customizing New Relic services for your project, see [New Relic Infrastructure documentation](https://docs.newrelic.com/docs/infrastructure/new-relic-infrastructure/getting-started/introduction-new-relic-infrastructure) +1. Click an alert policy name to review the threshold conditions that trigger alerts. -### New Relic and Blackfire +### Configure notification channels + +To use the Adobe-generated alert policies to monitor your Production site, you must configure notification channels and map them to alert policies. Notifications about performance issues go to all channels associated with an alert policy when conditions on the application or infrastructure trigger an alert. You also receive notifications when an issue is acknowledged and closed. + +New Relic provides templates for configuring different types of notification channels including email, Slack, PagerDuty, webhooks, and more. See the [Instructions for specific notification channels](https://docs.newrelic.com/docs/alerts/new-relic-alerts/managing-notification-channels/notification-channels-control-where-send-alerts#channel-types) in the New Relic documentation to review the prerequisites for using each type. + +The following instructions describe the high level steps to configure a Slack channel to receive New Relic alerts when the available disk space on your {{ site.data.var.ee }} Production server exceeds the low disk space threshold specified in the _Adobe Generated Disk Space Policy_ alert policy. + +{:.procedure} +To configure a notification channel: + +1. Choose a notification channel type, and complete any prerequisite steps required to integrate the channel with the New Relic service. + +1. [Log in to your New Relic account](https://login.newrelic.com/login). + +1. Navigate to the _New Relic APM_ page. + +1. On the _New Relic APM Applications_ page, open the application for your Cloud environment. + +1. On the _Alerts_ page, click **New notification channel**. + + ![New Relic notification channel]({{ site.baseurl }}/common/images/cloud/cloud-new-relic-notification-channels.png){:width="650px"} + +1. Send a test notification to verify that the channel works. + +1. Map the notification to the Adobe-generated policies as needed. + +See the following New Relic documentation topics for additional information: + +- [Configure notification channels using the New Relic Alerts user interface](https://docs.newrelic.com/docs/alerts/new-relic-alerts/managing-notification-channels/notification-channels-control-where-send-alerts) + +- [Configure notification channels using the New Relic API](https://docs.newrelic.com/docs/alerts/rest-api-alerts/new-relic-alerts-rest-api/rest-api-calls-new-relic-alerts#channels) + +{:.bs-callout-warning} +The Adobe-generated policies have default notification channels configured to notify Magento teams that support {{ site.data.var.ece }} customers. Do not modify the configuration for these default channels, and do not remove them from the Adobe-generated alert policies. + +### Create Alert Policies + +Do not modify the Adobe-generated alert policies. We will automatically regenerate and improve them over time, which will overwrite any customizations you make. + +If you want to modify the thresholds of an alert condition, create a new alert policy. Then, copy the alert condition to the new policy. See [Update policies or conditions](https://docs.newrelic.com/docs/alerts/new-relic-alerts/configuring-alert-policies/update-or-disable-policies-conditions) in the New Relic documentation. + +{:.bs-callout-tip} +See [Alerts concepts and workflow](https://docs.newrelic.com/docs/alerts/new-relic-alerts/getting-started/new-relic-alerts-concepts-workflow) in the New Relic documentation for more detailed information about Alerts, alert policies, and notification channels. + +## New Relic and Blackfire You can use the high-level data captured by New Relic APM to see what is happening in your application in realtime. Combine that with the code-level data captured by the [Blackfire Profiler]({{ page.baseurl }}/cloud/project/project-integrate-blackfire.html) to get a comprehensive view of your Magento store performance. @@ -152,12 +252,6 @@ You can use the high-level data captured by New Relic APM to see what is happeni - Blackfire is not detailed in determining and displaying queries giving you trouble, but you can use New Relic to find those. - Background processes, like Cron job, can cause issues. These background processes are not monitored by New Relic, but you can watch them using Blackfire. -## Change account owner - -See [New Relic's documentation][1]. - -Before assigning the Owner role to a user, verify the user exists on your {{site.data.var.ece}} account. See [Add a new user][2]. If you need to add the user, but an existing account Owner or Admin cannot help, any Magento user with access to New Relic's [Magento Partnership Owner Account][3] can add users on the behalf of the customer. - [1]: https://docs.newrelic.com/docs/accounts/accounts/roles-permissions/change-account-owner [2]: https://docs.newrelic.com/docs/accounts/accounts/roles-permissions/add-update-users#adding_users [3]: https://account.newrelic.com/accounts/1311131/users diff --git a/guides/v2.2/cloud/project/project-conf-files_services-rabbit.md b/guides/v2.2/cloud/project/project-conf-files_services-rabbit.md index 87f322ed991..816874a98f7 100644 --- a/guides/v2.2/cloud/project/project-conf-files_services-rabbit.md +++ b/guides/v2.2/cloud/project/project-conf-files_services-rabbit.md @@ -43,6 +43,8 @@ To enable RabbitMQ: For information on how these changes affect your environments, see [`services.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_services.html). +[Supported service versions]({{page.baseurl}}/cloud/project/project-conf-files_services.html#service-versions) + ## Connect to RabbitMQ for debugging {#connect} For debugging purposes, it is useful to directly connect to a service instance in one of the following ways: @@ -107,6 +109,12 @@ For debugging purposes, it is useful to directly connect to a service instance i ssh -L :mq.internal: -@ssh.us.magentosite.cloud ``` + An example for accessing the RabbitMQ management web interface at `http://localhost:15672` is: + + ```bash + ssh -L 15672:localhost:15672 -@ssh.us.magentosite.cloud + ``` + 1. While the session is open, you can start a RabbitMQ client of your choice from your local workstation, configured to connect to the `localhost:` using the port number, username, and password information from the MAGENTO_CLOUD_RELATIONSHIP variable. ### Connect from the application {#cloud-rabbitmq-conn-cont} diff --git a/guides/v2.2/cloud/project/project-webint-snap.md b/guides/v2.2/cloud/project/project-webint-snap.md index c48e56f7651..3d37b13e892 100644 --- a/guides/v2.2/cloud/project/project-webint-snap.md +++ b/guides/v2.2/cloud/project/project-webint-snap.md @@ -10,7 +10,7 @@ You can back up and restore specific environments at any time using a snapshot. A _snapshot_ is a complete backup of an environment that includes all persistent data from all running services (for example, your MySQL database, Redis, and so on) and any files stored on the mounted volumes. Because an environment deploys as a read-only file system, restoring a snapshot is very fast. {: .bs-callout-warning } -If you want to rollback to previous code or remove added extensions in an environment, restoring a snapshot is not the recommended method. See [Rollbacks to remove code](#rollback-code). +If you want to rollback to previous code or remove added extensions in an environment, restoring a snapshot is not the recommended method. See [Rollbacks to remove code](#rollback-code). If you need to restore an unstable environment that does not have a snapshot, see [Restore an environment]({{ page.baseurl }}/cloud/env/restore-environment.html). You have up to **7 days** to _restore_ a snapshot. diff --git a/guides/v2.2/coding-standards/code-standard-javascript.md b/guides/v2.2/coding-standards/code-standard-javascript.md index 6bbe89c23ff..580692462c0 100644 --- a/guides/v2.2/coding-standards/code-standard-javascript.md +++ b/guides/v2.2/coding-standards/code-standard-javascript.md @@ -16,7 +16,7 @@ For the jQuery widget coding standard, see [jQuery widget coding standard][jquer ## Eslint and JSCS tools -Use [ESLint][eslint] and [JSCS][jscs] to ensure the quality of your JavaScript code. +Use [ESLint][eslint] and `JSCS` to ensure the quality of your JavaScript code. ESLint is a community-driven tool that detects errors and potential problems in JavaScript code. It can use custom rules to enforce specific coding standards. @@ -359,6 +359,5 @@ var foo = 'bar', [jquery-widgets]: http://api.jqueryui.com/category/widgets [jquery-widget-coding-standard]: {{ page.baseurl }}/coding-standards/code-standard-jquery-widgets.html [eslint]: http://eslint.org/ -[jscs]: http://jscs.info/ [eslint-rules]: {{ site.mage2bloburl }}/{{ page.guide_version }}/dev/tests/static/testsuite/Magento/Test/Js/_files/eslint/.eslintrc-magento [jscs-rules]: {{ site.mage2bloburl }}/{{ page.guide_version }}/dev/tests/static/testsuite/Magento/Test/Js/_files/jscs/.jscsrc diff --git a/guides/v2.2/contributor-guide/backward-compatible-development/index.md b/guides/v2.2/contributor-guide/backward-compatible-development/index.md index be52f4eef3c..7101b896071 100644 --- a/guides/v2.2/contributor-guide/backward-compatible-development/index.md +++ b/guides/v2.2/contributor-guide/backward-compatible-development/index.md @@ -122,6 +122,8 @@ Add a new optional parameter to the constructor at the end of the arguments list In the constructor body, if the new dependency is not provided (i.e. the value of the introduced argument is `null`), fetch the dependency using `Magento\Framework\App\ObjectManager::getInstance()`. +Prefix the type name with a question mark when declaring a parameter with a `null` default value. + {% collapsible Example Code %} ```php @@ -134,7 +136,7 @@ class ExistingClass \Old\Dependency\Interface $oldDependency, $oldRequiredConstructorParameter, $oldOptionalConstructorParameter = null, - \New\Dependency\Interface $newDependency = null + ?\New\Dependency\Interface $newDependency = null ) { ... $this->newDependency = $newDependency ?: \Magento\Framework\App\ObjectManager::getInstance()->get(\New\Dependency\Interface::class); diff --git a/guides/v2.2/extension-dev-guide/cli-cmds/cli-howto.md b/guides/v2.2/extension-dev-guide/cli-cmds/cli-howto.md index efaf705e3ec..eb3684da883 100644 --- a/guides/v2.2/extension-dev-guide/cli-cmds/cli-howto.md +++ b/guides/v2.2/extension-dev-guide/cli-cmds/cli-howto.md @@ -22,10 +22,6 @@ Before you begin, make sure you understand the following: * All Magento command-line interface (CLI) commands rely on the Magento application and must have access to its context, dependency injections, plug-ins, and so on. * All CLI commands should be implemented in the scope of your [module](https://glossary.magento.com/module) and should depend on the module's status. * Your command can use the Object Manager and Magento dependency injection features; for example, it can use [constructor dependency injection]({{ page.baseurl }}/extension-dev-guide/depend-inj.html#constructor-injection). -* You must register your commands as discussed in any of the following sections: - - * [Add CLI commands using dependency injection](#cli-sample) - * [Add CLI commands using the Composer autoloader](#cli-autoload) ## Add CLI commands using dependency injection {#cli-sample} @@ -51,13 +47,24 @@ Following is a summary of the process: */ class SomeCommand extends Command { + const NAME = 'name'; + /** * @inheritDoc */ protected function configure() { + $options = [ + new InputOption( + self::NAME, + null, + InputOption::VALUE_REQUIRED, + 'Name' + ) + ]; $this->setName('my:first:command'); $this->setDescription('This is my first console command.'); + $this->setDefinition($options); parent::configure(); } @@ -70,6 +77,10 @@ Following is a summary of the process: */ protected function execute(InputInterface $input, OutputInterface $output) { + if ($name = $input->getOption(self::NAME)) { + $output->writeln('Provided name is `' . $name . '`'); + } + $output->writeln('Success Message.'); $output->writeln('An error encountered.'); } @@ -98,16 +109,16 @@ Following is a summary of the process: 1. Clean the [cache](https://glossary.magento.com/cache) and compiled code directories: ```bash - cd /var + rm -rf var/cache/* var/page_cache/* generated/* ``` - ```bash - rm -rf cache/* page_cache/* di/* generation/* - ``` +### Result -## Add CLI commands using the Composer autoloader {#cli-autoload} +As a result, the new command `my:first:command` that accepts a `--name` parameter is ready to use. -To be added at a later time. +```bash +bin/magento my:first:command --name 'John' +``` {:.ref-header} Related topic diff --git a/guides/v2.2/extension-dev-guide/indexing-custom.md b/guides/v2.2/extension-dev-guide/indexing-custom.md index 9c472b5f51b..58aa95ecb67 100644 --- a/guides/v2.2/extension-dev-guide/indexing-custom.md +++ b/guides/v2.2/extension-dev-guide/indexing-custom.md @@ -23,16 +23,57 @@ Your custom indexer class should implement [\Magento\Framework\Indexer\ActionInt ### Indexer configuration -In the `etc` directory of your module, add `indexer.xml` with the following: +Declare a new indexer process in the `etc/indexer.xml` file with the following attributes: -* indexer ID -* indexer class name -* indexer title -* indexer description -* indexer view ID -* shared indexes, if any +| Attribute | Required? | Description | +| --- | --- | --- | +| `id` | Yes | A unique indexer ID | +| `class` | No | The class that processes indexer methods (`executeFull`, `executeList`, `executeRow`) | +| `primary` | No | The source provider | +| `shared_index` | No | Use this option to improve performance if your indexer is related to another indexer. In this [example]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/CatalogRule/etc/indexer.xml), if the Catalog Product Rule index needs to be reindexed, but other catalog product rule indexes are up-to-date, then only the Catalog Product Rule is reindexed. | +| `view_id` | No | The ID of the view element that is defined in the `mview.xml` configuration file. | + +For example, + +```xml + + + + ... + + +``` -Use the optional `shared_index=` parameter to improve performance if your indexer is related to another indexer. In this [example]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/CatalogRule/etc/indexer.xml){:target="_blank"}, if [catalog](https://glossary.magento.com/catalog) rule product needs to be reindexed, but other catalog product rule index is up-to-date, then only catalog rule product is reindexed. +An indexer process can also have the following optional parameters: + +| Parameter | Description | +| --- | --- | +| `description` | The description of indexer to be displayed on the `System` > `Tools` > `Index Management` page. | +| `fieldset` | Describes the fields, source, and data provider of the flat index table. | +| `saveHandler` | An extension point. The class for processing (deleting, saving, updating) items when indexing. | +| `structure` | The class that processes (creates, removes) flat index tables. | +| `title` | The title of indexer to be displayed on the `System` > `Tools` > `Index Management` page. | + +For example: + +```xml + + + + Design Config Grid + Rebuild design config grid index + +
    + + + +
    + + +
    +
    +``` All indexers related to a [module](https://glossary.magento.com/module) should be declared in one file. diff --git a/guides/v2.2/extension-dev-guide/view-models.md b/guides/v2.2/extension-dev-guide/view-models.md index 5e35d830216..9c8bfd57949 100644 --- a/guides/v2.2/extension-dev-guide/view-models.md +++ b/guides/v2.2/extension-dev-guide/view-models.md @@ -21,13 +21,14 @@ The following example shows how to add functionality to a core template with cus ```xml - - - - Vendor\CustomModule\ViewModel\MyClass - - - + + + + Vendor\CustomModule\ViewModel\MyClass + + + + ``` You must implement the right interface in your `view_model` class (for example `ArgumentInterface`): diff --git a/guides/v2.2/javascript-dev-guide/javascript/js-resources.md b/guides/v2.2/javascript-dev-guide/javascript/js-resources.md index 920418b4329..49947e1f656 100644 --- a/guides/v2.2/javascript-dev-guide/javascript/js-resources.md +++ b/guides/v2.2/javascript-dev-guide/javascript/js-resources.md @@ -146,7 +146,7 @@ To include a 3rd party library and use it within the entire website (using the [ 1. Copy `slick.less` and `slick-theme.less` to the `/web/css/source` folder. Also add both files to `/web/css/source/_extend.less`. - ```less + ```scss @import "slick.less"; @import "slick-theme.less"; ``` diff --git a/guides/v2.2/mrg/ce/Analytics.md b/guides/v2.2/mrg/ce/Analytics.md deleted file mode 100644 index d0969f45dff..00000000000 --- a/guides/v2.2/mrg/ce/Analytics.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -group: module-reference-guide ---- - -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/Analytics/README.md %} \ No newline at end of file diff --git a/guides/v2.2/mrg/ce/CatalogAnalytics.md b/guides/v2.2/mrg/ce/CatalogAnalytics.md deleted file mode 100644 index c9112510c59..00000000000 --- a/guides/v2.2/mrg/ce/CatalogAnalytics.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -group: module-reference-guide ---- - -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/CatalogAnalytics/README.md %} \ No newline at end of file diff --git a/guides/v2.2/mrg/ce/CustomerAnalytics.md b/guides/v2.2/mrg/ce/CustomerAnalytics.md deleted file mode 100644 index f5fcd809580..00000000000 --- a/guides/v2.2/mrg/ce/CustomerAnalytics.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -group: module-reference-guide ---- - -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/CustomerAnalytics/README.md %} \ No newline at end of file diff --git a/guides/v2.2/mrg/ce/QuoteAnalytics.md b/guides/v2.2/mrg/ce/QuoteAnalytics.md deleted file mode 100644 index b30fd7eb0e3..00000000000 --- a/guides/v2.2/mrg/ce/QuoteAnalytics.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -group: module-reference-guide ---- - -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/QuoteAnalytics/README.md %} \ No newline at end of file diff --git a/guides/v2.2/mrg/ce/ReviewAnalytics.md b/guides/v2.2/mrg/ce/ReviewAnalytics.md deleted file mode 100644 index b655da2a03c..00000000000 --- a/guides/v2.2/mrg/ce/ReviewAnalytics.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -group: module-reference-guide ---- - -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/ReviewAnalytics/README.md %} \ No newline at end of file diff --git a/guides/v2.2/mrg/ce/Sales.md b/guides/v2.2/mrg/ce/Sales.md index 56b989fc631..e7845af8509 100644 --- a/guides/v2.2/mrg/ce/Sales.md +++ b/guides/v2.2/mrg/ce/Sales.md @@ -162,27 +162,11 @@ The service returns an identifier of the created Invoice. ### PHP interface -`\Magento\Sales\Api\InvoiceOrderInterface` - -{% collapsible Click to show/hide a code %} - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/Sales/Api/InvoiceOrderInterface.php %} -``` - -{% endcollapsible %} +[`\Magento\Sales\Api\InvoiceOrderInterface`][] ### PHP implementation -`\Magento\Sales\Model\InvoiceOrder` - -{% collapsible Click to show/hide included code %} - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/Sales/Model/InvoiceOrder.php %} -``` - -{% endcollapsible %} +[`\Magento\Sales\Model\InvoiceOrder`][] #### Exceptions @@ -470,27 +454,11 @@ The service returns an identifier of a created Credit Memo. ### PHP interface -`\Magento\Sales\Api\RefundInvoiceInterface` - -{% collapsible Click to show/hide a code %} - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/Sales/Api/RefundInvoiceInterface.php %} -``` - -{% endcollapsible %} +[`\Magento\Sales\Api\RefundInvoiceInterface`][] ### PHP implementation -`\Magento\Sales\Model\RefundInvoice` - -{% collapsible Click to show/hide a code %} - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/Sales/Model/RefundInvoice.php %} -``` - -{% endcollapsible %} +[`\Magento\Sales\Model\RefundInvoice`][] #### Exceptions @@ -750,27 +718,11 @@ The service returns an identifier of a created Credit Memo. ### PHP interface -`\Magento\Sales\Api\RefundOrderInterface` - -{% collapsible Click to show/hide a code %} - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/Sales/Api/RefundOrderInterface.php %} -``` - -{% endcollapsible %} +[\Magento\Sales\Api\RefundOrderInterface][] ### PHP implementation -`\Magento\Sales\Model\RefundOrder` - -{% collapsible Click to show/hide a code %} - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/Sales/Model/RefundOrder.php %} -``` - -{% endcollapsible %} +[`\Magento\Sales\Model\RefundOrder`][] #### Exceptions @@ -978,27 +930,11 @@ The service returns the identifier of a created shipment. ### PHP interface -`\Magento\Sales\Api\ShipOrderInterface` - -{% collapsible Click to show/hide a code %} - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/Sales/Api/ShipOrderInterface.php %} -``` - -{% endcollapsible %} +[`\Magento\Sales\Api\ShipOrderInterface`][] ### PHP implementation -`\Magento\Sales\Model\ShipOrder` - -{% collapsible Click to show/hide a code %} - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/Sales/Model/ShipOrder.php %} -``` - -{% endcollapsible %} +[`\Magento\Sales\Model\ShipOrder`][] #### Exceptions @@ -1044,3 +980,11 @@ The service contains extension points marked with `@api` annotation. Extension d [`\Magento\Sales\Model\Order\Validation\InvoiceOrderInterface`]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Sales/Model/Order/Validation/InvoiceOrderInterface.php [`\Magento\Sales\Model\Order\PaymentAdapterInterface`]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Sales/Model/Order/PaymentAdapterInterface.php [`\Magento\Sales\Model\Order\RefundAdapterInterface`]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Sales/Model/Order/RefundAdapterInterface.php +[`\Magento\Sales\Api\RefundOrderInterface`]: {{ site.mage2bloburl }}/2.2/app/code/Magento/Sales/Api/RefundOrderInterface.php +[`\Magento\Sales\Model\RefundOrder`]: {{ site.mage2bloburl }}/2.2/app/code/Magento/Sales/Model/RefundOrder.php +[`\Magento\Sales\Api\ShipOrderInterface`]: {{ site.mage2bloburl }}/2.2/app/code/Magento/Sales/Api/ShipOrderInterface.php +[`\Magento\Sales\Model\ShipOrder`]: {{ site.mage2bloburl }}/2.2/app/code/Magento/Sales/Model/ShipOrder.php +[`\Magento\Sales\Api\InvoiceOrderInterface`]: {{ site.mage2bloburl }}/2.2/app/code/Magento/Sales/Api/InvoiceOrderInterface.php +[`\Magento\Sales\Model\InvoiceOrder`]: {{ site.mage2bloburl }}/2.2/app/code/Magento/Sales/Model/InvoiceOrder.php +[`\Magento\Sales\Api\RefundInvoiceInterface`]: {{ site.mage2bloburl }}/2.2/app/code/Magento/Sales/Api/RefundInvoiceInterface.php +[`\Magento\Sales\Model\RefundInvoice`]: {{ site.mage2bloburl }}/2.2/app/code/Magento/Sales/Model/RefundInvoice.php \ No newline at end of file diff --git a/guides/v2.2/mrg/ce/SalesAnalytics.md b/guides/v2.2/mrg/ce/SalesAnalytics.md deleted file mode 100644 index 4db500f1ce8..00000000000 --- a/guides/v2.2/mrg/ce/SalesAnalytics.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -group: module-reference-guide ---- - -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/SalesAnalytics/README.md %} \ No newline at end of file diff --git a/guides/v2.2/mrg/ce/WishlistAnalytics.md b/guides/v2.2/mrg/ce/WishlistAnalytics.md deleted file mode 100644 index 302ae2c1d24..00000000000 --- a/guides/v2.2/mrg/ce/WishlistAnalytics.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -group: module-reference-guide ---- - -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/app/code/Magento/WishlistAnalytics/README.md %} \ No newline at end of file diff --git a/guides/v2.2/mtf/configuration.md b/guides/v2.2/mtf/configuration.md index 37ec991156f..8c80008c502 100644 --- a/guides/v2.2/mtf/configuration.md +++ b/guides/v2.2/mtf/configuration.md @@ -10,14 +10,7 @@ The Functional Testing Framework configuration settings are located in two [XML] ## `phpunit.xml` {#phpunit_xml} -The `/dev/tests/functional/phpunit.xml` contains PHPUnit configuration settings. Blocks of settings are described in [PHPUnit documentation], except `` that contains parameters described in the following table. - -{% collapsible Show/hide the default phpunit.xml code %} - -```xml -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/dev/tests/functional/phpunit.xml.dist %} -``` -{% endcollapsible %} +The `/dev/tests/functional/phpunit.xml` contains PHPUnit configuration settings. Blocks of settings are described in the [PHPUnit documentation], except ``, which contains parameters described in the following table. See the default phpunit.xml code at [`dev/tests/functional/phpunit.xml.dist`][]. | Parameter | Description | `value` | Usage | |---------- @@ -38,33 +31,21 @@ The `/dev/tests/functional/phpunit.xml` contains PHPUnit conf The FTF configuration settings are declared and specified in two places: -{% collapsible in the Framework %} - -The file is located in `dev/tests/functional/vendor/magento/mtf/etc` +**In the Framework:** -```xml -{% remote_markdown https://raw.githubusercontent.com/magento/mtf/develop/etc/config.xml.dist%} -``` +The file is located in `/dev/tests/functional/vendor/magento/mtf/etc`. See the default configuration at [`etc/config.xml.dist`][]. ![image]({{ site.baseurl }}/common/images/ftf/ftf_mtf-config-xsd-dia.svg) -Figure 1. - XML Schema for the `dev/tests/functional/vendor/magento/mtf/etc/config.xml`. +Figure 1. - XML Schema for the `/dev/tests/functional/vendor/magento/mtf/etc/config.xml`. -{%endcollapsible%} +**In Magento functional tests:** -{% collapsible in Magento functional tests %} - -The file is located in `dev/tests/functional/` - -```xml -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/dev/tests/functional/etc/config.xml.dist %} -``` +The file is located in `/dev/tests/functional/`. The default configuration is in [`dev/tests/functional/etc/config.xml.dist`][]. ![image]({{ site.baseurl }}/common/images/ftf/ftf_config-xsd-dia.svg) -Figure 2. - XML Schema for the `dev/tests/functional/vendor/magento/mtf/etc/config.xml`. - -{% endcollapsible %} +Figure 2. - XML Schema for the `/dev/tests/functional/vendor/magento/mtf/etc/config.xml`. The FTF merges settings from both files with the following priority: @@ -170,6 +151,9 @@ Set of parameters to be used for [installation test case]. [isolation management]: {{ page.baseurl }}/mtf/features/isolation.html [test case]: {{ page.baseurl }}/mtf/mtf_entities/mtf_testcase.html [test suite]: {{ page.baseurl }}/mtf/features/test_suite.html#configure +[`dev/tests/functional/phpunit.xml.dist`]: {{ site.mage2bloburl }}/2.2/dev/tests/functional/phpunit.xml.dist +[`etc/config.xml.dist`]: https://github.com/magento/mtf/blob/develop/etc/config.xml.dist +[`dev/tests/functional/etc/config.xml.dist`]: {{ site.mage2bloburl }}/2.2/dev/tests/functional/etc/config.xml.dist ["app_frontend_url"]: #app_frontend_url ["app_backend_url"]: #app_backend_url @@ -189,4 +173,4 @@ Set of parameters to be used for [installation test case]. [``]: #install -*[FTF]: Functional Testing Framework \ No newline at end of file +*[FTF]: Functional Testing Framework diff --git a/guides/v2.2/mtf/mtf_entities/mtf_constraint.md b/guides/v2.2/mtf/mtf_entities/mtf_constraint.md index de39ec36199..afc7e1a69ba 100644 --- a/guides/v2.2/mtf/mtf_entities/mtf_constraint.md +++ b/guides/v2.2/mtf/mtf_entities/mtf_constraint.md @@ -125,11 +125,7 @@ To assign severity tags do the following: ``` -For example, `/dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/di.xml`: - -```xml -{%remote_markdown https://raw.githubusercontent.com/magento/magento2/2.1/dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/di.xml %} -``` +For example, [`dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/di.xml`][]. ## How to create constraint {#mtf_constraint_create} @@ -262,3 +258,4 @@ in the order that it must be performed. [data set]: {{ page.baseurl }}/mtf/mtf_entities/mtf_dataset.html [fixture]: {{ page.baseurl }}/mtf/mtf_entities/mtf_fixture.html [test case]: {{ page.baseurl }}/mtf/mtf_entities/mtf_testcase.html +[`dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/di.xml`]: {{ site.mage2bloburl }}/2.2/dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/di.xml \ No newline at end of file diff --git a/guides/v2.2/mtf/mtf_entities/mtf_dataset.md b/guides/v2.2/mtf/mtf_entities/mtf_dataset.md index e2ec0404f64..48a20d24139 100644 --- a/guides/v2.2/mtf/mtf_entities/mtf_dataset.md +++ b/guides/v2.2/mtf/mtf_entities/mtf_dataset.md @@ -357,17 +357,7 @@ Variations `DeleteVideoFromPCFTestVariation1` and `DeleteVideoFromPCFTestVariati If you want to extend variation in another module using [merging], you should use a [test case] name that you want to merge with and a variation name that you want to extend. -For example, see how in `Magento/Catalog/Test/TestCase/Product/ValidateOrderOfProductTypeTest.xml` - - ```xml - {%remote_markdown https://raw.githubusercontent.com/magento/magento2/2.1/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ValidateOrderOfProductTypeTest.xml%} - ``` - - the variation `ValidateOrderOfProductTypeTestVariation1` is extended by the Magento_Bundle module: - - ```xml - {%remote_markdown https://raw.githubusercontent.com/magento/magento2/2.1/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/ValidateOrderOfProductTypeTest.xml%} - ``` +For example, see how in [`Magento/Catalog/Test/TestCase/Product/ValidateOrderOfProductTypeTest.xml`][] the variation `ValidateOrderOfProductTypeTestVariation1` is extended by the Magento_Bundle module in [`Magento/Bundle/Test/TestCase/ValidateOrderOfProductTypeTest.xml`][]. ### Replace a variation {#replace_variation} @@ -394,6 +384,8 @@ After a merge of a data set with the variation that is mentioned, a test will us [InjectableFixture]: https://github.com/magento/mtf/blob/develop/Magento/Mtf/Fixture/InjectableFixture.php [repository]: {{ page.baseurl }}/mtf/mtf_entities/mtf_fixture-repo.html [test case]: {{ page.baseurl }}/mtf/mtf_entities/mtf_testcase.html +[`Magento/Catalog/Test/TestCase/Product/ValidateOrderOfProductTypeTest.xml`]: {{ site.mage2bloburl }}/2.2/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ValidateOrderOfProductTypeTest.xml +`Magento/Bundle/Test/TestCase/ValidateOrderOfProductTypeTest.xml`]: {{ site.mage2bloburl }}/2.2/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/ValidateOrderOfProductTypeTest.xml diff --git a/guides/v2.2/mtf/mtf_entities/mtf_handler.md b/guides/v2.2/mtf/mtf_entities/mtf_handler.md index e89ccba8ef3..cddeb4a4f7f 100644 --- a/guides/v2.2/mtf/mtf_entities/mtf_handler.md +++ b/guides/v2.2/mtf/mtf_entities/mtf_handler.md @@ -126,11 +126,7 @@ Create the handler in the same directory where the interface is stored: `/dev/tests/functional/tests/app/Magento/[module_name]/Test/etc/[handler_type]`. -See an example for the Widget cURL handler (`/dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml`): - -```xml -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.1/dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml %} -``` +See an example for the Widget cURL handler [`dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml`][]. In this example, the `di.xml` file causes the `Curl` class to replace the `WidgetInterface`. @@ -249,11 +245,7 @@ Let's create a cURL handler that creates a new widget. } ``` -* Create [`di.xml`](#mtf_handler_di) in the `etc/curl` directory of the Magento_Widget module. - -```xml -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml %} -``` +* Create a [`di.xml`](#mtf_handler_di) file in the `etc/curl` directory of the Magento_Widget module ([`dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml`][]). ### cURL authentication classes {#mtf_handler_decor} @@ -529,3 +521,8 @@ Let's create a WebAPI handler that creates a new [tax rule](https://glossary.mag type="\Magento\Tax\Test\Handler\TaxRule\Webapi" /> ``` + + + +[`dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml`]: {{ site.mage2bloburl }}/2.2/dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml +[`dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml`]: {{ site.mage2bloburl }}/2.2/dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml diff --git a/guides/v2.2/mtf/mtf_entities/mtf_scenariotest.md b/guides/v2.2/mtf/mtf_entities/mtf_scenariotest.md index ef31b241cb4..ff9f97d1749 100644 --- a/guides/v2.2/mtf/mtf_entities/mtf_scenariotest.md +++ b/guides/v2.2/mtf/mtf_entities/mtf_scenariotest.md @@ -195,13 +195,7 @@ A tests step must implement `Magento\Mtf\TestStep\TestStepInterface` and define: - public method `run()` (required) - public method `cleanup()` (optional) -An example of `Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep`: - -{% collapsible Show/hide example %} -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php %} -``` -{% endcollapsible %} +See [`Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep`][]. ### `constructor()` method {#constructor-method} @@ -241,3 +235,4 @@ In the previous example the `clean()` method: [data set]: {{ page.baseurl }}/mtf/mtf_entities/mtf_dataset.html [test scenario]: #test-scenario [test step]: #test-step +[`Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep`]: {{ site.mage2bloburl }}/2.2/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php \ No newline at end of file diff --git a/guides/v2.2/rest/search-endpoint.md b/guides/v2.2/rest/search-endpoint.md new file mode 100644 index 00000000000..14235530606 --- /dev/null +++ b/guides/v2.2/rest/search-endpoint.md @@ -0,0 +1,142 @@ +--- +group: rest-api +title: Search for products with the /search endpoint +contributor_name: comwrap GmbH +contributor_link: https://www.comwrap.com/ +--- + +Magento provides two endpoints for searching products: + +* `GET V1/search` +* `GET V1/products` + +The `GET V1/search` endpoint replicates the search capabilities that customers and guests use to find products on the storefront. The `GET V1/products` endpoint returns results like you would receive by searching on the product grid page in the Admin. + +The following table highlights the differences between these two endpoints: + +Property | V1/products | V1/search +--- | --- | --- +Requires authorization token? | Yes | No +Has direct access to product data? | Yes | No (the Search engine acts as proxy) +Can specify any product attribute? | Yes | No +Contains product data in the response? | Yes | No +Are results sorted by search relevance? | No | Yes +Contains aggregations/buckets in the response? | No | Yes, for `quick_search_container` and `catalog_view_container` searches + +The `V1/search` endpoint is generally more useful when you have only human (or human-like) search terms at hand, targeted to isolate a single product or a limited set of products. An added benefit is that the results are pre-sorted by their applicable search relevance. + +In all other cases, for example when building and filtering product collections, and especially when other non-human backend data is available, such as an attribute's option IDs, the `V1/products` endpoint is a good choice. + +## Build queries for V1/search + +When you use `V1/search`, you are searching for products through the catalog. The response comes from the configured search engine (**Stores** > Settings > **Configuration** > **Catalog** > **Catalog Search** > **Search engine**), and the results are the same as those returned by using the regular frontend search. + +All search queries run against the `catalogsearch_fulltext` index. + +The basic structure of a REST call using `V1/search` follows: + +```http +GET /rest//V1/search?searchCriteria[requestName]=& +searchCriteria[filter_groups][0][filters][0][field]=& +searchCriteria[filter_groups][0][filters][0][value]= +``` + +By default, the container name can be one of these values: + +* quick_search_container +* advanced_search_container +* catalog_view_container + +The possible values for the filter name and the search value are specific for each container. + +Each searchable attribute defines a search boost value, which defaults to 1. However, some predefined attributes have higher values. For example, the default boost value for `sku` is 6, while the `name` has a default value of 5. + +For more details about the capabilities of searches using `V1/search`, review `Magento/CatalogSearch/etc/search_request.xml`. + +### Quick searches + +The `quick_search_container` request allows you to perform the same search that a customer performs on the storefront. + +By default, a filter name can be one of these: + +* `category_ids` +* `price.from` +* `price.to` +* `search_term` +* `visibility` + +Quick searches return aggreggations and buckets. + +#### Example + +The following example performs a quick search for `digital watch`: + +```http +GET /rest//V1/search?searchCriteria[requestName]=& +searchCriteria[filter_groups][0][filters][0][field]=search_term& +searchCriteria[filter_groups][0][filters][0][value]=digital watch +``` + +### Advanced searches + +The `advanced_search_container` request performs more complex searches, like those possible on the Advanced Search page. + +The default filters for advanced searches can use the following [field] value: + +* `category_ids` +* `price.from` +* `price.to` +* `sku` + +The filter can also be any searchable attribute. To make an attribute searchable, set **Stores** > Attributes > **Product** > > **Storefront Properties** > **Use in Search** to **Yes**. The search query can include attributes such as the product name, SKU, or any other custom attribute. + +Advanced searches can use any condition type to make comparisions, such as `like`, `eq`, or `finset`. See [Search using REST]({{page.baseurl}}/rest/performing-searches.html) describes condition types. + +Advanced searches do not return aggregation data. + +#### Examples + +The following example get products within a price range: + +```http +GET /rest//V1/search?searchCriteria[requestName]=advanced_search_container& +searchCriteria[filter_groups][0][filters][0][field]=price.from& +searchCriteria[filter_groups][0][filters][0][value]=2& +searchCriteria[filter_groups][0][filters][1][field]=price.to& +searchCriteria[filter_groups][0][filters][1][value]=3 +``` + +The following example gets products where the SKU might contain a specified string: + +```http +GET /rest//V1/search?searchCriteria[requestName]=advanced_search_container& +searchCriteria[filter_groups][0][filters][0][field]=sku& +searchCriteria[filter_groups][0][filters][0][value]=shirt& +searchCriteria[filter_groups][0][filters][0][condition_type]=like +``` + +### Catalog view searches + +The `catalog_view_container`request accepts the following filters: + +* `category_ids` +* `price.from` +* `price.to` +* `visibility` + +Quick searches return aggreggations and buckets. + +#### Example + +The following example gets all products in a given category: + +```http +GET /rest//V1/search?searchCriteria[requestName]=catalog_view_container& +searchCriteria[filter_groups][0][filters][0][field]=category_ids& +searchCriteria[filter_groups][0][filters][0][value][0]=4& +searchCriteria[filter_groups][0][filters][0][condition_type]=eq +``` + +## Build queries for V1/products + +[Search using REST]({{page.baseurl}}/rest/performing-searches.html) provides examples that can be used to search for products. diff --git a/guides/v2.2/test/integration/annotations/magento-data-fixture.md b/guides/v2.2/test/integration/annotations/magento-data-fixture.md index f2d8ab85c9f..8e2abd3e72a 100644 --- a/guides/v2.2/test/integration/annotations/magento-data-fixture.md +++ b/guides/v2.2/test/integration/annotations/magento-data-fixture.md @@ -54,25 +54,13 @@ The ITF includes the declared PHP script to your test and executes it during tes The following example demonstrates a simple implementation of a Cms module page test from the Magento codebase. -Data fixture to test a Cms module page (`dev/tests/integration/testsuite/Magento/Cms/_files/pages.php`): +Data fixture to test a Cms module page: [`dev/tests/integration/testsuite/Magento/Cms/_files/pages.php`][]. -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/dev/tests/integration/testsuite/Magento/Cms/_files/pages.php %} -``` - -Test case that uses the above data fixture (`dev/tests/integration/testsuite/Magento/Cms/Block/PageTest.php`): - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/dev/tests/integration/testsuite/Magento/Cms/Block/PageTest.php %} -``` +Test case that uses the above data fixture [`dev/tests/integration/testsuite/Magento/Cms/Block/PageTest.php`][]. ### Fixture as a method -The following is an example of the `testCreatePageWithSameModuleName()` test method that uses data from the `cmsPageWithSystemRouteFixture()` data fixture. - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.2/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php %} -``` +[`dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php`][] contains an example of the `testCreatePageWithSameModuleName()` test method that uses data from the `cmsPageWithSystemRouteFixture()` data fixture. ### Test case and test method scopes @@ -112,3 +100,6 @@ Do not rely on and do not modify an application state from within a fixture, bec [magentoAppIsolation]: magento-app-isolation.html +[`dev/tests/integration/testsuite/Magento/Cms/_files/pages.php`]: {{ site.mage2bloburl }}/2.2/dev/tests/integration/testsuite/Magento/Cms/_files/pages.php +[`dev/tests/integration/testsuite/Magento/Cms/Block/PageTest.php`]: {{ site.mage2bloburl }}/2.2/dev/tests/integration/testsuite/Magento/Cms/Block/PageTest.php +[`dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php`]: {{ site.mage2bloburl }}/2.2/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php \ No newline at end of file diff --git a/guides/v2.2/ui_comp_guide/components/ui-column.md b/guides/v2.2/ui_comp_guide/components/ui-column.md index 65bf7e20b70..2ede03ca9ce 100644 --- a/guides/v2.2/ui_comp_guide/components/ui-column.md +++ b/guides/v2.2/ui_comp_guide/components/ui-column.md @@ -7,136 +7,63 @@ The Column component implements a basic column in [Listing]({{ page.baseurl }}/u ## Configuration options - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    OptionDescriptionTypeDefault
    componentThe path to the component's .js file in terms of RequireJS.StringMagento_Ui/js/grid/columns/column
    bodyTmplPath to the template used for rendering column's fields in the table's body.Stringui/grid/cells/text
    controlVisibilityWhether a user can control column's visibility handled by the ColumnsControls component.Booleantrue
    disableActionDisables the action set in the templates.fieldAction property.Booleanfalse
    draggableDefines if a user can change column's position in the table by grabbing column's header and dragging it across the table.Booleantrue
    editor - String | Object -
    fieldClassAdditional CSS classes added to the column's field elements.{[name: String]: Boolean}''
    filterReference to one of the available filter types defined in the Filters component. If the value represents an object containing the filterType field, this object is considered as an extension of the referenced filter element. If there's no such field in the value object, it is considered as a definition of a custom filter element.String | Object -
    headerTmplPath to the .html template for the column's header.Stringui/grid/columns/text
    labelThe column label displayed in the header.String''
    sortableWhether column's fields can be used to sort records in a table.Booleantrue
    sortingColumn's sorting order. Can be ascending (asc), descending (desc) or none (false). Setting sorting to false does not disable sorting, which is defined by the sortable option.asc | desc | Booleanfalse
    statefullDefined in the parent uiElement class. - {visible: true, sorting: true}
    templates.fieldActionThe action performed on the column's field click.ColumnAction-
    visibleInitial component's visibility. When set to false, the display: none CSS style is added to the component's DOM block.Booleantrue
    +| Option | Description | Type | Default | +| --- | --- | --- | --- | +| `component` | The path to the component's `.js` file in terms of RequireJS. | String | `Magento_Ui/js/grid/columns/column` | +| `bodyTmpl` | Path to the template used for rendering column's fields in the table's body. | String | `ui/grid/cells/text` | +| `controlVisibility` | Whether a user can control column's visibility handled by the [ColumnsControls component]({{ page.baseurl }}/ui_comp_guide/components/ui-columnscontrols.html). | Boolean | `true` | +| `disableAction` | Disables the action set in the `templates.fieldAction` property. | Boolean | `false` | +| `draggable` | Defines if a user can change column's position in the table by grabbing column's header and dragging it across the table. | Boolean | `true` | +| `editor` | | String \| Object | | +| `fieldClass` | Additional CSS classes added to the column's field elements. | {[name: String]: Boolean} | `''` | +| `filter` | Reference to one of the available filter types defined in the [Filters component]({{ page.baseurl }}/ui_comp_guide/components/ui-filters.html). If the value represents an object containing the `filterType` field, this object is considered as an extension of the referenced filter element. If there's no such field in the value object, it is considered as a definition of a custom filter element. | String \| Object | `-` | +| `headerTmpl` | Path to the `.html` template for the column's header. | String | `ui/grid/columns/text` | +| `label` | The column label displayed in the header. | String | `''` | +| `sortable` | Whether column's fields can be used to sort records in a table. | Boolean | `true` | +| `sorting` | Column's sorting order. Can be ascending (`asc`), descending (`desc`) or none (`false`). Setting `sorting` to `false` does not disable sorting, which is defined by the `sortable` option. | String \| Boolean | `false` | +| `statefull` | Defined in the parent [uiElement class]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_uielement_concept.html). | Object | `{visible: true, sorting: true}` | +| `templates.fieldAction` | The action performed on the column's field click. | [ColumnAction](#column_action) | `-` | +| `visible` | Initial component's visibility. When set to `false`, the `display: none` CSS style is added to the component's DOM block. | Boolean | `true` | ### ColumnAction interface {#column_action} - - - - - - - - - - - - - - - - - - - - - - - - - -
    OptionDescriptionTypeRequired
    paramsA list of arguments that will be passed to the method.ArrayOptional
    providerReference to component.StringRequired
    targetName of the component's method to be invoked.StringRequired
    +| Option | Description | Type | Required | +| --- | --- | --- | --- | +| `params` | A list of arguments that will be passed to the method. | Array | Optional | +| `provider` | Reference to component. | String | Required | +| `target` | Name of the component's method to be invoked. | String | Required | ## Source files Extends [`UiElement`]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_uielement_concept.html): - [`Magento/Ui/view/base/web/js/grid/columns/column.js`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/js/grid/columns/column.js) +- [`Magento/Ui/view/base/web/templates/grid/cells/text.html`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/templates/grid/cells/text.html) + +## Examples + +### Integrate Column component with Listing component + +This is an example of how the Column component integrates with the [Listing]({{ page.baseurl }}/ui_comp_guide/components/ui-listing-grid.html) component: + +```xml ++ ... + + ... + + + text + text + + + + ... + + ... + +``` + +#### Result + +![Column Component Example]({{ site.baseurl }}/common/images/ui_comps/ui-column-result.png) diff --git a/guides/v2.2/ui_comp_guide/components/ui-columns.md b/guides/v2.2/ui_comp_guide/components/ui-columns.md index 3704d9fe2c7..afb00653764 100644 --- a/guides/v2.2/ui_comp_guide/components/ui-columns.md +++ b/guides/v2.2/ui_comp_guide/components/ui-columns.md @@ -16,7 +16,7 @@ The Columns component is a collection of columns. It renders the `` eleme | `stickyTmpl` | Path to the `.html` template used for the [Toolbar component]({{ page.baseurl }}/ui_comp_guide/components/ui-toolbar.html) when it receives a fixed position. | String | `ui/grid/sticky/listing` | | `template` | Path to the component’s `.html` template. | String | `ui/grid/listing` | | `editorConfig` | Configuration of the InlineEditing component. | Object | Specified in the [InlineEditing component configuration]({{ page.baseurl }}/ui_comp_guide/components/ui-insertlisting.html). | -| `viewSwitcherTmpl` | Path to the .html template for rendering the list of available display modes. By default this list is not displayed. | String | `ui/grid/view-switcher` | +| `viewSwitcherTmpl` | Path to the `.html` template for rendering the list of available display modes. By default this list is not displayed. | String | `ui/grid/view-switcher` | | `componentType` | The type of component. | String | `columns` | | `resizeConfig` | Configurations of [`Resize`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/js/grid/resize.js) component. | Object | `{name: '${ $.name }_resize',columnsProvider: '${ $.name }',component: 'Magento_Ui/js/grid/resize',enabled: false}` | @@ -33,3 +33,107 @@ The Columns component is a collection of columns. It renders the `
    ` eleme Extends [`uiCollection`]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_uicollection_concept.html): - [`Magento/Ui/view/base/web/js/grid/listing.js`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/js/grid/listing.js) +- [`Magento/Ui/view/base/web/templates/list/listing.html`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/templates/list/listing.html) + +## Examples + +### Integrate the Columns component as a grid (default) with the Listing component + +This is an example of how the Columns component integrates with the [Listing]({{ page.baseurl }}/ui_comp_guide/components/ui-listing-grid.html) component: + +```xml ++ ... + + + + text + text + + 1 + + + + + text + text + + 2 + + + + + text + text + + 3 + + + + + text + text + + 4 + + + + ... + +``` + +#### Result + +![Columns Component Example]({{ site.baseurl }}/common/images/ui_comps/ui-columns-result.png) + +### Integrate the Columns component as a list with the Listing component + +This is an example of how the Columns component with the list display mode integrates with the [Listing]({{ page.baseurl }}/ui_comp_guide/components/ui-listing-grid.html) component: + +```xml ++ ... + + + list + + + + text + text + + 1 + + + + + text + text + + 2 + + + + + text + text + + 3 + + + + + text + text + + 4 + + + + ... + +``` + +#### Result + +![Columns List Component Example]({{ site.baseurl }}/common/images/ui_comps/ui-columns-list-result.png) diff --git a/guides/v2.2/ui_comp_guide/components/ui-datecolumn.md b/guides/v2.2/ui_comp_guide/components/ui-datecolumn.md index c2737f68265..ba4c210df9f 100644 --- a/guides/v2.2/ui_comp_guide/components/ui-datecolumn.md +++ b/guides/v2.2/ui_comp_guide/components/ui-datecolumn.md @@ -7,23 +7,48 @@ The DateColumn component implements a table column that displays dates. ## Configuration options -
    - - - - - - - - - - - - -
    OptionDescriptionTypeDefault
    dateFormatDate format for the displayed column's values.StringMMM d, YYYY h:mm:ss A
    +| Option | Description | Type | Default | +| --- | --- | --- | --- | +| `dateFormat` | Date format for the displayed column's values. | String | `MMM d, YYYY h:mm:ss A` | ## Source files Extends [`Column`]({{ page.baseurl }}/ui_comp_guide/components/ui-column.html): -- [`app/code/Magento/Ui/view/base/web/js/grid/columns/date.js`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/js/grid/columns/date.js) \ No newline at end of file +- [`app/code/Magento/Ui/view/base/web/js/grid/columns/date.js`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/js/grid/columns/date.js) + +## Examples + +### Integrate the DateColumn component with the Listing component + +This is an example of how the DateColumn component integrates with the [Listing]({{ page.baseurl }}/ui_comp_guide/components/ui-listing-grid.html) component: + +```xml ++ ... + + + + dateRange + date + date + + + + + + dateRange + date + yyyy-MM-dd hh:mm:ss + + + + ... + + ... + +``` + +### Result + +![DateColumn Component Example]({{ site.baseurl }}/common/images/ui_comps/ui-date-column-result.png) diff --git a/guides/v2.2/ui_comp_guide/components/ui-draganddrop.md b/guides/v2.2/ui_comp_guide/components/ui-draganddrop.md index 1dfc412c0dc..c2e91f2cd78 100644 --- a/guides/v2.2/ui_comp_guide/components/ui-draganddrop.md +++ b/guides/v2.2/ui_comp_guide/components/ui-draganddrop.md @@ -7,15 +7,60 @@ The DragAndDrop component is an [extension](https://glossary.magento.com/extensi ## Configuration options -|Option|Description|Type|Default Value| -|--- |--- |--- |--- | -|`enabled`|Whether the component is allowed to change the position of columns.|Boolean|`true`| -|`fixedX`|Whether the column has a fixed position on the X-axis. That is, whether it can be moved horizontally.|Boolean|`false`| -|`fixedY`|Whether the column has a fixed position on the X-axis. That is, whether it can be moved horizontally.|Boolean|`true`| -|`noSelectClass`|CSS class applied to the table when one of its columns is being dragged.|String|`_no-select`| +| Option | Description | Type | Default Value | +| --- | --- | --- | --- | +| `enabled`| Whether the component is allowed to change the position of columns. | Boolean | `true` | +| `fixedX` | Whether the column has a fixed position on the X-axis. That is, whether it can be moved horizontally. | Boolean | `false` | +| `fixedY` | Whether the column has a fixed position on the Y-axis. That is, whether it can be moved vertically. | Boolean | `true` | +| `noSelectClass` | CSS class applied to the table when one of its columns is being dragged. | String | `'_no-select'` | ## Source files Extends [`UiCollection`]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_uicollection_concept.html): - [`app/code/Magento/Ui/view/base/web/js/grid/dnd.js`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/js/grid/dnd.js) + +## Examples + +### Integrate the DragAndDrop component with the Listing component + +This example configures the DragAndDrop component for the [Columns]({{ page.baseurl }}/ui_comp_guide/components/ui-columns.html) component and integrates it with the [Listing]({{ page.baseurl }}/ui_comp_guide/components/ui-listing-grid.html) component: + +```xml ++ ... + + + + true + false + true + _no-select + + + ... + + +``` + +#### Result + +![DateColumn Component Example]({{ site.baseurl }}/common/images/ui_comps/ui-draganddrop-columns-result.png) + +### Disable the DragAndDrop component for the Columns component + +This example disables the DragAndDrop component for the [Columns]({{ page.baseurl }}/ui_comp_guide/components/ui-columns.html) component and integrates it with the [Listing]({{ page.baseurl }}/ui_comp_guide/components/ui-listing-grid.html) component: + +```xml ++ ... + + + + false + + + ... + + +``` diff --git a/guides/v2.2/ui_comp_guide/components/ui-fieldset.md b/guides/v2.2/ui_comp_guide/components/ui-fieldset.md index 0790b6cde82..7d7e1fe1d72 100644 --- a/guides/v2.2/ui_comp_guide/components/ui-fieldset.md +++ b/guides/v2.2/ui_comp_guide/components/ui-fieldset.md @@ -20,8 +20,48 @@ The Fieldset component implements a container for visually-grouped form elements | Title | Type | Default | Description | | ------------- | ------- | ------- | --------------------------------------------------------------------------------- | | `collapsible` | Boolean | `false` | Enables/disables the collapsible functionality. | +| `label` | String | | Caption for the fieldset. | | `opened` | Boolean | `false` | Initial collapsible state. Applied when the collapsible functionality is enabled. | +## Examples + +### Integrate the Fieldset component with the Form component + +The following example adds a new main fieldset that contains a collapsible fieldset into the [Form]({{ page.baseurl }}/ui_comp_guide/components/ui-form.html) component: + +```xml +
    +
    + + + +
    + + + Information + true + true + + + + + + My Field + true + text + input + + + +
    +
    +
    +``` + +#### Result + +![Checkbox UiComponent]({{ site.baseurl }}/common/images/ui_comps/fieldset-component-result.png) + ## Source files Extends [`uiCollection`]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_uicollection_concept.html) and `collapsible`: diff --git a/guides/v2.2/ui_comp_guide/components/ui-paging.md b/guides/v2.2/ui_comp_guide/components/ui-paging.md index b42b8211852..69c6e84f315 100644 --- a/guides/v2.2/ui_comp_guide/components/ui-paging.md +++ b/guides/v2.2/ui_comp_guide/components/ui-paging.md @@ -7,44 +7,38 @@ The Paging component implements pagination in grids implemented using [Listing]( ## Configuration options - - - - - - - - - - - - - - - - - - - - - - - - - -
    OptionDescriptionTypeDefault Value
    totalTmplPath to the .html template for rendering the total amount of found records.Stringui/grid/paging-total
    sizesConfig -
      -
    • minSize
    • -
    • maxSize
    • -
    - -
    Configuration that is passed to the Sizes component: minimum and maximum number of elements on a page.Object
      -
    • 1
    • -
    • 999
    • -
    templateThe path to the component’s .html template.Stringui/grid/paging/paging
    +| Option | Description | Type | Default Value | +| --- | --- | --- | --- | +| `current` | The number of current page. | String | `1` | +| `sizesConfig`.`maxSize` | The maximum number of elements on a page configuration that is passed to the `Sizes` component. | Object | `999` | +| `sizesConfig`.`minSize` | The minimum number of elements on a page configuration that is passed to the `Sizes` component. | Object | `1` | +| `template` | The path to the component’s `.html` template. | String | `ui/grid/paging/paging` | +| `totalTmpl` | Path to the `.html` template for rendering the total amount of found records. | String | `ui/grid/paging-total` | ## Source files Extends [`UiElement`]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_uielement_concept.html): - [app/code/Magento/Ui/view/base/web/js/grid/paging/paging.js]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/js/grid/paging/paging.js) +- [app/code/Magento/Ui/view/base/web/templates/grid/paging/paging.html]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/templates/grid/paging/paging.html) +- [app/code/Magento/Ui/view/base/web/templates/grid/paging-total.html]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/templates/grid/paging-total.html) + +## Examples + +### Integrate the Paging component with the Listing component + +This example integrates the Paging component with the [Listing]({{ page.baseurl }}/ui_comp_guide/components/ui-listing-grid.html) component: + +```xml ++ ... + + ... + + + +``` + +#### Result + +![Paging Component example]({{ site.baseurl }}/common/images/ui_comps/ui-paging-result.png) diff --git a/guides/v2.2/ui_comp_guide/concepts/knockout-bindings.md b/guides/v2.2/ui_comp_guide/concepts/knockout-bindings.md index a19500754f5..2975b80500c 100644 --- a/guides/v2.2/ui_comp_guide/concepts/knockout-bindings.md +++ b/guides/v2.2/ui_comp_guide/concepts/knockout-bindings.md @@ -225,7 +225,9 @@ The `i18n` binding is used to translate a string according to the currently enab **Usage example**: ```html -
    + + +
    @@ -327,7 +329,7 @@ Callback that is invoked when user clicks outside of the element. ```html
    ``` diff --git a/guides/v2.2/ui_comp_guide/concepts/magento-bindings.md b/guides/v2.2/ui_comp_guide/concepts/magento-bindings.md index 845b73877a5..ccfa8d0729b 100644 --- a/guides/v2.2/ui_comp_guide/concepts/magento-bindings.md +++ b/guides/v2.2/ui_comp_guide/concepts/magento-bindings.md @@ -81,5 +81,5 @@ The table below shows examples of how the Knockout bindings map to their Magento |textInput |`` | `` | |value |`` | `` | |checked |`` | `` | -| |`` | `` | -|checkedValue |`` | `` | +| |`` | `` | +|checkedValue |`` | `` | diff --git a/guides/v2.3/cloud/env/restore-environment.md b/guides/v2.3/cloud/env/restore-environment.md new file mode 120000 index 00000000000..7b8850c2901 --- /dev/null +++ b/guides/v2.3/cloud/env/restore-environment.md @@ -0,0 +1 @@ +../../../../guides/v2.2/cloud/env/restore-environment.md \ No newline at end of file diff --git a/guides/v2.3/cloud/project/monitor-performance.md b/guides/v2.3/cloud/project/monitor-performance.md new file mode 120000 index 00000000000..a6113a4a7aa --- /dev/null +++ b/guides/v2.3/cloud/project/monitor-performance.md @@ -0,0 +1 @@ +../../../v2.2/cloud/project/monitor-performance.md \ No newline at end of file diff --git a/guides/v2.3/config-guide/elasticsearch/es-config-nginx.md b/guides/v2.3/config-guide/elasticsearch/es-config-nginx.md index f4e52a9768c..1c7ecc2e8d2 100644 --- a/guides/v2.3/config-guide/elasticsearch/es-config-nginx.md +++ b/guides/v2.3/config-guide/elasticsearch/es-config-nginx.md @@ -39,8 +39,8 @@ This section discusses how to specify who can access the [nginx](https://glossar ```conf server { listen 8080; - location / { - proxy_pass http://localhost:9200; + location /_cluster/health { + proxy_pass http://localhost:9200/_cluster/health; } } ``` diff --git a/guides/v2.3/contributor-guide/backward-compatible-development/index.md b/guides/v2.3/contributor-guide/backward-compatible-development/index.md index fc7263ad09d..c8e69937c78 100644 --- a/guides/v2.3/contributor-guide/backward-compatible-development/index.md +++ b/guides/v2.3/contributor-guide/backward-compatible-development/index.md @@ -128,6 +128,8 @@ Add a new optional parameter to the constructor at the end of the arguments list In the constructor body, if the new dependency is not provided (i.e. the value of the introduced argument is `null`), fetch the dependency using `Magento\Framework\App\ObjectManager::getInstance()`. +Prefix the type name with a question mark when declaring a parameter with a `null` default value. + {% collapsible Example Code %} ```php @@ -140,7 +142,7 @@ class ExistingClass \Old\Dependency\Interface $oldDependency, $oldRequiredConstructorParameter, $oldOptionalConstructorParameter = null, - \New\Dependency\Interface $newDependency = null + ?\New\Dependency\Interface $newDependency = null ) { ... $this->newDependency = $newDependency ?: \Magento\Framework\App\ObjectManager::getInstance()->get(\New\Dependency\Interface::class); diff --git a/guides/v2.3/graphql/caching.md b/guides/v2.3/graphql/caching.md index 1e997cc78f9..1f54a43f2dc 100644 --- a/guides/v2.3/graphql/caching.md +++ b/guides/v2.3/graphql/caching.md @@ -81,7 +81,20 @@ sub process_graphql_headers { [Configure Varnish and your web server]({{page.baseurl}}/config-guide/varnish/config-varnish-configure.html) further describes how to configure the `default.vcl` file. +## Caching with Fastly + +To cache GraphQL query results on {{ site.data.var.ece }}, the Cloud project must be running Fastly CDN module for Magento 2 version 1.2.118 or later. + +{:procedure} +To enable GraphQL caching on Fastly: + +1. Upgrade the Fastly CDN Module for Magento 2.x to version 1.2.118 or later. +1. Upload the updated VCL code to the Fastly servers. + +[Set up Fastly]({{page.baseurl}}/cloud/cdn/configure-fastly.html) describes how to perform both of these tasks. + ## X-Magento-Vary + The `X-Magento-Vary` cache cookie is not supported for GraphQL. The `Store` and `Content-Currency` headers, along with the content language (which is deduced) determine the context. ## Response headers diff --git a/guides/v2.3/graphql/mutations/add-configurable-products.md b/guides/v2.3/graphql/mutations/add-configurable-products.md index 561e27e9255..149f307c99f 100644 --- a/guides/v2.3/graphql/mutations/add-configurable-products.md +++ b/guides/v2.3/graphql/mutations/add-configurable-products.md @@ -100,8 +100,8 @@ Attribute | Type | Description --- | --- | --- `customizable_options` | [CustomizableOptionInput](#customOptionInput) | An object that contains the ID and value of the product `data` | [CartItemInput!](#cartItemInput) | An object that contains the quantity and SKU of the configurable product -`parent_sku` | String | The SKU of the simple product's parent configurable product -`variant_sku` | String | Deprecated. Use [`CartItemInput.sku`](#cartItemInput) instead +`parent_sku` | String | The SKU of the simple product's parent configurable product. If you do not specify this attribute, Magento treats the product being added to the cart as a simple product +`variant_sku` | String | Deprecated. Use `CartItemInput.sku` instead. The SKU of the simple product ### CustomizableOptionInput object {#customOptionInput} @@ -114,12 +114,9 @@ Attribute | Type | Description ### CartItemInput object {#cartItemInput} -The `CartItemInput` object contains the following attributes: +The `CartItemInput` object must contain the following attributes: -Attribute | Type | Description ---- | --- | --- -`quantity` | Float! | The number of items to add to the cart -`sku` | String! | The SKU of the simple product +{% include graphql/cart-item-input.md %} ## Output attributes diff --git a/guides/v2.3/graphql/mutations/add-simple-products.md b/guides/v2.3/graphql/mutations/add-simple-products.md index 379a7b1214e..d1769387e9f 100644 --- a/guides/v2.3/graphql/mutations/add-simple-products.md +++ b/guides/v2.3/graphql/mutations/add-simple-products.md @@ -164,7 +164,7 @@ Attribute | Data Type | Description The `CartItemInput` object must contain the following attributes: -{% include graphql/customizable-option-input.md %} +{% include graphql/cart-item-input.md %} ### CustomizableOptionInput object {#CustomizableOptionInputSimple} diff --git a/guides/v2.3/graphql/queries/customer-downloadable-products.md b/guides/v2.3/graphql/queries/customer-downloadable-products.md index be553ed8cf5..95bce24b186 100644 --- a/guides/v2.3/graphql/queries/customer-downloadable-products.md +++ b/guides/v2.3/graphql/queries/customer-downloadable-products.md @@ -80,4 +80,4 @@ Attribute | Type | Description Error | Description --- | --- -`The current customer isn't authorized.` | The customer's token does not exist in the `oauth_token` table. +`The current customer isn't authorized.` | The current customer is not currently logged in, or the customer's token does not exist in the `oauth_token` table. diff --git a/guides/v2.3/graphql/queries/customer-orders.md b/guides/v2.3/graphql/queries/customer-orders.md index c30d6905d59..db0bca042ea 100644 --- a/guides/v2.3/graphql/queries/customer-orders.md +++ b/guides/v2.3/graphql/queries/customer-orders.md @@ -80,3 +80,9 @@ Attribute | Data type | Description `increment_id` | String | Deprecated. Use `order_number` instead. An ID that indicates the sequence of the order in the customer's order history `order_number` | String! | The order number assigned to the order `status` | String | The status of the order, such as `open`, `processing`, or `closed` + +## Errors + +Error | Description +--- | --- +`The current customer isn't authorized.` | The current customer is not currently logged in, or the customer's token does not exist in the `oauth_token` table. diff --git a/guides/v2.3/performance-best-practices/advanced-js-bundling.md b/guides/v2.3/performance-best-practices/advanced-js-bundling.md index 5fd19305762..8f3b4654fa7 100644 --- a/guides/v2.3/performance-best-practices/advanced-js-bundling.md +++ b/guides/v2.3/performance-best-practices/advanced-js-bundling.md @@ -449,21 +449,21 @@ To get RequireJS to use your bundles, add a `onModuleBundleComplete` callback af ], }, ], -onModuleBundleComplete: function (data) { - function onBundleComplete (config, data) { - const fileName = `${config.dir}/requirejs-config.js`; - const bundleConfig = {}; - bundleConfig[data.name] = data.included; - bundleConfig[data.name] = bundleConfig[data.name].map(bundle => bundle.replace(/\.js$/, '')); - const contents = `require.config({ - bundles: ${JSON.stringify(bundleConfig)}, - });`; - fs.appendFile(fileName, contents, function (err) { - if (err) throw err; - console.log('Saved!'); - }); - } - onBundleComplete(config, data); +bundlesConfigOutFile: `${config.dir}/requirejs-config.js`, +onModuleBundleComplete: function(data) { + if (this.bundleConfigAppended) { + return; + } + this.bundleConfigAppended = true; + + // bundlesConfigOutFile requires a simple require.config call in order to modify the configuration + const bundleConfigPlaceholder = ` +(function (require) { +require.config({}); +})(require); + `; + + fs.appendFileSync(this.bundlesConfigOutFile, bundleConfigPlaceholder); } ``` @@ -479,19 +479,19 @@ Open `requirejs-config.js` in the `pub/static/frontend/Magento/luma/en_US` direc ```javascript require.config({ - bundles: { "bundles/default": ["mage/template","mage/apply/scripts","mage/apply/main","mage/mage","mage/translate","mage/loader"] } -}); -require.config({ - bundles: { "bundles/cart": ["Magento_Ui/js/lib/validation/utils","Magento_Ui/js/lib/validation/rules","Magento_Ui/js/lib/validation/validation"] } -}); + bundles: { + "bundles/default": ["mage/template", "mage/apply/scripts", "mage/apply/main", "mage/mage", "mage/translate", "mage/loader"], + "bundles/cart": ["Magento_Ui/js/lib/validation/utils", "Magento_Ui/js/lib/validation/rules", "Magento_Ui/js/lib/validation/validation"] + } +} ``` {: .bs-callout-info } -When configuring bundles, make sure you put the `requirejs.config()` calls in the order you want them executed, because the calls are executed in the sequential order they appear. +When configuring bundles, make sure you put the `requirejs.config()` calls in the order you want them executed, as the calls are executed in the order they appear. #### 6. Test the results -After the page loads, you should notice the browser loading different dependencies and bundles. For example, here are the results for 'Slow 3G' profile: +After the page loads, notice the browser loading different dependencies and bundles. For example, here are the results for 'Slow 3G' profile: ![TwiceAsFast](images/TwiceAsFast.png) diff --git a/guides/v2.3/rest/search-endpoint.md b/guides/v2.3/rest/search-endpoint.md new file mode 120000 index 00000000000..2b2b795d8e2 --- /dev/null +++ b/guides/v2.3/rest/search-endpoint.md @@ -0,0 +1 @@ +../../v2.2/rest/search-endpoint.md \ No newline at end of file diff --git a/guides/v2.3/test/integration/annotations/magento-data-fixture.md b/guides/v2.3/test/integration/annotations/magento-data-fixture.md index 977b7b6b551..5b2322f5bf7 100644 --- a/guides/v2.3/test/integration/annotations/magento-data-fixture.md +++ b/guides/v2.3/test/integration/annotations/magento-data-fixture.md @@ -54,25 +54,13 @@ The ITF includes the declared PHP script to your test and executes it during tes The following example demonstrates a simple implementation of a Cms module page test from the Magento codebase. -Data fixture to test a Cms module page (`dev/tests/integration/testsuite/Magento/Cms/_files/pages.php`): +Data fixture to test a Cms module page: [`dev/tests/integration/testsuite/Magento/Cms/_files/pages.php`][]. -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.3/dev/tests/integration/testsuite/Magento/Cms/_files/pages.php %} -``` - -Test case that uses the above data fixture (`dev/tests/integration/testsuite/Magento/Cms/Block/PageTest.php`): - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.3/dev/tests/integration/testsuite/Magento/Cms/Block/PageTest.php %} -``` +Test case that uses the above data fixture: [`dev/tests/integration/testsuite/Magento/Cms/Block/PageTest.php`][]. ### Fixture as a method -The following is an example of the `testCreatePageWithSameModuleName()` test method that uses data from the `cmsPageWithSystemRouteFixture()` data fixture. - -```php -{% remote_markdown https://raw.githubusercontent.com/magento/magento2/2.3/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php %} -``` +[`dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php`][] demonstrates an example of the `testCreatePageWithSameModuleName()` test method that uses data from the `cmsPageWithSystemRouteFixture()` data fixture. ### Test case and test method scopes @@ -112,3 +100,6 @@ Do not rely on and do not modify an application state from within a fixture, bec [magentoAppIsolation]: magento-app-isolation.html +[`dev/tests/integration/testsuite/Magento/Cms/_files/pages.php`]: {{ site.mage2bloburl }}/2.3/dev/tests/integration/testsuite/Magento/Cms/_files/pages.php +[`dev/tests/integration/testsuite/Magento/Cms/Block/PageTest.php`]: {{ site.mage2bloburl }}/2.3/dev/tests/integration/testsuite/Magento/Cms/Block/PageTest.php +[`dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php`]: {{ site.mage2bloburl }}/2.3/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php \ No newline at end of file diff --git a/rakelib/build.rake b/rakelib/build.rake index aeb2f82236a..740b299524b 100644 --- a/rakelib/build.rake +++ b/rakelib/build.rake @@ -1,7 +1,7 @@ namespace :build do desc 'Build the site for production' - task :prod do + task prod: %w[init] do print 'Building the site for production: $ '.magenta sh 'bin/jekyll', 'build',