Magento 2 : Face Error while create a custom blockIn block getModel error?Magento 2.1 Create a filter in the product grid by new attributeAlthough I use the correct namespace a wrong instance is passed to the constructorMagento after upgrading to 2.2 issue coming while editing productadmin grid not workingMagento offline custom Payment method with drop down listMagento 2.3 Can't view module's front end page output?Magento 2 Fatal error when adding date field in admin form and saveMagento 2.3 email attachment not working while sending custom emailOverride framework file vendor/magento/framework/View/Element/Html/Link/Current.php
Polar contour plot in Mathematica?
Why should P.I be willing to write strong LOR even if that means losing a undergraduate from his/her lab?
Replacing old plug-in 220V range with new hardwire 3-wire electric cooktop: remove outlet or add a plug?
Reducing contention in thread-safe LruCache
Can I submit a paper computer science conference using an alias if using my real name can cause legal trouble in my original country
Do predators tend to have vertical slit pupils versus horizontal for prey animals?
Has there ever been a truly bilingual country prior to the contemporary period?
How could Tony Stark wield the Infinity Nano Gauntlet - at all?
What should I do with the stock I own if I anticipate there will be a recession?
Eric Andre had a dream
What's the point of writing that I know will never be used or read?
Have made several mistakes during the course of my PhD. Can't help but feel resentment. Can I get some advice about how to move forward?
Quick destruction of a helium filled airship?
Will some rockets really collapse under their own weight?
Programming a recursive formula into Mathematica and find the nth position in the sequence
Why do aircraft leave cruising altitude long before landing just to circle?
Number of matrices with bounded products of rows and columns
Meaning and structure of headline "Hair it is: A List of ..."
The anatomy of an organic infrared generator
Photoshop older default brushes
What was the intention with the Commodore 128?
global variant of csname…endcsname
Why can't I see 1861 / 1871 census entries on Freecen website when I can see them on Ancestry website?
What is the purpose/function of this power inductor in parallel?
Magento 2 : Face Error while create a custom block
In block getModel error?Magento 2.1 Create a filter in the product grid by new attributeAlthough I use the correct namespace a wrong instance is passed to the constructorMagento after upgrading to 2.2 issue coming while editing productadmin grid not workingMagento offline custom Payment method with drop down listMagento 2.3 Can't view module's front end page output?Magento 2 Fatal error when adding date field in admin form and saveMagento 2.3 email attachment not working while sending custom emailOverride framework file vendor/magento/framework/View/Element/Html/Link/Current.php
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I got the below error when create the Custom Block for the HTML sitemap.
Error filtering template: Warning: Declaration of
VaporSitemapBlockSitemapCategory::_getHtml(MagentoFrameworkDataTreeNode
$menuTree, $childrenWrapClass, $limit, $colBrakes = Array) should be
compatible with
MagentoThemeBlockHtmlTopmenu::_getHtml(MagentoFrameworkDataTreeNode
$menuTree, $childrenWrapClass, $limit, array $colBrakes = Array) in
C:xampphtdocsMagentoappcodeVaporSitemapBlockSitemapCategory.php
on line 62
Block Code
<?php
namespace VaporSitemapBlockSitemap;
// use MagentoFrameworkViewElementTemplateContext;
use MagentoFrameworkViewElementTemplate;
// use VaporSitemapModelSitemapCmsPages;
// use VaporSitemapBlockSitemapCms;
// use VaporSitemapBlockSitemapCategory;
class Index extends Template
const SITEMAP_CUSTOM_TEMPLATE = 'Vapor_Sitemap::sitemap/sitemap.phtml';
/**
* [__construct]
* @param MagentoFrameworkViewElementTemplateContext $context
* @param MagentoFrameworkStdlibDateTimeTimezone $_stdTimezone [description]
* @param array $data
*/
protected $getSitemap;
public function __construct(MagentoFrameworkViewElementTemplateContext $context,MagentoFrameworkStdlibDateTimeTimezone $_stdTimezone,
array $data = [])
parent::__construct($context, $data);
$this->getSitemap();
/**
*
* @return html
*/
protected function _toHtml()
return parent::_toHtml();
/**
* @return Mixed data
*/
public function getSitemap()
//echo "ComeHere";exit;
$this->setTemplate(self::SITEMAP_CUSTOM_TEMPLATE);
return $this;
Can anyone help to solve this.
Any help would be appreciated.
Thanks in advance..!
magento2 cms-block custom-block
add a comment |
I got the below error when create the Custom Block for the HTML sitemap.
Error filtering template: Warning: Declaration of
VaporSitemapBlockSitemapCategory::_getHtml(MagentoFrameworkDataTreeNode
$menuTree, $childrenWrapClass, $limit, $colBrakes = Array) should be
compatible with
MagentoThemeBlockHtmlTopmenu::_getHtml(MagentoFrameworkDataTreeNode
$menuTree, $childrenWrapClass, $limit, array $colBrakes = Array) in
C:xampphtdocsMagentoappcodeVaporSitemapBlockSitemapCategory.php
on line 62
Block Code
<?php
namespace VaporSitemapBlockSitemap;
// use MagentoFrameworkViewElementTemplateContext;
use MagentoFrameworkViewElementTemplate;
// use VaporSitemapModelSitemapCmsPages;
// use VaporSitemapBlockSitemapCms;
// use VaporSitemapBlockSitemapCategory;
class Index extends Template
const SITEMAP_CUSTOM_TEMPLATE = 'Vapor_Sitemap::sitemap/sitemap.phtml';
/**
* [__construct]
* @param MagentoFrameworkViewElementTemplateContext $context
* @param MagentoFrameworkStdlibDateTimeTimezone $_stdTimezone [description]
* @param array $data
*/
protected $getSitemap;
public function __construct(MagentoFrameworkViewElementTemplateContext $context,MagentoFrameworkStdlibDateTimeTimezone $_stdTimezone,
array $data = [])
parent::__construct($context, $data);
$this->getSitemap();
/**
*
* @return html
*/
protected function _toHtml()
return parent::_toHtml();
/**
* @return Mixed data
*/
public function getSitemap()
//echo "ComeHere";exit;
$this->setTemplate(self::SITEMAP_CUSTOM_TEMPLATE);
return $this;
Can anyone help to solve this.
Any help would be appreciated.
Thanks in advance..!
magento2 cms-block custom-block
share your block file code..such that it will be easy to debug
– aravind
Aug 6 at 6:59
@aravind Updated the Question.
– AKM
Aug 6 at 7:02
add a comment |
I got the below error when create the Custom Block for the HTML sitemap.
Error filtering template: Warning: Declaration of
VaporSitemapBlockSitemapCategory::_getHtml(MagentoFrameworkDataTreeNode
$menuTree, $childrenWrapClass, $limit, $colBrakes = Array) should be
compatible with
MagentoThemeBlockHtmlTopmenu::_getHtml(MagentoFrameworkDataTreeNode
$menuTree, $childrenWrapClass, $limit, array $colBrakes = Array) in
C:xampphtdocsMagentoappcodeVaporSitemapBlockSitemapCategory.php
on line 62
Block Code
<?php
namespace VaporSitemapBlockSitemap;
// use MagentoFrameworkViewElementTemplateContext;
use MagentoFrameworkViewElementTemplate;
// use VaporSitemapModelSitemapCmsPages;
// use VaporSitemapBlockSitemapCms;
// use VaporSitemapBlockSitemapCategory;
class Index extends Template
const SITEMAP_CUSTOM_TEMPLATE = 'Vapor_Sitemap::sitemap/sitemap.phtml';
/**
* [__construct]
* @param MagentoFrameworkViewElementTemplateContext $context
* @param MagentoFrameworkStdlibDateTimeTimezone $_stdTimezone [description]
* @param array $data
*/
protected $getSitemap;
public function __construct(MagentoFrameworkViewElementTemplateContext $context,MagentoFrameworkStdlibDateTimeTimezone $_stdTimezone,
array $data = [])
parent::__construct($context, $data);
$this->getSitemap();
/**
*
* @return html
*/
protected function _toHtml()
return parent::_toHtml();
/**
* @return Mixed data
*/
public function getSitemap()
//echo "ComeHere";exit;
$this->setTemplate(self::SITEMAP_CUSTOM_TEMPLATE);
return $this;
Can anyone help to solve this.
Any help would be appreciated.
Thanks in advance..!
magento2 cms-block custom-block
I got the below error when create the Custom Block for the HTML sitemap.
Error filtering template: Warning: Declaration of
VaporSitemapBlockSitemapCategory::_getHtml(MagentoFrameworkDataTreeNode
$menuTree, $childrenWrapClass, $limit, $colBrakes = Array) should be
compatible with
MagentoThemeBlockHtmlTopmenu::_getHtml(MagentoFrameworkDataTreeNode
$menuTree, $childrenWrapClass, $limit, array $colBrakes = Array) in
C:xampphtdocsMagentoappcodeVaporSitemapBlockSitemapCategory.php
on line 62
Block Code
<?php
namespace VaporSitemapBlockSitemap;
// use MagentoFrameworkViewElementTemplateContext;
use MagentoFrameworkViewElementTemplate;
// use VaporSitemapModelSitemapCmsPages;
// use VaporSitemapBlockSitemapCms;
// use VaporSitemapBlockSitemapCategory;
class Index extends Template
const SITEMAP_CUSTOM_TEMPLATE = 'Vapor_Sitemap::sitemap/sitemap.phtml';
/**
* [__construct]
* @param MagentoFrameworkViewElementTemplateContext $context
* @param MagentoFrameworkStdlibDateTimeTimezone $_stdTimezone [description]
* @param array $data
*/
protected $getSitemap;
public function __construct(MagentoFrameworkViewElementTemplateContext $context,MagentoFrameworkStdlibDateTimeTimezone $_stdTimezone,
array $data = [])
parent::__construct($context, $data);
$this->getSitemap();
/**
*
* @return html
*/
protected function _toHtml()
return parent::_toHtml();
/**
* @return Mixed data
*/
public function getSitemap()
//echo "ComeHere";exit;
$this->setTemplate(self::SITEMAP_CUSTOM_TEMPLATE);
return $this;
Can anyone help to solve this.
Any help would be appreciated.
Thanks in advance..!
magento2 cms-block custom-block
magento2 cms-block custom-block
edited Aug 6 at 12:55
moni patel
237 bronze badges
237 bronze badges
asked Aug 6 at 6:48
AKMAKM
14 bronze badges
14 bronze badges
share your block file code..such that it will be easy to debug
– aravind
Aug 6 at 6:59
@aravind Updated the Question.
– AKM
Aug 6 at 7:02
add a comment |
share your block file code..such that it will be easy to debug
– aravind
Aug 6 at 6:59
@aravind Updated the Question.
– AKM
Aug 6 at 7:02
share your block file code..such that it will be easy to debug
– aravind
Aug 6 at 6:59
share your block file code..such that it will be easy to debug
– aravind
Aug 6 at 6:59
@aravind Updated the Question.
– AKM
Aug 6 at 7:02
@aravind Updated the Question.
– AKM
Aug 6 at 7:02
add a comment |
1 Answer
1
active
oldest
votes
make your _getHtml
method from the class VaporSitemapBlockSitemapCategory
look like this:
protected function _getHtml(
MagentoFrameworkDataTreeNode $menuTree,
$childrenWrapClass,
$limit,
array $colBrakes = []
)
.....
you are missing a type hint array
on the last parameter
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284521%2fmagento-2-face-error-while-create-a-custom-block%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
make your _getHtml
method from the class VaporSitemapBlockSitemapCategory
look like this:
protected function _getHtml(
MagentoFrameworkDataTreeNode $menuTree,
$childrenWrapClass,
$limit,
array $colBrakes = []
)
.....
you are missing a type hint array
on the last parameter
add a comment |
make your _getHtml
method from the class VaporSitemapBlockSitemapCategory
look like this:
protected function _getHtml(
MagentoFrameworkDataTreeNode $menuTree,
$childrenWrapClass,
$limit,
array $colBrakes = []
)
.....
you are missing a type hint array
on the last parameter
add a comment |
make your _getHtml
method from the class VaporSitemapBlockSitemapCategory
look like this:
protected function _getHtml(
MagentoFrameworkDataTreeNode $menuTree,
$childrenWrapClass,
$limit,
array $colBrakes = []
)
.....
you are missing a type hint array
on the last parameter
make your _getHtml
method from the class VaporSitemapBlockSitemapCategory
look like this:
protected function _getHtml(
MagentoFrameworkDataTreeNode $menuTree,
$childrenWrapClass,
$limit,
array $colBrakes = []
)
.....
you are missing a type hint array
on the last parameter
answered Aug 6 at 7:03
Marius♦Marius
172k30 gold badges333 silver badges708 bronze badges
172k30 gold badges333 silver badges708 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284521%2fmagento-2-face-error-while-create-a-custom-block%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
share your block file code..such that it will be easy to debug
– aravind
Aug 6 at 6:59
@aravind Updated the Question.
– AKM
Aug 6 at 7:02