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
Regression when x and y each have uncertainties
Number of matrices with bounded products of rows and columns
Why do so many people play out of turn on the last lead?
Are there any OR challenges that are similar to kaggle's competitions?
Are unaudited server logs admissible in a court of law?
C++ Least cost swapping 2
Why should P.I be willing to write strong LOR even if that means losing a undergraduate from his/her lab?
From where do electrons gain kinetic energy through a circuit?
When and which board game was the first to be ever invented?
Is a suspension needed to do wheelies?
A reccomended structured approach to self studying music theory for songwriting
Is it alright to say good afternoon Sirs and Madams in a panel interview?
Designing a prison for a telekinetic race
Programming a recursive formula into Mathematica and find the nth position in the sequence
What does a comma signify in inorganic chemistry?
How to render "have ideas above his station" into German
Reducing contention in thread-safe LruCache
How does the illumination of the sky from the sun compare to that of the moon?
What was the intention with the Commodore 128?
Unsolved Problems due to Lack of Computational Power
What's the relationship betweeen MS-DOS and XENIX?
Trying to understand how Digital Certificates and CA are indeed secure
The Tripan Balance
Vegetarian dishes on Russian trains (European part)
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