I can only get this to work for the different frontpages on my domains, not individual nodes or defaults. Is that intended?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

artofeclipse’s picture

yes this is intended, because you can use metatag module to do this functionality for content and content types.

I think it's odd thing to have diffrent metatag for the content type in diffrent domain of the same website, what do you think?

artofeclipse’s picture

if this is a case you got and need it as a feature I will add it, but please could you add more details of what is the features you want to have?

remkovdz’s picture

Please see this: http://drupal.org/node/1399724#comment-7326984

I think that is a valid use case, thanks a lot.

artofeclipse’s picture

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

Hi, will such à feature be available?

artofeclipse’s picture

Status: Closed (fixed) » Needs work

Sorry I was changing it to needs work, I will work on this one soon.

remkovdz’s picture

Great! Let me know if I can do anything to help.

4kant’s picture

Issue summary: View changes

Yeah - soon would be nice ;-) Thanks anyway!

rich.3po’s picture

Hi - here is a go at a patch for this one. I've also added missing dependencies to the .info file

rich.3po’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 9: domain-global-context-1986650-9.patch, failed testing.

artofeclipse’s picture

@rich.3po Thanks for posting this patch, I will test it and push it.

  • artofeclipse committed 2ffe8f9 on 7.x-1.x
    Fixed #1986650 by Adding support for entities like user, node and...
artofeclipse’s picture

OK, so after a long time finally I had the time to fix this issue, I pushed some code changes to the dev, and by now there is a new dev release, I just will wait for 2 more days to test it more and after I make sure there is no problem I will create a new release.

Ma'moun othman.

artofeclipse’s picture

Status: Needs work » Needs review
artofeclipse’s picture

Status: Needs review » Needs work

This will need database update to make the old settings compatible with the new changes.

  • artofeclipse committed 5c2f51a on 7.x-1.x
    #1986650 Implemented hook_update_N() to fix old metatags config...
artofeclipse’s picture

Status: Needs work » Needs review

Change to needs review.

rich.3po’s picture

Status: Needs review » Needs work
FileSize
466 bytes

Hi, i've been testing your patch - ie the latest dev release - and noticed a few issues

Firstly, domain-specific instances are being activated in some cases where you dont want them to be. Eg i have a master config for a 'section index' node type, which is not domain-specific

So it should activate:
node:section_index

.. but instead in activates
my_domain:node:section_index

which does not exist, but kills all my settings. I've created a patch to fix this

rich.3po’s picture

FileSize
101.04 KB

Secondly, there seems to be an issue with naming 'global' domain contexts as just the domain name. The dev release uses eg

"my_domain"

to represent the global context for that domain. However this causes problems because the Metatag module needs to apply special handling to 'global' contexts, and it detects them by checking the first part of the context name. In other words, the context should be called:

"global:my_domain"

as per my patch in #9

If this is not the case, then you dont see some metatags such as the "Site's Twitter account" which are marked as applicable to 'global only' (see screenshot).

Renaming the context in this way seems to fix this, but makes the interface look a bit messy, ie some domain contexts are with the "domain" fieldset, and global ones are outside of it... Any thoughts on this?

ExTexan’s picture

Hi All,

Can someone tell me the status of this? Is it ready for a production site?

I need domain-specific globals because, for each of my domains, I want to add the abbreviation in ( ) to show in search engine results without it showing in the site name shown on each page of each site.

For example:

Global:

[current-page:title] | [site:name] (MRR) <----- for MyRealRacing.club
[current-page:title] | [site:name] (MPC) <----- for MyProjectCars.club
...etc. for 8 other sites

Front page:

[site:name] (MRR) | [site:slogan] <----- for MyRealRacing.club
[site:name] (MPC) | [site:slogan] <----- for MyProjectCars.club
...etc. for 8 other sites

Obviously, with the unpatched version of this module, I can only do the front page configuration.

harry_nc’s picture

I don't this think implementation is the best way forward, why not duplicate the workflow for every other DA module and have the basic 'save these settings for x domain'? This is a much cleaner way and keeps all the helped DA modules consistent. The implementation in this module doesn't appear to work correctly (I can only see options for 1 domain), and doesn't allow quick overrides based on common settings.

I would say the module isn't ready for production sites yet based on lack of features/workflow & bugs

artofeclipse’s picture

Hello @harry_nc, Thank your for your comment, actually this module now support all entity types for all domains, but need some testing.

You should try the dev version of this module to be able to test it.

Thanks.

theroyal’s picture

@artofeclipse are you talking about the dev version ?
is it safe for production website ?

artofeclipse’s picture

@theroyal, the new changes are commit to the dev release, and its ready to use on production, but no harm in testing first just to make sure that its working as intended to be on production.

let me know if you face any issues.

tommycox’s picture

I know this is three years down the road, but found a recent use case for this and couldn't for the life of me get it to work for specific content types, just a specific domain's content in general.

Line 95 of domains_metatag.module
... $entity->$instance_config[$arg]['bundle']
$instance_config[$arg]['bundle'] needs to be wrapped in brackets like so
$entity->{$instance_config[$arg]['bundle']}

Will submit a patch if I get a chance, although I'm sure this project has gone the way of the dodo.