Drupal 7, Views 3.

I want to display the description for a node in a view. There is a field on my node called 'Description' machine name of 'body'. To display it in my view, I add the 'Content: Body' as a field to my view.

It turns out that this loads _all_ fields into memory. This is an issue for me as I have one very large field (which I do not want to load) whose loading causes PHP to run out of memory and crash.

Is it possible to load only the Description/Body field in Views without loading all other fields at the same time?

Comments

sprite’s picture

An important matter that needs to be addressed with your question, is that you shouldn't even consider trying to run Drupal on a system not configured to provide ample memory. Your php.ini should be set for at least 128MB and possible far more.

Regarding the views aspect of your question, when building/designing a view, you can specify specific fields when building a view, rather than the entire node. Once you specific you want to build the view with fields, the UI presents options for those specifics fields, and a variety of other "entity" related details which can be displayed in the field output.

Dig into the options, there are gazillions of them.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

scishop’s picture

Thanks for the reply!

I understand that I should be able to selectively select what fields are loaded and I have been using the functionality. However, the Gotcha is that the 'body' field turns out to load _ALL_ the fields (in the contrast to the expected behavior and the behavior for any other field). I want to be able to only load the actual 'body' field, and I can't find any way to actually do that.

Here is a long thread on it for Drupal 5 . I don't know how to apply the changes to drupal 7 though.

On the size point, I completely agree. However, my 'large' field can be about 4 MB in size. If i have a view that lists up to 24 items that can lead to (24*4) 96 MB of data being pulled in memory. Whether or not I have the memory on my server to store that, I really don't want to be pulling that into memory and processing it when it unnecessary.