When you overrule the taxonomy term pages using views, the META tags are not displayed.
You can 'fix' this with path-based META tags but that's not ideal in most use-cases.

The path below fixes this issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jeff.maes’s picture

Status: Active » Needs review
FileSize
0 bytes
jeff.maes’s picture

valthebald’s picture

Is it possible to use views-specific hooks instead of hook_page_alter? Thus no need to check if views module is enabled

jeff.maes’s picture

I don't think views-specific hooks will make this possible because you only can change the result-set of the view and not the 'wrapper' page... Or am I wrong on this?

http://drupalcontrib.org/api/drupal/contributions%21views%21views.api.ph...

betz’s picture

Status: Needs review » Reviewed & tested by the community

Tested and works flawlessly.
Thanks for this.

Can this be committed?

Tom

Phizes’s picture

Is it possible to use views-specific hooks instead of hook_page_alter?

It is, I had a working implementation I've been meaning to contribute but I had a hard drive failure, I will get it completed in the next week or so.
Additionally the patch above uses _metatags_quick_known_fields() to get the fields which should be rendered, I'm pretty sure this would not render any custom created meta tag fields.

Phizes’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
3.4 KB

Here is a patch using a views hook, it does add a views include file. Feedback would be appreciated on how I have done it.

Apologies for the cruft, I have no idea why the it is there other than it having non-unix line endings perhaps. I spent roughly 2 hours trying to produce a clean patch to no avail. If I checked out the metatags_quick.module file, opened it, made no changes and saved it again, git would still show those lines as having been changed. Applying the patch will also result in whitespace errors, though I think that is related to the code around the cruft (Which does have extraneous white space) as I can't find any on my actual changes.

If anyone has any idea on how I could roll a cleaner patch, please let me know.

betz’s picture

That looks like a better solution indeed.
Thanks for that.

valthebald’s picture

Status: Needs review » Fixed

Committed to 7.x-2.x
Thanks to everyone!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

esquareddesign’s picture

I have not been able to get this to work. It errors out every time I upload the patched files. any help would be appreciated.

Phizes’s picture

This has already been committed to the 7.x-2.x branch a while ago, so the patch wouldn't apply to it. In commit ccda915 for metatags quick. There is no need to patch new versions as the code is already in the newer releases of this module.

esquareddesign’s picture

Hm, I am using the latest release and I can still not get the meta tags to show up on my taxonomy pages that I have overwritten with views. I have reinstalled the module, dumped the cache, even tried path-based meta tags. is there something I am overlooking?