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

The scope is not taken into account and is always 0 (Default Config) when content of the CMS Block includes config variables #671

Closed
@TomashKhamlai

Description

@TomashKhamlai

Preconditions (*)

  1. In the General/Store Email Addresses inside of the General Contact section Sender Name for the Default Config is set to Owner and "Use Website" is checked
  2. In the General/Store Email Addresses inside of the General Contact section Sender Email for the Default Config is set to [email protected] and "Use Website" is checked
  3. In the General/General inside of the Store Information section Store Name for the Default Config is empty.

Steps to reproduce (*)

  1. Change the scope to the "Default Store View"
  2. Uncheck "Use default" and set value to "Owner Def" for Sender Name
  3. Uncheck "Use default" and set value to "[email protected]" for Sender Email
  4. Uncheck "Use default" and set value to "Default Store View" in Store Name
  5. Create CMS Block with identifier "custom" on Default Store View and put this content inside
<h1>Hi, Default</h1>
<p>Contact Person: {{config path="trans_email/ident_general/name"}}</p>
<p>Email: {{config path="trans_email/ident_general/email"}}</p>
<p>Store Name: {{config path="general/store_information/name"}}</p>
  1. Execute:
query {
  storeConfig {
    id
    website_id
  }
  cmsBlocks(
    identifiers: "custom"
    scope_code: "default"
  ) {
    items {
      content
    }
  }
}

Expected result (*)

  1. Data:
{
  "data": {
    "storeConfig": {
      "id": 5,
      "website_id": 1
    },
    "cmsBlocks": {
      "items": [
        {
          "content": "<h1>Hi, Default</h1>\r\n<p>Contact Person: Owner Def</p>\r\n<p>Email: [email protected]</p>\r\n<p>Store Name: Default Store View</p>"
        }
      ]
    }
  }
}

Actual result (*)

  1. Data:
{
  "data": {
    "storeConfig": {
      "id": 5,
      "website_id": 1
    },
    "cmsBlocks": {
      "items": [
        {
          "content": "<h1>Hi, Default</h1>\r\n<p>Contact Person: Owner</p>\r\n<p>Email: [email protected]</p>\r\n<p>Store Name: </p>"
        }
      ]
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions