September 2011

Moving to Drupal 7

I'm in the middle of upgrading/converting my pet project website in Drupal 6 to Drupal 7. This was my first Drupal website, so in hindsight I found out I made a lot of mistakes.

So, after the release of Drupal 7 I tried it on this website and found some very nice features such as an integrated 'admin menu bar' at the top, updating modules through the interface rather than downloading, untarring and ftp-ing every module by hand. I got really fond of drush when I found it.

Drupal 7, IMCE and FileFields

As written in my previous post I decided to move the Origami Society website to Drupal 7.

One of the key features I need is a section for members only. At first I implemented this in Drupal 6 by using a single Page node protected by the Content Access module. All files were referenced as links on this page and put in a separate, private directory.

Or so I thought.

Drupal 7, IMCE, Media and public and private files

Today I decided to tackle the problem of needing public and private files. Again.

At the first attempt I switched the default download method  in admin/config/media/file-system from 'public' to 'private'. From that moment on, no picture was visible any more. After many hours of digging around, I gave up and switched the download method back to public.

Later I found that all pictures needed to be referenced in the database with a 'public://' or a 'private://' prefix.

With the move from IMCEImage to FileField, this was fixed.

IMCE, FileField Sources, private and public files

The issue still isn't solved. So today I made another attempt. Things shouldn't be that complicated. All I want is create nodes with images and links to other files that can be visible for anonymous users or users of a special role. And I want to use IMCE as the file browser.

But now I'm running in circles: with admin/config/media/file-system set to 'public local files served by webserver' IMCE works as expected and finds and inserts the files for public access. But the private section is off limits.