9

I keep getting, "This version is not compatible with Drupal 7.x and should be replaced." error. Could you please look at the content of my .info file and tell me what is wrong with it:

name = jeanb
description = sub-theme based on Bartik.
base theme = bartik
engine = phptemplate

stylesheets[all][] = css/jeanb.css

regions[header] = Header
regions[help] = Help
regions[page_top] = Page top
regions[page_bottom] = Page bottom
regions[highlighted] = Highlighted

regions[featured] = Featured
regions[content] = Content
regions[sidebar_first] = Sidebar first
regions[sidebar_second] = Sidebar second

regions[triptych_first] = Triptych first
regions[triptych_middle] = Triptych middle
regions[triptych_last] = Triptych last

regions[footer_firstcolumn] = Footer first column
regions[footer_secondcolumn] = Footer second column
regions[footer_thirdcolumn] = Footer third column
regions[footer_fourthcolumn] = Footer fourth column
regions[footer] = Footer

settings[shortcut_module_link] = 0


; Information added by drupal.org packaging script on 2013-04-03 
version = "7.22" 
project = "drupal" 
datestamp = "1365027012"

Thank you!

  • I was about to down vote due to lacking research, but realized, to my surprise, that googling for the error doesn't actually give helpful answers. +1. – Letharion Jun 13 '13 at 17:39
  • Yep, that's true. And also, I am new to this and I post questions only after having exhausted all other resources (like google-ing, as you mentioned and similar)...So, thanks! – Davit Magaldadze Jun 13 '13 at 17:53
  • I was just surprised, I would assume such a basic question would have an answer already, but actually the answers I did find were completely wrong. – Letharion Jun 13 '13 at 18:59
  • 1
    Yea, agreed. In one of the Drupal forums a guy had the same question and they managed to solve the problem by adding: regions[content] = Content part. But this was obviously not the issue in my case. Although Clive gave a correct answer below, I am still confused as the book (on Drupal Themes) clearly said to "delete the lines for package, version, and core." from the .info file. – Davit Magaldadze Jun 13 '13 at 19:05
  • David, where did you see that text? It's definitely wrong, and should be fixed. (And as you've noticed, Clive's answer is correct) – Letharion Jun 13 '13 at 19:08
14

As per Writing theme .info files, core is a required key. You just need to add

core = 7.x

to make your theme compatible with Drupal 7.

  • It worked. This did it for me. I was fooled by the book "Drupal 7 Themes (Published May 2011, page 116, step 3)" which had told me to delete that line when creating a sub theme. Now, I believe you Clive, not the book. I believe you. :) – JW. Aug 30 '16 at 9:10
7

You have to include this:

regions[content] = Content

This is new in Drupal 7, now content is a block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.