I am using themkey 6.1. Under Settings i set the "Discover all node properties for selection" to apply themes to certain nodetypes. But the theme is not used to the selected nodetype. Using "Paths" works.
Checked another of my sites, where themekey 6.x-1.x-dev works fine. i'm no programmer, but the difference i can see is, that in the new site the properties are displayed in this way:
node:type
node:title
...
instead of

type
title
...

Could this be the problem? and how to solve it?
regards

CommentFileSizeAuthor
#6 themekey_properties.diff306 bytesdesignerbrent
#4 themekey.patch2.38 KBllacroix

Comments

jcfiala’s picture

I had this problem as well, and this is what I did - I went to line 131 of themekey_base.inc, where it says:
$value = (array)$value[$part];
and changed it to
$value = $value[$part];

this is in the _themekey_property_field() function.

Once I made this change, it seemed to work fine, well, mostly.

profix898’s picture

Actually the difference in the properties syntax (node:type vs. type) is caused by a patch that introduced a namespace concept. We can now have each property in different contexts, i.e. node:language, user:language, global:language. I hope you get the idea. Namespaces were added to the -dev version right before the 6.x-1.0 release. Unfortunately that means older -dev versions got incompatible with the stable module version.

You will have to resave the properties settings page AND update your existing items manually (or simply recreate them). Sorry.

profix898’s picture

Status: Active » Closed (fixed)
llacroix’s picture

Status: Closed (fixed) » Active
Issue tags: +themekey patch
StatusFileSize
new2.38 KB

It doesn't seems to be fixed. I noticed the dev version and the stable version are the same...
I wrote a patch that fixe some issue like when you want to edit a node or comment a node and still want it to be based on node type...
I don't know if it break other things. But it is working definitively better than it was before.

jostrn’s picture

I don't know if it break other things.

It does! With the patched themekey i get the following error 2 times on a taxonomied node:
warning: mysqli_real_escape_string() expects parameter 2 to be string, object given in /htdocs/includes/database.mysqli.inc on line 323.

designerbrent’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new306 bytes

Changing the values as jcfiala suggested in #1 worked for me.

Attached is a patch to make that work.

mkalkbrenner’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

@#6,designerbrent:
Similar patch against current cvs version was already posted here:
http://drupal.org/node/434242

So I mark this issue as duplicate.