See: http://drupal.org/node/31342.

Because nodewords in CVS-HEAD uses theme(), sections.module can't override the theme to use for a page anymore.

Possible solutions:
- fix it in sections.module - maybe by calling init_theme() or putting it in hook_init();
- fix it in theme.inc - not sure how;
- fix it in nodewords module by not using theme().

Comments

Robrecht Jacques’s picture

Category: bug » task
Priority: Normal » Minor

There doesn't seem to be a good solution for this so I have removed the theming function theme_nodewords_html_head(). To be honest, this function didn't make much sense in the first place so it is not a big loss. (note: the idea of this theming function was to add Dublin-Core support later (as the tags added to the html head are a bit different then), but Dublin-Core support is not for tomorrow, so this can wait untill then).

Note:
nodewords.module *still* conflicts with sections.module in the case of displaying the frontpage. Because I want to detect whether the user choose to display the site slogan and/or site mission on the frontpage, I need to call theme('get_setting', ...) and so the change of sections.module of the current theme will not work.
This is not a problem if you make sure that the default theme is the one used of the front page and not use sections.module to override the theme on the front page. I think this is a small price to pay to get both modules working (almost) the way they should.

Leaving this as a task in case someone else has some bright ideas because it is not completely fixed yet.

Marc Bijl’s picture

Nice work Robrecht! Great documentation file too! Downloaded the latest version and everything seems to work fine now, although I have to test it a little bit more next few days.

I do not completely understand the remaining conflict you describe. My default theme is used for the frontpage, so that should be alright then? The only thing I've found is that there's no description at the frontpage; probably I've done something wrong...

Anyway, thanks for the job!

Robrecht Jacques’s picture

Downloaded the latest version and everything seems to work fine now, although I have to test it a little bit more next few days.

Thanks for testing. If you have any issues, feel free to post a new issue or add a comment to this one (if it is related to this one). I try to respond as quickly as my fingers will type :-)

I do not completely understand the remaining conflict you describe. My default theme is used for the frontpage, so that should be alright then?

That is correct.

The only thing I've found is that there's no description at the frontpage; probably I've done something wrong...

If you have node/ as your frontpage, then indeed there will be no description meta tag. For the frontpage, the description metatag will be set to the "site mission statement" IF (and only if) you choose to display that "site mission" in your theme settings. If you don't have a site mission or you choose not to display it, then there will be no description.
If you have a node/XXX as frontpage then the description of that node is taken.

The idea of the rewrite was to allow for description meta tags (and others) to be attached to any path, but I haven't figured out yet how the user interface of this should work. For the meta description of a node, you can fill it on the node edit page, but other pages (like the frontpage, or others), there is no such node edit page. So where should I allow users to edit the meta description then? On the settings page? This would make the settings page a bit complex, so I have to think about the interface (or find a similar interface already used somewhere in Drupal or contributions).
The only pages that can have meta tags now are node/XXX, taxonomy/vocabulary/XXX and taxonomy/term/XXX as they are the only ones with a edit form where I can add the form elements to.

So, I'm thinking about this stuff, but it's not for tomorrow :-)

Robrecht Jacques’s picture

Status: Active » Fixed

Fixed in cvs (the sections.module stuff) by setting the weight of the module.

Robrecht Jacques’s picture

Status: Fixed » Closed (fixed)