When something doesn't work as expected
Book element
Clear caches.
Check permissions.
Clear caches.
Check permissions.
How to set up API module locally.
What's the best online use of API module for third-party modules to link to?
(or the earlier http://api.lullabot.com ?)
Would there be any reason to host our own?
Drupal 7 would like you to provide all content meant for display to the user as renderable arrays (which allows changes from other parts of Drupal and potentially smart caching). It does, however, accept a plain string, and outputs that directly, and indeed Drupal core often does this.
To mix simple strings with proper render arrays, simply use '#markup' => $raw_html; for your string
(thanks to davereid and chx in IRC for pointing this out)
If your server can work with Clean URLs, Drupal configures itself to use them during a normal install. If it doesn't though, you'll have to make these changes on the server and then make this configuration change manually.
Drupal 7 much improves the classes added to the div surrounding form items (in Drupal 6 it was hard-coded to 'form-item'). The type of form element and the form element name are now added as form-item-type and form-item-name. You can see how Drupal does this (and see the theme function you would override to change this) at api.drupal.org/theme_form_element.
http://definitivedrupal.org/admin/structure/types/add
Give it a name, Resource. The machine name is just fine as it is, resource. Give it a description, A reference page or other resource for the Definitive Guide to Drupal 7. Connects to a book chapter.
Set the default publishing options to published and create new revision.
There's no reason to have any menus available on Menu settings, we'll be making links to these resources from their respective chapters.
Action links are new to Drupal 7. An $action_links variable is added to page template. They're local tasks that perform actions, rather than take you to listing pages. Rather than being rendered as tabs by default, they are rendered as links directly below the help (if any) for that page.
They are a new "interaction pattern" that is very cool. "If you're on the content overview page, there's a good chance you want to add new content."
See chapter {ux} for more.
Chx tip via Chad Phillips (hunmonk) at DrupalCon Boston 2008 (updated to Drupal 7).
Make your own test scripts.
Require the first three lines of index.php, and you have a fully bootstrapped Drupal.
Make a file called test.php or anything you like and keep that in the same folder as index.php.
Here is an example that prints out all the configuration information available to Drupal:
Learn Vi/Vim in any case, because if you need to edit something on someone's server, vim will be there.
Comment notify lets your site visitors – signed-in and anonymous – ask to receive e-mail notifications about subsequent comments while they are leaving a comment themselves.
This module has been suggested to and used by Dries, and is being considered for inclusion in Drupal core. That's always a good sign.
Download and install:
Command line steps
drush dl comment_notify
drush en comment_notify
Comment notify requires the core Token module, which, if it has not been enabled, we will be prompted to enable.
http://drupal.org/project/globalredirect
drush dl globalredirect
Global redirect makes sure that when people visit a page on your site, they see your latest beautiful alias, not the Drupalish internal path or your second-to-last alias.
For instance, even if someone links to node/23 directly, they will be redirected to the aliased version, point/official-release-drupal-2-0
(Go to the module's project page for a 7 step description.)
Note: Forms are made to look how they are at two layers, the Forms API and the theme layer.
[Words below are mostly Everett's verbatim]
Drupal 7 provides a #title_display property that can be used with any form element that supports the #title property. The #title_display property tells the form system how to render #title
The Drupal community likes to brag about the thousands of contributed modules, but there's a little secret that should be publicly and widely stated: If you install 1,000 modules on your site, your doing it so wrong you'll probably need a complete Drupalectomy.
Look at the code.
Read the tests.
The community wrote the code because they love you. They wrote the documentation to prove it.
It's all right to google first. It may be a good idea to pick a standard practice, code first or web search first.
When making a link in HTML, you want to start it with a / to denote that the path is relative to the root of the site. This way, a link to the contact page at /contact works whether we are on the home page or on a deeply/nested/page.
When putting an internal link for a menu item or anywhere else in Drupal, however, we leave off the starting slash and it is provided for us.
Introductions to Drupal are mostly all about enabling modules to unleash new functionality, but it can be good to know when to let it go and disable a module instead.
It is best not to ask a question in IRC unless we know we can be in there for the next hour at least. For one, responses and help and working it out from various people may take that long. Even if the answer is two words of brilliance, our unknown savior with just the right knowledge may only check into IRC an hour or more after we post, and answer then. It's dispiriting to our would-be helpers and rude of us to no longer be in the room when they check in, and many people read the backscroll of their IRC sessions every once in a while, rather than monitor it constantly.
When something in Drupal does not seem right, the first step is to clear caches. The Clear cache button lives on the Performance page. In the absence of development-helping modules such as admin_menu or devel that can provide one-click access to clearing the cache, we can add the Performance page to our Shortcuts bar for easy-access to the cache-clearing button. This is a solution right in Drupal core slightly easier than memorizing the path admin/config/development/performance.
Vim for windows can be installed as part of Cygwin or standalone, http://www.vim.org/download.php#pc. A graphical version for Mac is available, http://code.google.com/p/macvim/. For Linux, graphical vim (gvim) is available through our operating system's package manager, such as Ubuntu's Software Center.
I’ve seen companies second guess whether they should release code back to the community because something they’ve created had been used by a competing company or even on a competing product. I’ve seen companies contributing code that contained spyware which has caused uproars and splitting of loyalties within the community. I’ve seen developers lose their jobs because the corporation they worked for did not understand the typical Drupal developer’s need to give back to the community.