Magento2 already release its stable release. Can anyone share the Random facts Or Funny facts of Magento2 ? Same like this link Or this link.
Now its time to Magento2 :)
/vendor/magento/magento2-base/lib/web/requirejs/text.js
Line 311 - //Why Java, why is this so awkward?
Line 369 - //XPCOM, you so crazy
Line 56 - //Would love to dump the ActiveX crap in here. Need IE 6 to die first.
Line 353 - //Avert your gaze!
This one takes the cake in my opinion: Magento\Backend\Block\Widget\Breadcrumbs::_beforeToHtml()
protected function _beforeToHtml()
{
// TODO - Moved to Beta 2, no breadcrumbs displaying in Beta 1
// $this->assign('links', $this->_links);
return parent::_beforeToHtml();
}
What's so funny about it is that the same thing exists in M1. So this is not about the beta 2 of M2. It's about beta2 of M1.
The other things below are just bonus:
In lib/web/css/docs/index.html
background-color: @nav__background-color; // ToDo UI: todo inline comment
In Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php
// TODO why use ObjectManager?
I wonder the same. Why?
src/vendor/magento/module-customer/view/frontend/web/js/zxcvbn.js
line 343
fuckyou, fuckme, fucker, fuckoff, fucking, fuckit, fuckyou2, fucked, fuckyou1, fuck_inside, fuckface, assfuck, fuckers, fuckthis
Seriously how many of us keep such passwords :)
In src/vendor/magento/magento2-base/lib/web/prototype/window.js
there is a comment which says // Fucking IE select issue
on line 1314
.
src/vendor/magento/magento2-base/lib/web/prototype/window.js
on line 1770
// Why?? Ask IE
and on line 860
// Check for this stupid IE that sends dumb events
setup/src/Magento/Setup/Module/Di/Code/Reader/FileScanner.php
has 29 goto
-statements. And that's not the only place in Magento that has goto
-statements.
I quite like href="#TODO"
in magento/theme-frontend-blank/web/js/navigation-menu.js
. They're trying to send the user 'todo' it.
/vendor/magento/module-backup/Model/ResourceModel/Helper.php
line 112
//TODO fix me
$sql = 'SHOW CREATE TABLE ' . $quotedTableName;
$data = $this->getConnection()->fetchRow($sql);
$script .= isset($data['Create Table']) ? $data['Create Table'] . ";\n" : '';
or this
/vendor/magento/module-configurable-import-export/Model/Import/Product/Type/Configurable.php
line 651
// @todo understand why do we need this condition
if ($this->_getSuperAttributeId($linkId, $attrParams['id'])) {
$productSuperAttrId = $this->_getSuperAttributeId($linkId, $attrParams['id']);
} elseif (isset($this->_superAttributesData['attributes'][$linkId][$attrParams['id']])) {
$attributes = $this->_superAttributesData['attributes'];
$productSuperAttrId = $attributes[$linkId][$attrParams['id']]['product_super_attribute_id'];
$this->_collectSuperDataLabels($data, $productSuperAttrId, $linkId, $variationLabels);
} else {
$productSuperAttrId = $this->_getNextAttrId();
$this->_collectSuperDataLabels($data, $productSuperAttrId, $linkId, $variationLabels);
}
It was a little shock after hours of investigation...