I am getting the following notice on my production site (pink may be nice but for customer confidence building?...)

Notice: Undefined variable: schemaorg in include() (line 65 of...\themes\adaptivetheme\at_core\templates\html.tpl.php).

- I have just upgraded to Drupal 7.54
- Am using AT subthem, customized a little...
- I installed, enabled, disabled, uninstalled and deleted the Schema.org module. No effect...
- Deanflory has sugested the following but I don't know what the "rippling effect" may be, if at all..

Open this file or the one that's in your custom subtheme if you're using one:
sites\all\themes\adaptivetheme\at_core\templates\html.tpl.php

Find this line:

<!--[if gt IE 8]><!--><html<?php print $html_attributes . $rdf_namespaces; ?>><!--<![endif]-->

Add this if it's not in there already (or try updating Adaptivetheme to see if it's there):

<?php print $schemaorg; ?>

Make it look like this and save, then upload:

<!--[if gt IE 8]><!--><html<?php print $html_attributes . $rdf_namespaces; ?><?php print $schemaorg; ?>><!--<![endif]-->

I am not a programmer, so any ideas are very welcome...

Thank you,
Michael.

Comments

Michael G created an issue. See original summary.

Michael G’s picture

Issue summary: View changes
Michael G’s picture

Issue summary: View changes
Michael G’s picture

Issue summary: View changes
Jeff Burnz’s picture

No real idea what you are talking about, I think you're jumping in halfway through the story here and not giving me any background. Are you using some contrib module?

Michael G’s picture

This is the full story as I understand it...I am not a programmer..
I am using many modules..

I saw the warning is pointing to an AT Core file so posted
my question in hope someone understands more than me...

I found how to shut-off the warning to my production site, so now
am hoping that someone will sometime find the cause for this warning.

Anyway, this is an opportunity to thank you for a fantastic
theme and credit is honorably given Adaptive Themes on all my web pages.

Jeff Burnz’s picture

Status: Active » Fixed

The variable $schemaorg is not a Drupal core variable, and the theme does not try to print any such variable by default - perhaps someone added it because some module required it (Schema.org module?) - and now that module has been disabled, so the variable is not longer being set.

The way the avoid Undefined variable notices is to check with isset():

if (isset($variable)) {
  print $variable;
}

Thanks for the feedback!

Michael G’s picture

Thank you...
I tried inserting your code into the said file (html.tpl.php) but the warning still comes up..

Status: Fixed » Closed (fixed)

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