amber's blog
Sometimes Stuff is Stuff
So I am upgrading a 4.7.x site to 5.2 and I managed to get everything working great till I tried to create the custom theme. I got the blank Drupal screen of death and the following in the httpd error log as soon as I turned up the new theme ...
Call to undefined function module_exist() in /Library/WebServer/Documents/rms/includes/common.inc(1342) : eval()'d code on line 2
So I go crazy ... I pour over the code in the common.inc, increase the php memory, created the new theme over and over again, and the more I messed with it the worse it got till even the admin area was the white screen of death ... WHOA!
So instead of searching for solutions on drupal.org, I did what I should have done in the beginning... searched for the problem. And lo and behold, this little gem pops up.
I think at least one of your blocks is using this function. Try searching boxes and blocks tables in your database for module_exist. If you can find then replace it with module_exists.
OMG, I hadn't thought to take the error message literally. I thought it was pointing to some esoteric mystery within php. When all along it was simply saying that this function is not defined anywhere.
Seems the function name had changed from version 4.7 to 5.2. And it had been hard coded in to several blocks by a module that was not upgraded to 5.x ... so of course the specialized code missed the change. Wow!
Too funny ... so remember ... sometimes stuff is just stuff!
And ... search drupal.org for the problem first, not your supposed solution.
Garbage in, Garbage Out ... sometimes
I just fixed an annoying bug. And the obviousness of it just bugs me.
I am creating a local sandbox for all my sites, so I can test modifications without having to repeatedly upload to test them over the web.
I at first just copied over the version of software and linked it to a copy of their respective database. This worked swimingly for every site except www.treptower.com.
All of the blocks in the sidebars went missing. I started this process last week, decided to skip this site and came back to it today. I finally figured out that is was a theme issue.
But get this, if it was a bug in the theme, why did it work okay on the server but not on my laptop?
Well because real servers have to be very forgiving. But my laptop OS X web server OTOH had no such pretensions. "If it is a bug, I am damn well gonna treat it like the big ugly hairy bug that it is is. Dammit!" Searching on Drupal revealed no knowledge of the issue UNTIL I figured out where the problem was. And there in the theme project, listed as FIXED was the answer. The block template file had a simple php error in it.
AARRRGGHHH! It took less time to actually fix it then it is taking me to talk about it.
Whenever you are moving around sites, always change to a default theme first. Then log out before copying the database. That way you will know instantly when the problem is theme related.
You will thank me for this later. Truly, you will.
How Much is Enough?
Maybe you are considering getting a web site, maybe you have a domain and need hosting or maybe you need hosting, design and a domain.
Here at Amber Eyes, we can help.
But the first question we usually hear is, "How much space, bandwidth, etc do I need?"
If this is your first web site, and you do not intend to open a storefront on the net -- at least not yet .... just get a blogger site.
Why?
Because unless you suddenly get as popular as Google, you will not generate much traffic initially. And unless you have a storehouse of very large images, you will not need that much storage capacity either. You can always upgrade to a larger site when you need to.
As examples, Connect DC and Katrina's Joy (my most popular sites), together generated less than 15 Mbs bandwidth for all of March. And Blue Moon Studio, my largest site, is using less than 125 Mbs of storage.
So don't worry so much about going for a larger site initially.
Also beware of hosting companies that offer huge storage and bandwidth capacities that you will most likely never use. They also may charge for technical support or will not help you with issues surrounding site design.
Use your best judgement.
Here at Amber Eyes, our primary product is web site design.
File Not Found!
If you ever get File Not Found just after copying a site to a web directory, it is most likely caused by your not copying the .htaccess file. I copied a site to my sandbox and since I could see the home page, I assumed evrything was hunky-dory. That is until I clicked on a link, then whoa! I checked file listing in terminal and yup, the htaccess file was missing.
If you have to use Finder to copy a site and you cannot grab the entire folder, make a note to yourself to remember the .htaccess file.
... just saying ...
