Bug in Magento 1.6.1.0/1.6.2.0 affecting development sites using base_url
by Dan on Nov.14, 2011, under Magento, PHP
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).
51 Comments for this entry
4 Trackbacks / Pingbacks for this entry
-
Magento: There has been an error processing your request « Iloo
December 6th, 2011 on 3:45 pm[...] información en http://www.danneh.org/2011/11/bug-magento-1-6-1-0-affecting-development-sites-base_url/. [...]
-
Magento 1.6.1.0 "Illegal scheme supplied, only alphanumeric characters are permitted" | Programming tutorials
December 10th, 2011 on 7:18 am[...] more at http://www.danneh.org/2011/11/bug-magento-1-6-1-0-affecting-development-sites-base_url/#ixzz1g770BtR… Posted by [SLC]Calin at [...]
-
bug 1.6.1 Magento changement URL.. « Eric Kranich
January 4th, 2012 on 2:11 pm[...] plus d’info ttp://www.danneh.org/2011/11/bug-magento-1-6-1-0-affecting-development-sites-base_url/ [...]
-
Steelnet Webdesign » Blog Archive » Viva Magento Sandbox
February 17th, 2012 on 1:27 pm[...] http://www.danneh.org/2011/11/bug-magento-1-6-1-0-affecting-development-sites-base_url/#ixzz1md4i7Cd... Let me know if the link breaks and I will add in a local URL to get to the article and the downloadable patch. *{margin:0; padding:0;} #socialbuttonnav li{background:none;overflow:hidden;width:65px; height:80px; line-height:30px; margin-right:2px; float:left; text-align:center;} #fb { text-align:center;border:none; } [...]
February 13th, 2012 on 2:27 pm
It did it for me. And now for the next bug to solve…