"Murphy was an optimist!"
Magento – Not currently favorite color January 28, 2010 7:54 am
Posted by Doug McCaughan in : Programming, Technology , add a commentWhy is debugging and troubleshooting in Magento so difficult? Because of error messages like this:
Notice: Undefined variable: rootNode in C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Eav\Model\Entity\Attribute\Source\Config.php on line 53
Trace:
#0 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Eav\Model\Entity\Attribute\Source\Config.php(53): mageCoreErrorHandler(8, ‘Undefined varia…’, ‘C:\Domains\exam…’, 53, Array)
#1 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Adminhtml\Block\Widget\Form.php(196): Mage_Eav_Model_Entity_Attribute_Source_Config->getAllOptions(true, true)
#2 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Adminhtml\Block\Customer\Edit\Tab\Account.php(54): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset))
#3 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Adminhtml\Block\Customer\Edit\Tabs.php(58): Mage_Adminhtml_Block_Customer_Edit_Tab_Account->initForm()
#4 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Abstract.php(642): Mage_Adminhtml_Block_Customer_Edit_Tabs->_beforeToHtml()
#5 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Text\List.php(43): Mage_Core_Block_Abstract->toHtml()
#6 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Abstract.php(643): Mage_Core_Block_Text_List->_toHtml()
#7 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Abstract.php(503): Mage_Core_Block_Abstract->toHtml()
#8 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Abstract.php(454): Mage_Core_Block_Abstract->_getChildHtml(‘left’, true)
#9 C:\Domains\example.com\wwwroot\magento\app\design\adminhtml\default\default\template\page.phtml(58): Mage_Core_Block_Abstract->getChildHtml(‘left’)
#10 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Template.php(144): include(‘C:\Domains\leoa…’)
#11 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Template.php(176): Mage_Core_Block_Template->fetchView(‘adminhtml\defau…’)
#12 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Template.php(193): Mage_Core_Block_Template->renderView()
#13 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Adminhtml\Block\Template.php(81): Mage_Core_Block_Template->_toHtml()
#14 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Block\Abstract.php(643): Mage_Adminhtml_Block_Template->_toHtml()
#15 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Model\Layout.php(526): Mage_Core_Block_Abstract->toHtml()
#16 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(347): Mage_Core_Model_Layout->getOutput()
#17 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Adminhtml\controllers\CustomerController.php(117): Mage_Core_Controller_Varien_Action->renderLayout()
#18 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(376): Mage_Adminhtml_CustomerController->editAction()
#19 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch(‘edit’)
#20 C:\Domains\example.com\wwwroot\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#21 C:\Domains\example.com\wwwroot\magento\app\Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch()
#22 C:\Domains\example.com\wwwroot\magento\index.php(65): Mage::run()
#23 {main}
Yes, it screams "undefined variable" which is rootNode but through Magento’s excellent use of object oriented spaghetti, the error does not in anyway reveal what is truly causing rootNode to be undefined nor where to even begin looking.
add a commentIRC Support for Zend Framework is on Freenode January 24, 2010 6:23 am
Posted by Doug McCaughan in : Programming, Technology , add a commentThe unofficial IRC support channel for Zend Framework is on Freenode at #zftalk.
add a commentCurrent Magento Questions – getCustomerFormData January 21, 2010 10:18 pm
Posted by Doug McCaughan in : Programming, Technology , add a commentThe Magento ecommerce question I am trying to answer right now is what does getCustomerFormData() do?
In AccountController.php and Register.php there is this reference $data = $this->_getSession()->getCustomerFormData(true); and this reference $data = new Varien_Object(Mage::getSingleton(‘customer/session’)->getCustomerFormData(true)); respectively. I’ve searched using grep and within eclipse’s file search but can find no other reference to getCustomerFormData.
I can find no reference to getCustomerFormData other than these two lines of code. So what is this supposed to be accomplishing?
add a commentMagento – Developer Killer January 21, 2010 1:09 pm
Posted by Doug McCaughan in : Programming, Technology , add a commentWhile trying to add some functionality to my client’s Magento ecommerce store, I came across an article that summed up my Magento experience quite well:
Most of us in ecommerce application development have already heard of Magento. Some would call it new ecommerce killer app. I myself stand with that statement for many of reasons. However I would like to call it with one more name, developer killer app. This developer killer is what I literally had in mind. Magento is currently one of the most difficult PHP systems out there a developer could learn and master. [Source, {}activecodeline, What makes Magento so hard to learn (emphasis added)]
I have put so much effort into learning this system that I both never want to touch it again AND must do more Magento development so that this exercise of gaining knowledge does not go to waste.
Today’s links for Magento success:
- Netbeans
- Eclipse
- ZendFramework
- MAGENTO_v1.3.2.4—Database_Diagram.pdf by ggoodwin
- ZendFramework Quikstart
Magento References January 19, 2010 9:23 pm
Posted by Doug McCaughan in : Programming, Technology , add a commentRelevant to my life right now:
- Class Mage_Eav_Model_Entity_Setup
- Installing Custom Attributes with Your Module
- Magento Architecture
- ERDs and other diagrams
- database diagrams
- Question about adding selects, radio buttons, and checkboxes to registration form.
- Designing for Magento
- Themeing Magento
- Categories, Products, and Attributes – part 1
- Categories and Attributes in Magento: Part 2
How long have I been on the Internet? January 18, 2010 10:48 am
Posted by Doug McCaughan in : Communications, Daily Life, Technology , 3commentsI’ve been on the Internet so long that I just went to a website that I had never heard of and tried to create an account only to discover I already had an account. So either my memory is worse than I thought or I’ve consumed so much of The Internet that I can now see the whole thing again and enjoy as if I was seeing it for the first time!
3commentsMagento Actions January 17, 2010 11:26 am
Posted by Doug McCaughan in : Programming, Technology , 2commentsThe Magento E-commerce system is an exciting open source alternative to systems like OS Commerce. The learning curve isn’t really a curve at all. The learning curve is more like a sheer, glassy. polished mountain face shooting straight up into the heavens. However, plenty of documentation exists, Google overfloweth with links to blog post, and IRC support is available on Freenode #magento (although I believe most questions go to /dev/null so expect to feel a little like you are talking to yourself but like your $200/hr psychologist will explain, sometimes that’s all we need).
As I work through understanding how Magento handles layouts, I struggle to find a simple list of actions and perhaps I’m trying to hard. So far the is this:
- addJs
- addCss
- addLink
- addItemRender
- unsetChild
- setHeaderTitle
- setTemplate
Ah! I found a reference! See page 7 of Magento Layout Files Reference (see also same document, different format).
Update: The Magento wiki has this defined under Designing for Magento.
2commentsToday’s Magento Ecommerce Quotes January 14, 2010 3:53 pm
Posted by Doug McCaughan in : Programming, Technology , add a commentRead here:
I’ve been wrestling with Magento for the last month or so and I’m still trying to figure it out.
add a commentThe general architecture is so mind-numbingly complex, that even if I completely understood it, I’d need to write a book to cover it.
A round tuit and a “new” laptop December 28, 2009 7:09 am
Posted by Doug McCaughan in : Gadgets, Technology , add a commentA good friend passed me their old laptop with an operating system that was broken. Doing that thing I do, I installed a new operating system and am pleased that the laptop easily meets my needs as far as processor and memory are concerned. I debated dual booting the machine so that I could work in either Linux or Windows XP but decided to try my hand with a virtual machine (VirtualBox). In this case, Ubuntu Linux is going to be installed in a VM within Windows XP which should allow me to take my development environment with me anywhere I go.
add a commentWordPress 2.9 has arrived December 19, 2009 8:46 am
Posted by Doug McCaughan in : Announcements, Blog, Of Interest, Publishing, Software, Technology, WordPress , add a commentWordPress 2.9 includes built-in image editing and now videos can be embedded simply by putting the url of the video on its own line in the post with Oembed support and more. Update your WordPress blog soon.
[Source]
add a commentUltimate Unsubscribe Page December 18, 2009 1:35 pm
Posted by Doug McCaughan in : Communications, Programming, Technology , add a comment add a commentMaximum length of an email address is 254 characters, not 320 December 16, 2009 5:07 pm
Posted by Doug McCaughan in : Communications, Programming, Technology , add a commentI work in a business of constant learning. Technology is continually evolving and being revised. Somethings are rather constant but, being human, weI tend to develop habits occasionally rooted in wrong assumptions. Perhaps a deadline forced a decision without having time to look up the specification and over time, our mind took that unresearched decision as fact. I’ve made numerous databases over the years based upon just such a wrong assumption. My error has been in the acceptable maximum length of an email address. My number is irrelevant but I am in good company with being incorrect on the length of an email address as many people mistakenly believe it to be 320 characters.
An RFC is a request for comments which "is a memorandum published by the Internet Engineering Task Force (IETF) describing methods, behaviors, research, or innovations applicable to the working of the Internet and Internet-connected systems." (Wikipedia) RFCs set the standards that define how the Internet works. RFC3696 and RFC5321 explain that the maximum length of an email address is 254 characters.
There appears to be some confusion over the maximum valid email address size. Most people believe it to be 320 characters (64 characters for the username + 255 characters for the domain + 1 character for the @ symbol). Other sources suggest 129 (64 + 1 + 64) or 384 (128+1+255, assuming the username doubles in length in the future).
This confusion means you should heed the ‘robustness principle’ ("developers should carefully write software that adheres closely to extant RFCs but accept and parse input from peers that might not be consistent with those RFCs." – Wikipedia) when writing software that deals with email addresses. Furthermore, some software may be crippled by naive assumptions, e.g. thinking that 50 characters is adequate (examples). Your 200 character email address may be technically valid but that will not help you if most websites or applications reject it.
The actual maximum email length is currently 254 characters:
"The original version of RFC 3696 did indeed say 320 was the maximum length, but John Klensin (ICANN) subsequently accepted this was wrong."
"This arises from the simple arithmetic of maximum length of a domain (255 characters) + maximum length of a mailbox (64 characters) + the @ symbol = 320 characters. Wrong. This canard is actually documented in the original version of RFC3696. It was corrected in the errata. There’s actually a restriction from RFC5321 on the path element of an SMTP transaction of 256 characters. But this includes angled brackets around the email address, so the maximum length of an email address is 254 characters." – Dominic Sayers
Every day I learn something new! (even when I should have known it for a couple of decades)
add a commentWe used to call it The Internet…now it’s just Google December 15, 2009 9:24 am
Posted by Doug McCaughan in : Communications, Daily Life, Technology , 3commentsWe’ve been living in the Wild West of The Internet. The Internet used to mean Gopher, Veronica, Archie, Usenet, MUDs, IRC (Fall ‘88), and telnet, none of which used a graphical interface. Everything was done from the command line, UNIX’s equivalent of the DOS prompt. Today my children, as most people, live on a tamer Internet and feel that The Internet is something you look at with Internet Explorer, Firefox or Safari. Chrome users know better. In the past, using a search engine did not mean using Google. Google. How about that Google? Google is doing so well that we have started to aggregate all our services into Google. I know I have. I use GMail, Google Voice, Google Wave, Google Docs, Google Calendar, Google Reader, and so on. All my data is slowly finding its way to a single company, one which I don’t control. That should scare the pants off of us!
In today’s world of collaboration and information sharing, url shorteners are all the rage. A URL shortener takes a long web address and shortens it to as few characters as possible for sending in SMS messages or making the address easier for someone to type. Bit.ly is the forerunner having secured the default url shortener position with Twitter and Seesmic. 3.ly is my favorite. Despite being essential tools, Dave Winer makes a good argument for why these URL shorteners are bad for the Internet and offers a fix to their inherent problem. The concept of a URL shortener is simple. You could make your own URL shortening service and WordPress users could make a URL shortener plugin. If you made your own, you’d be in control of your data; a principle I highly encourage despite housing so much of myself in The Cloud.
Today, Google enters the URL shortening scene with http://goo.gl/ Expect this to take off. Expect some struggling shortening services to close doors causing waves of link rot across the Internet. As Google consumes another popular activity, url shortening, do we take one more step to losing The Internet to The Google in the way that online activity prior to The Internet used to be known as CompuServe, Prodigy and AOL? In 5 years, will there still be An Internet or will we simply connect to The Google?
Google URL Shortener at goo.gl is a service that takes long URLs and squeezes them into fewer characters to make a link that is easier to share, tweet, or email to friends. The core goals of this service are:
- Stability – ensuring that the service has very good uptime
- Security – protecting users from malware and phishing pages
- Speed – fast resolution of short URLs
Google URL Shortener is currently available for Google products and not for broader consumer use.
The Google privacy policy applies to the Google URL Shortener. Please note that Google may choose to publicly display aggregate and non-personally identifiable statistics about particular shortened links, such as the number of end user clicks.
Update: Interestingly enough, yesterday, Bit.ly announced Bit.ly Pro, a service to use Bit.ly’s software but with your own domain name. Take note, this is still giving your data to a 3rd party (The Cloud) but it is a proven service, with a system with very interesting feedback (statistics), and probably far more scalable than something you could build from scratch. Dave Winer revisits his concerns with Bit.ly in Build to Flip?.
3commentsToday’s Social Media Revelation December 10, 2009 12:04 pm
Posted by Doug McCaughan in : Communications, Privacy, Technology, Touchy Subjects , add a commentLast night LinkedIn became Facebook and Facebook tried again to become Twitter: Facebook’s New Privacy Changes: The Good, The Bad, and The Ugly
add a commentThere is a cure for Windows dependency December 4, 2009 7:24 pm
Posted by Doug McCaughan in : Software, Technology , 5commentsMy computer experience looks a little like this: Atari 2600 -> Atari 400 -> Timex Sinclair -> Commodore 64 -> DOS boxes -> Apple ][ -> Apple ][e -> Apple //c -> Macintosh Classic -> Solaris workstations, AS 400, Next Box, CM5, VAX, ramdom flavors of Unix machines -> Mac Performas (etc), PCs (Windows 3.1, 3.11, 97, 98, 98se, Windows 2000 server, XP, Vista, 2003 (blah blah name it) -> Linux (Ubuntu primarily). In the end I find myself surrounded with PCs with loads of Microsoft software. So everything I write is dependent upon the Microsoft Office suite, software I install requires Windows and so on. Granted, I have Linux development servers because much of my work is in a LAMP environment. That is until my primary machine died horribly and while I was recovering it, I was forced to spend most of my time on my Ubuntu workstation.
After working for a couple of weeks on Ubuntu and relying heavily upon Google Docs, I learned that I love cloud computing. Cloud computing is using applications that are primarily accessed over the Internet. Twenty years or more ago, Bill Gates said this is how all our computing would be and that PCs would revert to being dummy terminals. The nice thing about cloud computing is your data is accessible anytime, anywhere, from any machine, as long as you have an Internet connection; this is also the bad thing. Your data is exposed to 3rd party companies that may go out of business or change ownership or malicious people may find ways to expose your data to the world. You must weight the risk versus the benefits.
Another option is open source software. Many alternative software directories are ready to help you find a free alternative to the commercial software you love. My favorite is osalt.com. For example, search Photoshop, osalt points to GIMP. I’ve been using Quickbooks Pro since 1999 (actually earlier but 1999 was my most current version). So for 10 years, I have used financial software that was out of date. I cannot find the discs and desperately need a new solution. Many exist! including buying the current version of Quickbooks. A search of osalt found PostBooks which is free although some people are confused by their commercial offerings. Don’t be quick to discount open source software just because of the price. Free does not mean bad. For instance, I now favor GIMP over Photoshop in some instances. Soon I may wonder why I ever used Quickbooks.
Do you have any experience with Postbooks? Your thoughts?
See also GNU Cash h/t Jonathan Hickman of traveling at godspeed.
5comments



