0

I have a local build of Drupal 7 with Xampp on windows. When I add a field to a node's content type, I see the field appear last, no matter what order I put the field in Content types > [myType] > Manage fields. I would tend to think this is a cache problem... but I've tried Configuration > Performance > Clear all caches, and the order of the fields does not update.

For example, I currently have an image field, a display title field, and a body field. In the Manage Fields lightbox, the order of the fields is:

  1. Image
  2. Display Title (New field, I'm not using the default title because Drupal always places is above the image instead of after)
  3. Body

However, on the page the order is

  1. Image
  2. Body
  3. Display Title

This is not just a trick caused by funky CSS—the PHP is actually creating the HTML in the wrong order.

I'm guessing that Drupal updates when you add a new field (which appears last by default when created). It does not update when fields are repositioned in Manage Fields, leaving the title last on the page, although it's second in Manage Fields.

And yes, I did save the configuration after repositioning the fields in Manage Fields. I've also cleared the browser cache, and restarted the browser.

How can I get Drupal to display the fields in the order they appear in Manage Fields?


P.S. I also downloaded Drush to see if it could clear the cache. The Drush command line works, but none of the tutorials I found actually explain how to hook Drush up to a local install, only how to SSH into remote server... I typed in 'drush cc' my drupal folder, but I don't know if Drush actually did anything since I don't know how to make drush connect to my localhost.

ansorensen
  • 1,276
  • 1
  • 14
  • 29

1 Answers1

0

Not a complete answer, but 'Manage Display' does not, in fact, Manage the Display. It manages the order of the fields when editing a content type, but does not influence the order in which they are displayed.

So, I was looking at it again (figuring I would have to edit into printing individual fields in the content)... and I was looking at the Devel tab (Developer module), and clicked 'render.' Some how that fixed / updated the page, and the title jumped from the bottom to above the body text.

Still not sure exactly what controls the order that fields display in... Maybe I'm a complete n00b, but if the info's out there, it's hard to find.

ansorensen
  • 1,276
  • 1
  • 14
  • 29
  • You know, sometimes it's a caching issues -- if this was fixed randomly without you changing anything, it may have been that you needed to clear your Drupal cache. ;=) – Boriana Ditcheva Sep 19 '12 at 13:10
  • What killed me during Drupal dev is that I cleared both the Drupal cache and the browser cache, and then would see the change about a day later... If it's a Drupal caching issue, then either clearing the cache does not consistently work, or it is really, really slow. – ansorensen Oct 15 '12 at 16:55