I'm not sure where this issue belongs, but this seemed a good place to start.

I'm having a weird problem: On all of my pages, except oddly enough for a couple node types, the content displays, but it is not wrapped in the HTML for the content region or block, breaking the layout. Also, the page title and tabs don't show up.

As far as I can tell using devel, as well as placing drupal_set_message in various template files in my subtheme, Drupal isn't calling the content region or block at all -- even though the main content block is appropriately placed in the content region using the blocks module.

If I place another block in the content region, then the region renders appropriately, and the page title and tabs appear -- although the content itself is not placed in a block as is normal.

Error logs in Drupal and on the server have been no help.

I've set up Omega subthemes before without encountering this issue.

I tried removing all my customizations from the subtheme, but that fixed nothing.

Any ideas?

Edit: This issue does not occur in other themes.

Members fund testing for the Drupal project. Drupal Association Learn more


SpaceGoat1701’s picture

Issue summary: View changes

removed extraneous comma that could have obscured meaning

Hydra’s picture

Souns strange to me. Did you try clearing the cache? Have you overriten the block template somewhere? Any module active wich might could cause this?

SpaceGoat1701’s picture

Actually, I was mistaken about the problem not occurring in other themes on the same site. I compared Bartik on the site I'm having problems with, and Bartik on another site, and the Bartik on the problem site lacked block code the other had around the page content. So it's an issue with all themes on the problem site.

Anyway, I've cleared caches multiple times. I've deleted theme settings using devel variable editor and from the system table multiple times. Nothing has worked.

I've looked over the modules list, and I don't see anything that looks like it could be an issue. All the modules are ones that run fine on other sites.

Is there any diagnostic method or tool that could break down how the pages are being constructed, showing what theme functions and template files are being used, that might help me find the problem?

SpaceGoat1701’s picture

I downloaded the theme developer module -- http://drupal.org/project/devel_themer -- to see if it could help. Here's what it's telling me:

A couple of my content types are working fine. The devel popup window tells me these are the parents of node--essays.tpl.php , which is the template file for one of the appropriately working pages: region.tpl.php < zone.tpl.php < section.tpl.php < page.tpl.php < html.tpl.php . (Those are general template file types; if I click region.tpl.php, I learn the specific file in use is region--content.tpl.php.)

On most of the pages of the site, though, such as the content type that uses node--media.tpl.php (as well as Views pages: views-view.tpl.php), the parents are zone.tpl.php < section.tpl.php < page.tpl.php < html.tpl.php . The region--content.tpl.php file isn't even coming into play.

What devel isn't telling me is why this is happening.

Hydra’s picture

Thats what I was thinking... Very odd.. Without looking into the code, it'll be very hard to help you. You may take a look at #drupal-omega IRC, a lot of good people are around and will help you if they do have time.

SpaceGoat1701’s picture

I tried deactivating all contrib modules, hoping to isolate a problematic one, but even that didn't fix the issue.

I wound up just adding a block to the content region containing


and hiding that with display: none in CSS. That doesn't put the page content in a block, but it does force the content region wrapper to render around the page content.

I don't like this solution, but it works well enough, and I don't have time for now to go into it more.

Hydra’s picture

Status: Active » Closed (cannot reproduce)

Okay, good luck anyway!

joemoraca’s picture

I am having the same problem with the main content area not rendering correctly -- I did the same and used a dummy block and it fixed the problem.... something is odd

Kendall Totten’s picture

I too have this issue I think, I am missing the content-region wrapper div that contains the grid class. I experienced this problem on another site where I was using custom sub-regions and I figured that's what was breaking it, but now I am on a new site with a pretty straightforward layout and it's happening again.

My Omega base theme settings has the content zone set to 24 columns, and only contains one region, the content region which is also 24 columns.
Works fine.

Then I created a Delta template which is on preserve mode, and the only thing I changed was the content region drops to 16 columns and I added in the sidebar first region as 8 columns. On the page with this delta template applied, the content-region wrapper does not render, see screenshot.

I guess perhaps this is a delta issue, but I've also seen it happen on pages not using delta as I mentioned above.

Note, I also just re-exported the theme settings to code and reverted, and cleared the cache, no change.

Kendall Totten’s picture

Status: Closed (cannot reproduce) » Needs review

Wow, well I just found this issue/thread http://drupal.org/node/1239944#comment-5944102
and so I went back to the block page and added the "main content" block back into the content region. Boom, fixed.

I also just tested it by removing the main page content block from the content region on the block page, and applying it to the content region via the same context that is controlling my delta layout and that works too.

Notice though that even if the content block was not being applied before, the content itself was still showing up in the right area, just not with the right wrappers. Kind of odd.

joemoraca’s picture

Well if it confused @starryeyez024 I don't feel so bad ;-)

hkirsman’s picture

#9 didn't work for me. I've tried lot of things. Probably have to start from fresh install.

joelcollinsdc’s picture

aaah. i am having the exact same issue. #1904646: Missing critical page components (page title, content region wrapping, etc), no idea where to begin troubleshooting

(*copied here*)
We have run into a weird issue a few times and I have no idea how to resolve it or where to begin troubleshooting. We created an omega subtheme on our development environment and pushed it up to production. Worked great on dev, but on production, we lose some critical page components:

missing divs

Basically everything after the zone-content div and before the first div contextual-links-region is just missing. All other content on the page is fine.

What could this be? I think it has to be something related to the database since refreshing production over dev causes the issue to appear in dev.

I'm using context so the content block placement on the blocks page should be irrelevant.

joelcollinsdc’s picture

actaully, adding the main page content block into the content region for the sub theme solved this. huzzah!

dnotes’s picture

Okay, I was having the same problem, and adding the main page content block into the content region did NOT help.

Then I checked the block configuration, and I realized that the settings had been changed to ONLY display the block on certain pages instead of all EXCEPT certain pages, and there were no pages specified so of course it was not displaying. New site admins tinkering... lol.

hughey’s picture

I'm having the same problem, but cannot force page titles to load through any listed solutions. In Bartik, everything works perfectly. When I make the switch to the sub-theme (I used the auto-install of a sub-theme using Alpha as the base), page titles are missing. Main content block is set to display on all pages, and nothing has been toggled in any settings areas to cause them to disappear in this sub-theme.

Any other suggestions about what may have gone wrong? It appears to be specific to Omega.

GiorgosK’s picture

temp solution
install http://drupal.org/project/delta
and enable delta_blocks submodule that exposes PAGE TITLE as block
go into blocks and place PAGE TITLE block where you want it to appear

omega though should be able to output the page title without outside help
on omega's defense on another installation page title displays fine without delta, strange bug indeed

GiorgosK’s picture

Status: Needs review » Active

there is no patch to REVIEW

adraskoy’s picture

Having the same problem, and the main content block is not the answer. I set my front page (from a commerce kickstart subtheme) to be a view page. The view div shows up directly below #zone-content. Other pages are fine. If I add any other blocks into the Content region on the front page then it works as expected.

Kendall Totten’s picture

Just a note since this case is still open and it continues to be a problem, follow these steps in order and see if it doesn't help:

  1. Disable all the deltas
  2. Revert the theme settings (using Omega tools)
  3. Clear the cache
  4. Go to the blocks page and be sure the main content block is in the content region
  5. Then enable your deltas again

I'm not sure if a patch is needed, but it seems that its just a glitch that revolves around that main content block not being in the content region, and theme settings becoming "stuck" in a cache-purgatory kind of way. If I were a module developer I'd dig into the code but I hope this at least helps get you un-stuck. :)

adraskoy’s picture

Priority: Normal » Major

In my case, the main content block was never removed from the region. This is definitely a bug, and for a common use case. To duplicate, try this:

Set your front page to a views-generated page. Have no other content on the front page.

adraskoy’s picture

Issue summary: View changes

added more detail

Xigi’s picture

Issue summary: View changes

Still an issue, #20 still breaks things. Workarounds don't seem to work.

lauramunro’s picture

Just ran into this issue on Drupal 7.56 with a freshly installed Omega subtheme using the bleeding edge starterkit. The actual content inside the region was rendering, but without the wrapper div & classes. This was happening on all pages, not just the front page.

When I checked another site I'd built using the same starterkit I found it had the same problem (although it wasn't problematic in that case). I have a suspicion the content region set to render as 'minimal' by default?? There is a region--minimal.tpl.php file in the regions template folder that doesn't have a wrapper div on it.

The only solution that worked for me was to make a copy of the region.tpl.php from the omega base theme, rename it region--content.tpl.php, and put it in the subtheme templates folder. Now the wrapper is there!