Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: cannot handle widgets properly #12

Merged
merged 3 commits into from
Sep 23, 2020
Merged

Conversation

GrassH
Copy link
Contributor

@GrassH GrassH commented Sep 16, 2020

When a widget is inserted in the blog content, for example: Products, we will receive an "Invalid template file" error.

"version": "2.0.4"
Query:

query blogPost {
  blogPost(id: "13") {
    filtered_content
  }
}

Result:

{
  "data": {
    "blogPost": {
      "filtered_content": "Error filtering template: Invalid template file: 'Magento_CatalogWidget::product/widget/content/grid.phtml' in module: 'Magento_CatalogWidget' block's name: 'product\\productslist_0'"
    }
  }
}

@ihorvansach
Copy link
Contributor

@GrassH , thank you for your contribution. Could you please provide some notes why you added this additional commit
1b29bf8
with
$themeId = $this->scopeConfig->getValue(
'design/theme/theme_id',
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
);
$theme = $this->themeProvider->getThemeById($themeId);
$this->design->setDesignTheme($theme, Area::AREA_FRONTEND);

@GrassH
Copy link
Contributor Author

GrassH commented Sep 23, 2020

@ihorvansach, when there is a custom theme, in the original code, the template file (.phtml) of the widget cannot be rewritten, and the default template will always be used.

@magefan magefan merged commit 420463c into magefan:master Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants