Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Patch attached helps avoid the following notice:
Notice: Undefined index: machine_name in domain_tokens() (line 87 of domain/domain.tokens.inc).
Comment | File | Size | Author |
---|---|---|---|
#11 | Update deprecated token 2014-04-09 08-12-55.png | 42.32 KB | Rory |
domain-7.x-3.x-dev-update-deprecated-token.patch | 715 bytes | Rory |
Comments
Comment #1
agentrickardA notice which I have never seen. Steps to replicate, please.
Comment #1.0
agentrickardClarified description.
Comment #2
santoshm29 CreditAttribution: santoshm29 commentedI am new to Drupal. I install the module to configure content for affiliate web sites
I am getting the same error.
How should I update this patch in Domain Access module? Appreciate steps in manually updating required files
will this patch remove the notice from admin pages.
Comment #3
agentrickardI still need steps to repeat the issue, which I have never seen.
See https://drupal.org/contribute/testing for details about how to file a good bug report.
Comment #4
mark_anthony CreditAttribution: mark_anthony commentedI keep getting something similar:
Notice: Undefined index: machine_name in domain_tokens() (line 87 of /var/www/mysite/public/sites/all/modules/domain/domain.tokens.inc).
It worked on initial set up, then I started getting this message. I then updated to the latest Domain module. It worked for a while, then last night it started again.
It may have something to do with Domain Views.
I included the patch from above. I also went to Structure/Domains and edited the one extra domain there. really just clicked "Save Domain Record"
That had seemed to correct it, but only for an hour or so an now the same error.
Comment #5
agentrickardPLEASE READ COMMENT #3.
At least give me a report of what you were doing, what page you were on, what you clicked in order to trigger the error.
Comment #6
mark_anthony CreditAttribution: mark_anthony commentedI would like to. I am just checking the sites front when I notice. The Views slideshows I have set up for both sites disappear, and the Site information gets mixed up or combined weirdly (don't have a good example of that-sorry).
It just seems to throw this error after a indefinite period. Clearing the sites cache corrects it for a period.
In my last attempt at correcting I went into Structure » Domains » Batch Updating and lowered Cache setting for all the domains to 3 hours.
(had to do this through the Batch tab as the setting would not stick in the Configuration » Development » Performance page for a particular domain.)
So far it has been about 24 hrs and no error yet and the two sites seem to be recognized as correctly different sites.
Comment #7
agentrickardThanks.
Comment #8
mark_anthony CreditAttribution: mark_anthony commentedOK it started again. Here is a list of all the Reports (that I can find) in reverse order (the top of the list happened first- like the same second) leading up to it .
Maybe my theme templates are goofed and are hogging php or something. We have like 200mg to php.
Comment #9
mark_anthony CreditAttribution: mark_anthony commentedAnother thing I have noticed, in Local (which works fine) as compared to Production Server (where the issue is)
PHP DOM extension Enabled - is on in local
and not showing in Status Report for Production Server install.
Is this needed?
Comment #10
mark_anthony CreditAttribution: mark_anthony commentedWell I think I fixed my issue, and it is totally unrelated to Token.
It seems that a Branding template I had modified to pull in an image did not have a correct path, or the path was causing the template to fail intermittently. Then a whole cascade of template fails would happen (even though the site would still render correctly!) and the domain access would bomb out.
I changed it so the image had a complete path instead of relative and I have not had a problem for at least a week.
Comment #11
Rory CreditAttribution: Rory commented@agentrickard: You're absolutely right, and I'm sorry for not including steps to reproduce.
In my defense the patch just fixes what appears to be an obvious issue, which is probably why I thought I could get off light on the report, but I can see how frustrating it is to let details slide.
With the latest version of Token and Domain when editing the admin field:
Structure > Domains > Settings > Show Domain-specific CSS classes
or navigating to:
admin/structure/domain/settings
You can see the field value contains an underscore, but the token suggestion provided below identifies this is incorrect! Refer to screenshot attached.
Sorry this hasn't been deaIt with on my part in some time and that I can't recall exactly how I was able to reproduce this in the first place, but hopefully that explains the issue and possibly how to reproduce it.