Tag Archives: bug

Bug in Magento 1.6.1.0/1.6.2.0 affecting development sites using base_url

I installed a copy of Magento 1.6.1.0 on a dev site I setup to do some testing with Varnish with (more on that later). However, in the requirement to be able to get to Magento using 2 different URL’s, I stumbled across this quite annoying bug.

a:5:{i:0;s:67:"Illegal scheme supplied, only alphanumeric characters are permitted";i:1;s:729:"#0 /home/dan/workspace/magento1610/app/code/core/Mage/Core/Model/Store.php(712): Zend_Uri::factory('{{base_url}}')
#1 /home/dan/workspace/magento1610/app/code/core/Mage/Core/Controller/Varien/Front.php(313): Mage_Core_Model_Store->isCurrentlySecure()
#2 /home/dan/workspace/magento1610/app/code/core/Mage/Core/Controller/Varien/Front.php(161): Mage_Core_Controller_Varien_Front->_checkBaseUrl(Object(Mage_Core_Controller_Request_Http))
#3 /home/dan/workspace/magento1610/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#4 /home/dan/workspace/magento1610/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#5 /home/dan/workspace/magento1610/index.php(80): Mage::run('', 'store')
#6 {main}";s:3:"url";s:85:"/index.php/admin/system_config/edit/section/web/key/41c8c3d3f4bcb72e3c267ae0b73333d7/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

Bug reports on Magento’s site here, here, here and here. Not being patient enough for Varien to fix it, I developed a small extension which resolves the problem. It’s available to download below.

Put the tarball in the Magento webroot and extract. After you install this extension, you’ll need to empty the cache manually (if it was enabled). I assume if you’re reading this, then your Magento installation is broken. To do this, simply remove the contents of var/cache in Magento’s webroot.

When you re-visit your Magento’s front or backend, the problem should vanish.

BTS_1610Fix.tar.gz (md5: 8316468f4e179cf2f512edaaf62a12db)

Updated 9th January 2012: It apparent that, attempting to login before applying this update with {{base_url}} set screws up the admin login cookies somehow. When you apply this patch, you’ll probably need to empty out your chosen browser’s cookie jar before attempting to login. You can tell if you need to or not by trying to login, and Magento coming back to you with a login screen, with no failed login message.

Updated 12th January 2012: Magento 1.6.2.0 was released today. I can confirm that this problem still exists and has not yet been fixed (despite what the developers have written on one of the bug reports).

Updated 25th April 2012: I can confirm that this problem has been resolved in the latest 1.7.0.0 version, released 24th April 2012.

Update: Bug in Magento 1.4.1.1 core affecting Catalog Price Rules targetting Customer Groups

I blogged here regarding a bug in Magento’s core affecting Catalog Price Rules under promotions. This would effect, for instance, wholesale pricing. Well, Magento confirmed on the bug report that this was fixed in their new release, 1.4.2.0-RC1. I’ve tested this on my staging server and confirm that this is the case.

Discount away!

Bug in Magento 1.4.1.0/1.4.1.1 affecting the recalling of newsletter templates to send

So I wondered if I could go a whole week without finding another bug/flaw/issue in the latest Magento. I was wrong.

We’re trying to send out a newsletter using the built-in feature. I created a template, then went to queue to send it, and I was like; “So, what’s this ‘message’ field?”. I pondered for a bit, typed a message in, thinking it may have just been for some placeholder in the template somewhere, and hit send. When the newsletter turned up, lo-and-behold, there was just my message, without the rest of the template. WTF? Did it again, thinking I’d screwed something up – same result. Hmm..

Bit of Googling at this point revealed this thread on Magento’s forums. “A bug?”, I thought as I read on. “Couldn’t possibly be!”. </sarcasm>

As the code/class that had the flaw only had one function and extended the Adminhtml_Block_Widget_Form class, I decided to just write a quick extension to replace the class that Magento comes with, with this flaw fixed. I attach to this post my quick extension. Just drop this in the Magento webroot and extract. It’ll put the files in the relevant places, and just start working.

Attached file here: BTS NewsletterFix.tar (md5: df19810f175630fd9206d31e3147c3da)

Bug in Magento 1.4.1.1 core affecting Catalog Price Rules targetting Customer Groups

I came across this issue to begin with using the Wildcardbi_RulePriceAttribute module to be able to specify custom prices for specific customer groups (in this case, wholesale/trade pricing) without having to setup an entire new store view for it.

Continue reading “Bug in Magento 1.4.1.1 core affecting Catalog Price Rules targetting Customer Groups” »