Skip to content

Instantly share code, notes, and snippets.

View piotrekkaminski's full-sized avatar

Piotr Kaminski piotrekkaminski

View GitHub Profile
FAQ:
We want to run the tests on a custom website. The tests assume main website called Main Website and do not work. Is there a way to provide custom name without changing the tests?
This is an error in the tests. Instead of Main Website it should be main_website and it will select the default website. This patch will be included in next MTF release.
https://gist.github.com/piotrekkaminski/df0b6f570aa410a3c7f6
I get errors in Mage\Adminhtml\Test\TestCase\CreateWebsiteEntityTest. How can I fix it?
diff --git a/app/code/core/Mage/Cms/Block/Block.php b/app/code/core/Mage/Cms/Block/Block.php
index bc81de3..a0dce44 100755
--- a/app/code/core/Mage/Cms/Block/Block.php
+++ b/app/code/core/Mage/Cms/Block/Block.php
@@ -72,4 +72,24 @@ protected function _toHtml()
}
return $html;
}
+
+ /**
[Technical Debt] Remove cachestatus.json implementation from GeneratedFiles after a stable number of releases.
In scope of MAGETWO-52000 we introduced .cachestatus.json file to disable/clean and enable caches during web upgrade. This is redundant, since starting 2.1 there are jobs to do these tasks, but previous versions did not have this ability. Hence once 2.1 is fairly well established, this change can be reverted.
Where MAGETWO-5200 is:
[Github][PR]impossible to see what is wrong with cron - unhelpful error message - Github #3189
@piotrekkaminski
piotrekkaminski / mperf-7817.patch
Created March 3, 2017 16:16
MPERF-7817: First static block cached is always shown
From 58721d4cfd3ac47617af97f2670b54398f3e886f Mon Sep 17 00:00:00 2001
From: Mykola Palamar <mpalamar@ebay.com>
Date: Fri, 10 Jul 2015 19:30:25 +0300
Subject: [PATCH] Fixed MPERF-7464: CMS static block loads content of another
block saved to blocks HTML output cache
---
app/code/core/Mage/Cms/Block/Block.php | 20 ++++++++++++++++++++
app/code/core/Mage/Cms/Block/Widget/Block.php | 16 ++++++++++++++++
2 files changed, 36 insertions(+)
@piotrekkaminski
piotrekkaminski / docker_beta.md
Last active April 10, 2017 23:56
Docker Beta Installation Info & FAQ
@piotrekkaminski
piotrekkaminski / PATCH_SUPEE-4814_EE_1.14.1.0_v1.sh
Created April 17, 2015 14:36
PATCH_SUPEE-4814_EE_1.14.1.0_v1.sh
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
@piotrekkaminski
piotrekkaminski / gist:14f49b6ddcb69640d697
Created April 6, 2015 21:41
MPERF-7015: Session Cookies not stored for shop on root (2nd level) domain
diff --git a/app/code/core/Mage/Core/Model/Session/Abstract.php b/app/code/core/Mage/Core/Model/Session/Abstract.php
index 4d2bf60..c580932 100644
--- a/app/code/core/Mage/Core/Model/Session/Abstract.php
+++ b/app/code/core/Mage/Core/Model/Session/Abstract.php
@@ -566,14 +566,24 @@ public function renewSession()
{
$this->getCookie()->delete($this->getSessionName());
$this->regenerateSessionId();
+ $this->_deleteCookiesForSameParentDomain();
@piotrekkaminski
piotrekkaminski / PR38.patch
Last active December 1, 2017 20:59
PR38 - Jan14 hackathon
From 3fdfd8454165c89d002da943e79d7aff9c1f560d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jose=CC=81=20Manuel=20Marti=CC=81nez=20Garci=CC=81a?=
<jose@theagilemonkeys.com>
Date: Thu, 20 Feb 2014 00:05:06 +0000
Subject: [PATCH] The fields taxvat and email have been added to
shoppingCartCustomerEntity and shoppingCartCustomerAddressEntity
respectively, inside SOAP API files for Checkout
---
app/code/core/Mage/Checkout/etc/wsdl.xml | 2 ++
#!/bin/bash
docker-compose exec --user magento2 web bash -c "cd /var/www/magento2 ; $*"
@piotrekkaminski
piotrekkaminski / invalid_session_fix.patch
Created March 14, 2018 17:08
Revert guest checkout account registration problem introduced by patch SUPEE-10570. Note: this does not protect against security issues related to session lifetime.
diff --git a/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php b/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
index 59b3ea8..35155f1 100644
--- a/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
+++ b/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
@@ -485,7 +485,7 @@ class Mage_Core_Model_Session_Abstract_Varien extends Varien_Object
&& isset($validatorData[self::VALIDATOR_PASSWORD_CREATE_TIMESTAMP])
&& isset($sessionData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP])
&& $validatorData[self::VALIDATOR_PASSWORD_CREATE_TIMESTAMP]
- > $sessionData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP] - $this->getCookie()->getLifetime()
+ > $sessionData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP]