*Drumroll Please*

At long last, we have finally implemented the project we’ve called “Distributed Content Management.” What does this mean? It means that we are finally allowing (very selective) access to the Drupal layer of the site – this is a huge step towards getting a site full of up-to-date, really dynamic content. The site is integrated with LDAP, allowing users to log in with their SJU credentials. Right now we have just one role set up, but are anticipating more in the future (including a very special setup for faculty to edit their own profiles). Also, this update fixed an issue we were having with creating custom aliasing – we were able to replace the Workbench Module with the Revisioning module and the conflict is now gone. Of course, Drupal being Drupal, a couple other things broke along the way, but we’re used to that by now!

 

A quick php reminder

Something so small and silly, but that can break a site. I forgot this last week and ran into some trouble. When you’re writing a module file, never put a closing

?>

tag at the end of the file. My editor did this automatically, and I didn’t run into trouble until later, and I realized what the culprit was. A rookie mistake, but easy to make – and luckily, easy to fix. The issue it was causing was adding a blank link to the top of our xml news feed – which caused errors in reading it. The two seemed unrelated, but that was the fix. Deleted the closing tag, and the feed was fine.

HTML Encoding in Drupal Core Files

Today I was trying to override the html output of the Custom Breadcrumbs module, which put a double right arrow quote, or », in between the breadcrumbs, along with strange spacing. I couldn’t find where in the module this was being output, so I went looking through the core functions, but that’s super tedious. So I thought, “well, let me just search for the double quote and then I can see where this is being output!” So I searched for the html encoding string, which is

 »

Yeah, no relevant results, mostly just jQuery files and a couple of .inc files. But of course, searching for the actual character led me to the theme_breadcrumb function. I overrode the function in template.php, where I was able to wrap the output in a span and add a class so that the spacing would reflect our styles, and change the divider. And now I know. Drupal core doesn’t user html encoding in its files.