I wrote up a tool that uses PEAR’s xml serializer to convert product objects into XML and save it as a file. My other supplement stores read the file and insert or update the products as necessary. I ran into problem after problem with the error “Invalid character at XML input” and then some line and character number was included, which usually pointed at nothing or white space in the file. I tried putting everything in cdata and that didn’t solve the issue. I implemented iconv to strip out all non UTF-8 characters on a couple fields like the product description, which may contain any number of crap characters. This worked for those fields and lead to the solution of either applying iconv to every text field that could possibly have a special character or apply it to the whole XML doc as a variable before it’s written. The code below did the trick.
MS Word 2007 has a ton of options and is pretty cool, but sometimes it’s just a pain in the ass because it has so many options. I make a lot of bulleted lists to organize data. For the past week or so MS Word 2007 hasn’t been indenting the next bullet line below the previous bullet when I hit the tab key. I don’t know why… I probably clicked too fast one day and “POOF” it didn’t work anymore! I’ve done this a few times before, like with the paragraph settings. Anyway, here’s how to fix this issue.
1. Click the circularly looking office icon in the upper left corner of MS Word 2007 and then select “Word Options”.
2. Select “Proofing” on the left menu and then select “AutoCorrect Options” on the right.
3. Select the “AutoFormat As You Type” tab and check the “Set left and first indent with tabs and backspaces” checkbox.
This past weekend myself, four other coworkers from VISI, and 5 friends (10 total) participated as the “Code Cowboys” at the 24 hour website challenge sponsored by Sierra Bravo and VISI. Last year was the first year of the event and this year was the first time myself and everybody on my team participated. We were paired up with a non profit to build a website for that morning and got started two minutes later. The event was well organized as all non profits had must have, would like to have, and pie in the sky requirements all typed up with ten copies. Documentation to their existing FTP site was also ready to go.
The Code Cowboys were paired with Access Press, a news publication for the disabled in the Twin Cities. The representatives from Access Press were present for 90% of the event, which demonstrated how important a new website was to them. Here is a link to how their site looked on archive.org before we started. Apparently the site has undergone many beginner designs and most recently a few years ago.
Our team was well balanced as we had a project manager, a designer, and eight coders. I started the evening splitting the management role and task delegation with another guy on the team, but after a couple hours it was evident there was more demand for coding skills than my management skills. Because Access Press is a newspaper and desires to create publications almost daily, WordPress was the “almost undisputed” choice as I think we discussed options for a minute. Customizations included a phpbb bulletin board, an events calendar that registered users and enter events and moderators can manage, threaded commenting, article voting like digg.com, integration with a payment gateway for donations via credit card, classified advertising and job postings, a custom search that will search articles and events, custom role management, and many static pages about the non profit. A major feature we wre unsuccessful in was importing their thousands of existing articles into the new website. The existing articles arrived in many different formats and file types. We planned on using PHP to parse the date, author, and article text from each file, but unfortunately that did not work out as the articles were not written in a consistent format.
Time went by quickly for most of the 24 hours as we kept very busy. Personally, I sipped on some caffeinated drinks whenever I felt tired and did pretty well. Derek Fernholz drank somewhere between nine and twelve red bulls to stay awake. There were about 160 people packed in that room for 24hrs and it started to smell ripe after 12 hours or so. My wife said I really stunk afterwards … yeah, it was kinda warm in there. Our team in particular lost power three times, which cost me personally 45 minutes because my dell computer is ass slow to boot. I suppose that’s what happens when your team has a rack server, ten pc’s, five laptop’s, and 16 monitors, and one 20 inch box fan.
Below are links to news coverage of the event and our team.
I experienced a problem just after my Magento install where the page would simply redirect back to the login without displaying an error message. I’d login using the user credentials I just created during the install and I also tried using the default user “admin” with password “123123″ . The trick was that I was installing on localhost and for some reason a cookie was not being set for the session. I have other sites requiring a cookie on localhost, but Magento seems to have a problem with it.
The solution is to add the following line to your hosts file so you can access your localhost as www.localhost.com.
C:Windows\System32\drivers\etc\hosts (edit this file in notepad)
127.0.0.1 magento.localhost.com www.localhost.com
Also worth mentioning, if you need to reset a password manually in the database use the following:
UPDATE admin_user SET password=MD5(‘mypassword’)WHERE username=‘admin’;
If none of the above works, install the browser Opera and use it. Opera seems to work out of the box whereas IE, Firefox, and Google Chrome do not.
I was paying MInnesota the sales taxes I collected on my business for 2008. I’ve always been of the opinion that government websites suck and are notoriously difficult to navigate. Today I found proof of where they’re at… about ten to twelve years behind the times. First, I had to use Internet Exploder as somehow they wrote javascript form validation that works in IE and not in Firefox. Then the kicker – the screenshot below says it all with their “new feature” in red print.
In case I have to spell it out, this is a “forgot password” link and form.