instalation is totally OK, but when I set up any DIFFERENT theme for Taxonomy for example ... no luck. I see still the same theme in this node. What I'm doing bad?

I'm using CVS version of Durpal.
Thank you for your help

Comments

profix898’s picture

Category: bug » support

Hi brumisek!

As long as you cant specify a certain problem this is a support request rather than a bug report!

However you should tell me a little more about what you are trying to do, for example:
- selection-method: term-based, vocab-based, all-taxonomy
- how do your Drupal pathes look like? (node/x, taxonomy/term/x)
- contrib modules that change your pathes
- other (taxonomy_) modules (that might interfere)
In most cases taxonomy_theme does not work due to faulty settings.
I'm confident to solve your problem.

profix898’s picture

Do you use 4.7b6 or cvs? Do you have more than one theme enabled?
I think I found a clue why it does not work as expected! Give me a few
hours to figure out ... As a workaround: Please try again with only one
theme enabled in admin/themes. You can still select from all themes
by checking the 'Allow all themes' option in taxonomy_theme.

hadishon’s picture

Category: support » bug

I'm having the same results.

No matter what combination I use, I can't get the module to change any themes of any pages. I tried multiple combinations both in IE and Firefox. I also tried clearing my cache several times. I tried your suggestion of just having 1 theme enables and then checking the all themes button, didn't work. I tried all 4 types of selection methods. I also tried differant paths.

I'm using CVS version as of Friday, 3/24.

BTW, great module! I can see how this can extend my websites to do things I didn't think were possible before.

profix898’s picture

Assigned: Unassigned » profix898

Some patches added after 4.7b5 prevent taxonomy_theme from changing theme. Fix for current cvs version of Drupal committed. Please try the new version from http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/ta... and give FEEDBACK. I will update the 4.7 branch when Drupal 4.7rc comes out (to avoid confusion).

Hope it works, Thilo

hadishon’s picture

I just updated to taxonomy_theme.module,v 1.17 2006/03/26 09:34:10 profix898.

This update broke current CVS (just updated) version. With this module installed as it is now, it breaks the whole site. I get these errors:

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: array_key_exists(): The first argument should be either a string or an integer in modules/system.module on line 612

Warning: mysql_real_escape_string() expects parameter 1 to be string, object given in includes/database.mysql.inc on line 349

Warning: Illegal offset type in modules/system.module on line 638

Warning: Illegal offset type in modules/system.module on line 641

Warning: array_keys(): The first argument should be an array in themes/engines/phptemplate/phptemplate.engine on line 102

Warning: Invalid argument supplied for foreach() in themes/engines/phptemplate/phptemplate.engine on line 102

Warning: Illegal offset type in includes/theme.inc on line 210

Warning: Illegal offset type in includes/theme.inc on line 210

If it helps, I'm running PHP Version 4.4.1 and MySql version 3.23.58.

profix898’s picture

Wow! Is is not what I expected of course! I have the module (1.17) working perfectly with Drupal HEAD (March 25).
Can you please ...
- disable the module from admin/modules
- flush the cache (DELETE FROM {cache})
- delete module from system table (DELETE FROM {system} WHERE filename LIKE '%taxonomy_theme.module')
- log out and back in again
- enable module from admin/modules
- check all settings in admin/settings/taxonomy_theme
and finally post your results.

hadishon’s picture

I followed these instructions exactly:

- disable the module from admin/modules
- flush the cache (DELETE FROM {cache})
- delete module from system table (DELETE FROM {system} WHERE filename LIKE '%taxonomy_theme.module')
- log out and back in again
- enable module from admin/modules

As soon as I enabled the module, I got the exact error messages that I received before. I couldn't go to the next step that you posted because the site was broke.

hadishon’s picture

taxonomy_block.module is the only other taxonomy based module I have installed.

profix898’s picture

Hmm. I just installed taxonomy_block and its still working ...
- What else modules do you have installed?
- What themes (or better using different theme engines?)
As long as I cant reproduce I dont know how to fix this :/

hadishon’s picture

I'm using a box_grey based template.

Besides the "required" modules, I have these modules installed:

acidfree, adsense, aggregator, bbcode, blog, book, comment, contact, db_maintenance, dba, devel, filemanager, flexinode, forum, gsitemap, help, image, legacy, page, menu, paging, path, poll, profile, search, statistics, story, taxonomy, taxonomy_block, tracker, upload, views

hadishon’s picture

I'm now also getting this message in my logs when I activate the module:

Type	taxonomy_theme
Date	Sunday, March 26, 2006 - 09:46
User	Admin
Location	/admin/modules
Referrer	/admin/modules
Message	module rated to higher priority (weight = -1)
Severity	notice

and

Type	error
Date	Sunday, March 26, 2006 - 09:47
User	Admin
Location	/admin/modules
Referrer	/admin/modules
Message	PHPTemplate was instructed to override the page theme function, but no valid template file was found.
Severity	notice
hadishon’s picture

profix898’s picture

Besides the "required" modules, I have these modules installed ...

It will take some time to check them all ...

Is this the version you are using?

YES.

module rated to higher priority (weight = -1)

This is a new function I added to cvs version of taxonomy_theme. So it's undocumented atm. It simply checks whether taxonomy_theme is the first module to apply. If not it increases its priority. Generally it will set weight to -1. On a new install sets its priority to -1 when it is enabled for the first time. So I guess you just updated, right?

... but no valid template file was found

Maybe this is a theme issue. Have you tried the module with other themes (e.g. bluemarine and pushbutton)?

hadishon’s picture

I tried using it with bluemarine with the same results.

quote:

This is a new function I added to cvs version of taxonomy_theme. So it's undocumented atm. It simply checks whether taxonomy_theme is the first module to apply. If not it increases its priority. Generally it will set weight to -1. On a new install sets its priority to -1 when it is enabled for the first time. So I guess you just updated, right?

What do you mean by just updated?

I'm using a current (as of today) version of cvs drupal and current Taxonomy_Theme.module.

I get the big list of warnings that I posted earlier in my browser as soon as I enable to module.

After I delete the module from server (to regain access) I check my logs. I see the two notices that I posted above. They have the same time posted as when I tried to enable the module.

I don't understand why I get this notice:
"PHPTemplate was instructed to override the page theme function, but no valid template file was found."
Before I even go to admin/settings/taxonomy_theme to enable anything.

Is there anywhere else besides the system table that information is stored for this module?

hadishon’s picture

I just installed the taxonomy_theme.module on another site of mine. It uses the same base template and has the same modules installed on it. This is the first time I've attempted to install taxonomy_theme.module on this website.

It works.

No warnings, no notices.

The only thing I can think of is that the older taxonomy_them.module made a change to the database somewhere that is tripping up the new version. Is there anywhere other than the system table that this module makes changes to?

profix898’s picture

Nice. It would great to know why it doesnt work on your other site ...

All module settings are stored to table 'variable'. You can remove all settings
by deleting all variables starting with 'taxonomy_theme_' from the table.
DELETE FROM {variable} WHERE name LIKE 'taxonomy_theme_'
Apart from the settings and 'system' table entr it does not change any
tables directly, but I dont know what Drupal does internally.

hadishon’s picture

After searching and deleting every row in the entire database (not just cache, system, and variable) that had %taxonomy_theme% in it,

IT WORKS! :-)

Thanks a lot for the help!

I still don't know exactly what was going on keeping the new module from working right...

For others that want to upgrade, I would recommend that you search and delete every row that has %taxonomy_theme% in your entire drupal database.

hadishon’s picture

One more thing, I would recommend backing up your database before you start searching and deleting!

hadishon’s picture

I think I may cry... lol

I spoke too soon.

I started to assign themes to certain location and as soon as I hit save, I get the same errors I did before when I enabled the module.

hadishon’s picture

OK, I did some more testing on my other site where it was working.

It seems as though it worked up until I selected "Enable extended assignment of themes" box, put a path in the box, and clicked save.

Then I had problems.

hadishon’s picture

Also, I get these messages:

* taxonomy_theme: module rated to higher priority (weight = -25)
* taxonomy_theme: module rated to higher priority (weight = -26)
* taxonomy_theme: module rated to higher priority (weight = -27)

Is there suppose to be that much weight?

hadishon’s picture

OK,

As long as I don't use the "extended assignment of themes" feature, I can use this module on both sites without strange errors.

I think something may be wrong with that part of the module...

hadishon’s picture

I can get this module to change the template on vocab or term pages but, not pages that contain a term.

What I want to do is when I create/edit a node, map a term to it and therefore map a theme to it also.

I can't seem to do this.

I can map the /taxonomy/term/1 page but not the individual nodes of that term.

profix898’s picture

Look like Drupal.org got a new look and some new feature (for example your cant preview your posts) ;) So let me answer your questions:

Is there suppose to be that much weight?

NO. Of course not. New cvs version stops at -10 (for safety). Generally you will have -1 in the beginning and maybe have to change to -2,-3 with many other modules installed. I think your very light weight was caused by the bug in 'extended' section.

What I want to do is when I create/edit a node, map a term to it and therefore map a theme to it also.

You have 2 options to do so:
1. Use term-based selection
Create a new vocab and one term for every available theme. When creating a node simply assign one of the terms to that node and you will get the theme assigned to that term applied to that node as well.
2. Use all-taxonomy selection
Solution #1 need an extra vocab and you need to assign 2 terms to every node (except selector vocab is the same as your content/navigation vocab). Thats where all-taxonomy jumps in. You can select themes for all your terms in all vocabs and therefore you dont need to assign any extra theme-selector-term to each nodes.

I can map the /taxonomy/term/1 page but not the individual nodes of that term.

Generally the theme is also applied to node/x pages (assigned to a term y) and not to taxonomy/term/y only. Please try the new version of taxonomy_theme from cvs (1.19). I did some cleanup and some fixes regarding forum theming. Maybe a forum theme was overriding your page theme (if you have forum.module enabled).

I really hope, the 4.7 problems are fixed now. If so 'Thanks a lot' for your help to figure out the critical parts. Its great to have the major bugs fixed before 4.7 is finally out.

profix898’s picture

Status: Active » Fixed

Patch committed. Setting to 'fixed' since it workes for me now.
Please reopen in case you still have problems with 4.7b6+.

hadishon’s picture

Seems to work now. I tested 1.22. Even the extended works. I can map terms to themes... everything it is suppose to.

One small issue though not big enough to be a bug though. When using the extended feature, you have to put in the drupal path ei node/1. You can't use url aliases. It would be nice if you could put the aliases in but it works just as good by putting "node/1" because it also changes the page when you view it with the aliases name.

One feature request, maybe this should be a new issue... It would seem that you could also incorporate a map to theme for node type as well. ei all flexinode-3 map to certain theme etc... You could accomplish the same thing by associating all of that type with a vocab term. It just seems that it would be clean if you could map to "type" as well.

Good job on this script! I think it will help those that are not as technically inclined to do these things through coding their templates. I know it will save me a lot of time...

profix898’s picture

Glad to hear its working for you too. :) I will take a look at the path alias thing tomorrow. Could you please create a new feature request for the flexinode part!? And explain a bit what exactly you expect the module to do!

Brumisek’s picture

Yes! new version is OK. Now it's working. Thank you boys!

Anonymous’s picture

Status: Fixed » Closed (fixed)