I am new to working with Drupal and am hoping someone can help me with this problem I'm having.
I've been trying to learn my way around Drupal for a few months now and find that I really like it and decided to go with Drupal over the CMS systems out there. The majority of my clients come to me for design mostly, so Theme development is what I'm trying to get a handle on right now. If I can provide to my clients a Drupal driven CMS with a look they expect from me, everyone will be happy! Right now I'm not so happy.
I have upgraded recently to Drupal core 6.19. The upgrade went smoothly and everything works just fine. In fact, I can modify any theme from Drupal's core themes, even custom themes, with no problem and get them to do what I want. The problems begin when I try to create my own theme from scratch with my own .info and .tpl.php files. I've read through all the documentation on the site and have purchased and read through the "Pro Drupal Development" book hoping to find something that I've missed, but have had no luck.
I should be able to create my own directory within sites > all > themes > custom > whatever and with a whatever.info file and whatever.tpl.php I should be able to see my custom theme listed in the themes when I clear the cache. All I ever get is the message "This version is incompatible with the 6.19 version of Drupal core." In fact, I can make a copy of any Drupal core theme, move it to my custom directory, change the folder name and it shows up in the themes. But change the .info file data, it will render the theme "incompatible".
Maybe I'm missing something, but I've tried everything and am at a total loss. Has anyone else run into this problem? Does anyone have any suggestions?
Comments
Hi there - You might consider
Hi there - You might consider starting with Zen theme. It has really good documentation on how to make your own custom subtheme. It's stripped down, but also has a lot of useful things that you might use built into it already. It's definitely a better way to start than from scratch.
Here's the link:
http://drupal.org/project/zen
As for what you are experiencing, are you sure that you aren't missing anything critical from your .info file?
http://drupal.org/node/171205
There's one little weird thing I experienced before where my text editor has appended a -- perhaps invisible -- .txt on the end of the .info file and Drupal ceases to acknowledge it as a valid .info file. You might check to see if that is happening.
tried all of these suggestions before posting
I've tried several theme just to experiment and troubleshoot, all with the same results. Basically, any theme will work just fine no matter what changes I make to it, unless I change the info in the .info file. I can alter the name of the .info file, but not the contents. If I create my own .info file from scratch, I get the same "incompatible..." issue. For some reason, the 6.79 core will not recognize any newly created or edited .info file.
Anyone have any thoughts on that?
The .info files are correct. I've even used core theme .info files and just modified the folder names and .info file names and the theme will load. If I change ANY part of the .info file contents, such as the description (which is optional and not even necessary), it will no longer show up as a valid theme. Not only will it give me the "incompatible" message, but if I actually activate the theme, it will run but none of it's styling works properly. It won't locate the theme's styles.css file.
I don't get it.
This is the first time I've attempted to build a site not hand coded myself so this is all new to me. I really want to learn and make this work.
Thanks everyone for the suggestions.
...
In your custom theme's folder, do you have...
mythme.info
page.tpl.php
style.css
Those are the minimum files for a theme.
Make sure your .info file doesn't specify a specific Drupal version.
~silverwing
I followed the instructions
I do have the minimum required files. I've also copied simple core themes like Bluemarine and changed the names. All works fine until I make a change to the contents of the .info file; any change, even to optional content, will kill it.
...
I'm sure you looked through the documentation - http://drupal.org/node/171205
You can also post your .info file for us to review.
Following my comments is an
Following my comments is an example of what one of my experimental test .info files looks like, and it's just called "simplepixl.info". It was for experimental purposes only so I just used the required declarations plus a couple of optional elements to see what would get it working. It didn't work.
And yes, I've read all the documentation on the Drupal site, including the link you posted (but thank you for posting that anyway, BTW), and I have big, thick book on Drupal that I've been studying and pulling samples from for some time now. I can get anything else to work, have had no trouble tweaking any of the other files: just .info.
See my response to another comment below about permissions (I get the feeling that permissions on one or more of the folders, or some setting I'm unaware of, may be the culprit).
Here's the contents of the .info file (one of them):
name = PPXL Test
description = just trying to get something to work.
core = 6.x
engine = phptemplate
regions[header] = Header
regions[right] = Right sidebar
regions[content] = Content
regions[footer] = Footer
stylesheets[all][] = layout.css
stylesheets[all][] = graphics.css
stylesheets[all][] = typography.css
stylesheets[all][] = links.css
This happened to me when I
This happened to me when I was creating my first (and so far only) subtheme.
Turned out the problem was using WordPad to create the theme.info file as it added a bunch of tags to the file.
Silly, I know.
I considered that too
I usually use Dreamweaver to create the files: it doesn't add anything extra. I also tried creating a new .info file using TextEdit, TextWrangler and also directly from my web host cPanel. Got the same results. I'm sure it's something really stupid and simple, I'm just not seeing it.
If you now copy & paste in
If you now copy & paste in the contents of the original .info file (which you copied from elsewhere and worked at first), does it start working again?
Trying to narrow the problem down to the contents or a file type problem.
No, that's what's strange. If
No, that's what's strange. If I duplicate "pushbutton" theme, for example, and change the name of it's folder (putting it in my sites/all/themes/custom/themex) and .info file (themex.info), everything works fine. I can modify all the .tpl.php and .css files, and all other files.
If I make one tiny change to the contents of .info, it no longer works.
If I try to change it back to it's original content (from the "pushbutton" theme, for example), it still won't work.
If I copy the "pushbutton" .info file into "themex" folder, rename it themex.info (without changing any internal content) and upload, it won't work.
If I copy the "pushbutton" .info file into "themex" folder, rename it slightly different, like "themexxx.info" and upload, delete the "themex.info" file - it works.
Whatever is happening here has something to do with permissions, user settings, or something along those lines. I'm sure of it.
There are no other users or admins; it's my own personal test site in a subdomain of it's own inside my site's root. Permissions should all be relative to me, but i think it may be part of the problem.
thoughts?
I still have a sneaking
I still have a sneaking suspicion that Dreamweaver (or other text editor) is manipulating the .info file type upon save so it isn't reading properly, since your problem seems to begin upon saving your .info file. See this post:
http://drupal.org/node/18151
It hints at that. You might try adding that Drupal extension for Dreamweaver.
Thanks for posting that
Thanks for posting that link!
I downloaded that DW Drupal Extension, installed and will check it out. It's for DW CS3, I'm running CS5, but it appears to have installed ok.
It may help eliminate an extra step, and I'm all for anything that saves time! Thanks!
just figured it out
Hey everyone - I just found the problem.
Since everything else had been working and the trouble seemed to begin and end at the .info file, and any changes made to it, I started thinking about the permissions. I looked at the permissions settings on the server (for custom theme folders and .info file) and they are all set to 644. That should allow a user to make changes. It didn't.
Then I had a brainstorm, of sorts.
I'm on a Mac. Sometimes files get overly protected due to the network and sharing settings on the system. I pulled up "get info" on one of the .info files, saw that it had sharing set to myself only, which is different from my site's info.
As soon as I changed those settings, the theme showed up in the list with all of my info including name, description, etc. I'm still having some permissions issues with a couple of the other themes I've created or altered, but I'm on the right track now.
I've never had this kind of trouble with pages/files on a website before. If anyone knows the proper settings for these files from the server side, Dreamweaver & local side, I sure would be happy to hear what they should be.
For now I'll keep on experimenting with the permissions to see what works. Thanks everyone for the help and suggestions so far!
- Jeff
Ah - Glad you sorted it
Ah - Glad you sorted it out!
Good luck,
Amanda
After a bit more exploring
After a bit more exploring last night I'm fairly certain that the source of the issue is the Mac OS/X and it's sharing/security settings. What I found is really odd.
I know my Mac inside and out, but when it comes to the Apple OS/X file sharing and security stuff, there are things I can't even explain. I changed the sharing options on the folders containing my custom themes and uploaded the .info files again from within Dreamweaver. Didn't work. I downloaded and installed that Drupal extension for DW and tried again; didn't work. I looked again this morning at the steps I took to get it working last night, which were (on OS/X 10.6.4):
1) from system Finder, locate the .info file on my hard drive.
2) "Get Info" from .info file through Finder.
3) change read/write settings to read/write = everyone.
4) bottom right corner of Finder's "Get Info" window, click tiny "lock" icon to UNLOCK - not to be confused with the "Locked" checkbox under "General" in "Get Info" window.
5) while unlocked (padlock icon), upload .info file via Fetch (bypassing Dreamweaver altogether).
6) In Fetch app window, locate same .info file on server, go to "Remote"/"Get Info" (Fetch, not Finder) and change Ownership and Permissions to 774, hit "Apply" to save.
After all that, the .info is read properly in Drupal and the theme shows up.
Whatever is happening here is based on the Mac OS and it's sharing/security settings in relation to the server. Dreamweaver changes ownership on those files that require specific permission settings and I haven't found a way to change it. I even changed the Permissions on the server side from my cPanel and it did not work: I had to release the locked settings locally before it made any difference to the actual file settings.
Whew!
That's very weird,
That's very weird, file/folder permissions should be set on Inherit from Parent on the web server by default I believe. What OS is your server using?
I'd try playing with folder permission settings (are they set at all?) and see if they indeed override permission settings set on the file being copied.
same problem
I'm actually having the same exact problem -- working on a Mac using Dreamweaver, but I tried your solution (using YummyFTP instead of Fetch) and it didn't work.
Wordpad was my problem
For me, wordpad was creating the issue. Created the file in dreamweaver and it resolved it. Thanks guys.
Permissions was the issue
It shouldn't have anything to do with Mac OS X, but I also had a permissions issue post-upload to a Linux server. I changed the permissions after an hour of trying to figure it out, and it worked. Thanks, everyone.