• Error 500 on Drupal 7 upgrade

    While upgrading this blog to Drupal 7 following the UPGRADE.txt, I encountered an error 500 on the update.php?op=info page.

    Assuming it was an error caused by the .htaccess file I renamed it: no changes. Eventually I dived into the update.php code only to find on the line 340:

    ini_set('display_errors', FALSE);

    This just hides everything from output on error and provide an error 500 page. So unless you log your php errors in a file, you may not see what is going on. I don't know why Dries chose to do this (he seems to act like Steve Jobs these days wink ) but this is not funny and cost me an hour to figure it out...

    Just comment this line or put TRUE instead of FALSE and there you go, you know exactly what is the issue. For me it was the token module that was defining duplicate functions with the same name, this is easily resolve with a "drush sqlc"and:

    UPDATE system SET status = 0 WHERE name = 'token' AND type = 'module';

    This can also be done with PhpMyAdmin.

    Good luck upgrading from Drupal 6 to Drupal 7!

  • Install Drupal book on Coda

    If like me, you are on a Mac and develop under Coda (software that I recommend by the way), here is a little tip that will surely help you. As you may have noticed, Coda has an integrated documentation of PHP language, but this one is offline. OK, it's cool, but we, Drupal developers would prefer to have API under the hook... wink

    Wish exauced ! laugh

    How to ? How to :

    • Open Coda if not already > Click on Books in display modes toobar
    • Click on the bottom left "+"
    • The fill in the form 

    Book title: Drupal 6 API
    Book URL: http://drupalcontrib.org/
    Use for Mode: PHP-HTML
    Search URL: http://drupalcontrib.org/api/search/6/*

    and for the Cover image I found this one pretty:

    Now where it gets interesting, it's that you can use a hotkey to open directly your book on a function: Command key icon + double click. Furthermore, you can search on external sites which provide documentation for third-party modules, like drupalcontrib.

    This tip is possible for others languages and frameworks, like jQuery :

    URL: http://docs.jquery.com/Main_Page
    Search URL: http://docs.jquery.com/Special:Search?ns0=1&search=*&go=

    Add yours in comments ! 

    Source

  • Bartik : a new face for drupal

    Drupal 7 alpha 6 is now out, and the issue queue has never been so thin (under 40 issues cheeky), and it shows some surprises, as the new default theme : Bartik

    It will replace the theme used after installation... So bad for this old Garland after four years of good services! blush His successor, named after one of the first programmers, worked on the ENIAC, Jean Bartik. Its goal is to bring a fresh and new image to the next release of Drupal. Its design is modern, clean and flexible and is well appreciated with the new administration theme : Seven.

     

    A new feature that Garland did not have is that it supports full right-to-left wiriting (RTL), it means that blocks will be also moved when RTL is active. Other themes were also in competition to be part of the new Drupal core : Corolla (demo) and Busy (demo), but Bartik's team must have made a better work smiley.

    This new theme is part of refresh process of the community websites, a new look is on the way: a theme named Blue Cheeze. New versions can now be seen for some of them like localize.drupal.org and association.drupal.org, others like api.drupal.org and the main website are in test phase. Note that the main website will show a new dashboard, customizable, replacing links to followed issues queues and other blocks in the sidebar.

    What do you think of this? In my opinion, I hope that all these little news will bring a new image of Drupal and grow the community bigger!

  • Drupal Gardens

    It has been months since I received my invitation to Drupal Gardens' beta. This service provided by Acquia, offers a Drupal 7 hosting.

     

    Drupal as a service

    Foremost, this service is a complete hosting plaform, with the ability to manage multiple sites, backuo, restore and export any of your sites.  Each site will be given an address like mysite.drupalgardens.com, as Wordpress already does to offer free blogging service.
    This way we can call it "Drupal as a service".

    Theme builder

    Acqui focused its  development of its preinstalled distribution to be the most intuitive. Users can change their site's design in seconds, they can load and edit theme with live demonstration then save or cancel modifications. Almost all modifications will showed directly in the browser as this is handeld by AJaX.

    A litte administration area manage this feature:

    7 default themes are given, and foreach the ability to change color palette (links, titles, lists, ...), logo and favicon, structure (number and width of columns), font, borders and margins, background. And if it is not enough customizable , you can even put you own CSS code!

    When all fit your needs, save and/or apply your new personal theme.

    Administration

    This one is managed by a menu on top looking like the admin module. Preferences are displayed and modified by AJaX popups giving and fluidity and ergonomy to the admin part, thanks to Drupal 7.

    Conclusion

    Acquia provides a solution viable to the manual installation of Drupal, defivitely useful for little blogs or quick sites (for an event for example). At the end of the beta we should see options to stay free, with ads and some limitations, non-free options will be likely to appear offering more disk space and ressources.
     

    Click here to sign up.

  • Hidden Devel functions

    What more frustrating than not knowing what is going on when a drupal page is loading? angry There are often redirection pages containing errors we can't see.
    When developing a module or building a theme, it would be useful to know what content there is in some variables.

    So what does drupal offer for this? A drupal_set_message('<pre>'.print_r($variable, true).'</pre>');? Isn't this a bit too long? indecision

    Well, the Devel module, specifically designed to make the development of module and drupal administration easier, bring up some awesome functions:

    1
    
    dsm($input, $name = NULL);

    alias of drupal_set_message, put the input variable in a dropdown style with the Krumo library
    $input:
    your variable or your text
    $name: (optional) prefix of the message (e.g. : dsm('my content', 'my variable'); will display "my variable => my content")

    1
    
    dpm($input, $name = NULL);

    alias of dsm()

    1
    
    dvm($input, $name = NULL);

    same as dsm() but using var_dump() (e.g. : dvm('my content'); will display "string(10) "my content")

    1
    
    dpr($input, $return = FALSE, $name = NULL);

    display the print_r() of your argument at the beginning of the page or store it  in a variable (useful if the message section is not displayed in any region of the theme)
    $return: if TRUE, print_r() of the input will be returned

    1
    
    kpr($input, $return = FALSE, $name = NULL);

    same as dpr() but will display with Krumo library 
     

    1
    
    dvr($input, $return = FALSE, $name = NULL);

    same as dpr() but using var_dump()

    And others not concerning variable display :

    1
    
    dargs($always = TRUE);

    display arguments passed to the current function
    $always: if FALSE, will only display once

    1
    
    db_queryd($query);

    display the complete SQL query and the error in the browser (useful to know what arguments are passed to the query)

    1
    
    dfb($arg, ...);

    display arguments in the Firebug console if FirePHP is installed

    All these useful functions are hardly documented, so if you find others: share it ! wink

  • Blog install

    Welcome on this new blog !

    I'll talk about all, but mostly about development and my virtual life because yes, there's a life after life ! smiley

    Maybe you know it, but I'm specialized in Drupal. For a year and a half now I use it. So I'll use this blog to share my experience, my tips and my snippets.

    Let's begin by the beginning : this blog. Yeah, it is Drupal-powered cool ! Drupal 6 to be precise, and here is the modules I've installed to run it :

    Or more simply with drush :

    drush dl ajax admin_menu addthis ckeditor comment_notify pathauto token geshifilter captcha google_analytics jgrowl fivestar votingapi

    drush en ajax admin_menu addthis ckeditor comment_notify pathauto token geshifilter captcha google_analytics jgrowl fivestar votingapi

    I also enabled some core modules :

    • Blog
    • Comment
    • Contact
    • Content Translation
    • Database logging
    • Poll
    • Taxonomy
    • Search
    • Upload

    I choosed BlogBuzz by Astin for the theming part, it offers several regions and 3 color sets.

    Tags: 

Pages

Subscribe to Le blog de SebCorbin RSS