Tagged: web browser Toggle Comment Threads | Keyboard Shortcuts

  • Joe 15:14 on November 23, 2007 Permalink
    Tags: admin tool, Cloning, drupal, drupal site, similar tool, simplest solution, staged web site, sysadmin, visual tool, web browser,   

    Cloning a drupal site 

    Drupal Clone

    Just a quick hack and reminder for myself…

    Situation: you developed a nice website with drupal on one of your local boxes and you want to clone this literally to a new staging host.This can be as simple as using ftp (all of your drupal source files, including modified themes, extra modules and uploaded files).

    Then use phpMyAdmin or a similar tool to dump and restore the corresponding drupal database.

    Now you fire up your web browser, and there is that disappointment: you see just an empty, white page, not even single error message!

    Luckily, the solution is rather simple: use your admin tool to entirely clean (truncate) the cache_menu table from your cloned database. Maybe you should truncate the other cache tables as well, that won’t hurt in any case.

    The next reload will show you the staged web site in all its glory!

    Another small catch to be aware of: if you’re using “Clean URLs” and are depending on a .htaccess file, this might not get copied by FTP if you’re using a visual tool (e.g. Cyberduck for Mac OS-X).

    In that case, the simplest solution may be to create a new .htaccess file remotely (in Cyberduck: right click and choose “new file” from the context menu). Now edit this file over ftp (Cyberduck: right click on file and choose “edit in => TextWrangler” – or similar). Just copy and paste the contents of your local .htaccess file, save and you’re ready to go.


    • Dorax 12:40 on December 3, 2007 Permalink

      truncate menu_cache. Excellent tip! You saved my day!

  • Joe 14:26 on June 27, 2006 Permalink
    Tags: , , , , , web browser, web server, , XMLHttpRequest   

    XMLHttpRequest and character encoding 

    The XMLHttpRequest transport method retrieves content over http, just like a regular http request from a web browser does.

    There are two result variants:
    The responseXml field holds a parsed DOM tree if the retrieved source was well formed XML
    The responseText field holds the raw source, a Javascript string basically.

    With current Firefox versions (1.5.x) this responseText string is always forced into UTF-8, regardless of the charset encoding sent by the originating web server. Thus valid ISO-8859-1 characters end up as illegible garbage in resulting Javascript string.
    This can be a problem for instance with Greasemonkey scripts targeted at a server, which uses something other than UTF-8 as encoding format.
    (More …)

  • Joe 22:15 on April 4, 2006 Permalink
    Tags: , , web browser, ,   

    April 5th: CSS Naked Day 

    Tomorrow, April 5th, is acclaimed Annual CSS Naked Day by Webdeveloper Dustin Diaz of Yahoo!

    Funny to see all those nicely designed websites start to look like the old days of HTML 1.0 and the Mosaic web browser.

    Strange that most of us need to do our utmost best to live up to this challenge, to make our well designed sites look at least reasonable without any style applied. For me, it is good to experience that following web standards pays off, even in this weird challenge.

    In my case I already had positioned my navigation and other non-content stuff absolutely. Now I had a good reason to move this below the page content in the HTML source.
    Not only makes this the CSS Naked look neat (relatively spoken), but it also benefits the loading time before the actual content is readable, with CSS applied.

    I just replaced my CSS stylesheet by an empty one to accommodate the Aussies’ time zone.
    Take a look for yourself and experience the clean look of what the web was like, some 15 years ago…

    By tomorrow night all will be back to normal (with slightly improved loading time!).

    BTW, there’s some leftovers of in-line style, e.g. for the relative size of links in my tag cloud.

    For Firefox, the inline styles can be overridden with this simple Javascript function:

    <script type="text/javascript">
    window.onload = function() {
    	var l = document.getElementsByTagName('*');
    	for (var i in l) {
    		try {
    			if (l[i].style.cssText) l[i].style.cssText = "";
    		} catch (e) { }


    • Untested on MSIE/Windows.
    • This trick does not work for Safari/OS-X.

    Update: made resetting style conditional:
    if (l[i].style.cssText) l[i].style.cssText = "";

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc

Twitter links powered by Tweet This v1.8.3, a WordPress plugin for Twitter.