13

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 :)

1
  • The answers in this should probably form a community wiki post
    – scrowler
    Commented Feb 2, 2016 at 18:30

8 Answers 8

11

/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!

1
  • 3
    This is not really M2 code. It's require js code, not written by the M2 core team.
    – Marius Mod
    Commented Dec 12, 2016 at 12:02
10

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?

1
  • It means that they are doing only code conversion for M2 for specific module :)
    – Keyur Shah
    Commented Dec 12, 2016 at 12:10
8

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 :)

7

In src/vendor/magento/magento2-base/lib/web/prototype/window.js there is a comment which says // Fucking IE select issue on line 1314.

1
  • 1
    this is not really from Magento. It's prototype.
    – Marius Mod
    Commented Dec 12, 2016 at 11:43
6

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

5

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.

3

I quite like href="#TODO" in magento/theme-frontend-blank/web/js/navigation-menu.js. They're trying to send the user 'todo' it.

1

/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...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .