Ok, I have a really weird situation. I have a top level menu category list layout. On my contact category, I have a form on the contact page for a general contact. The client wanted the same form on another page in the same category. so I created another page in the category and placed the same form in the article. so, different pages, same category, same form.
If you navigate to the sub page the form displays and has no issues. However, if you go to the main category page, the form doesn't show and I also noticed other items like my search box text and menu active states were missing. So I went into the console and found a javascript error...
So, that got me looking for conflicts. first of all, I am loading jquery above the loading of my joomla head and also loading and external file with jquery.noconflict. I've tried switching that to a local script block but no changes occurred. I have also disabled everything I have that ran jquery and still notice the error and no form. Seems strange the the code would work fine on the sub page but not the main category page even with all my jquery items. I have placed the head code area for the website below. Any suggestions are welcome.
Affected pages:
http://mcgwebsites.com/web/lsh/contact-us.html (category main level)
http://mcgwebsites.com/web/lsh/contact-us/leave-a-comment.html (category sub page)
If you navigate to the sub page the form displays and has no issues. However, if you go to the main category page, the form doesn't show and I also noticed other items like my search box text and menu active states were missing. So I went into the console and found a javascript error...
TypeError: $("chronoform_lshform") is null
http://mcgwebsites.com/web/lsh/contact-us.html
Line 36
So, that got me looking for conflicts. first of all, I am loading jquery above the loading of my joomla head and also loading and external file with jquery.noconflict. I've tried switching that to a local script block but no changes occurred. I have also disabled everything I have that ran jquery and still notice the error and no form. Seems strange the the code would work fine on the sub page but not the main category page even with all my jquery items. I have placed the head code area for the website below. Any suggestions are welcome.
Affected pages:
http://mcgwebsites.com/web/lsh/contact-us.html (category main level)
http://mcgwebsites.com/web/lsh/contact-us/leave-a-comment.html (category sub page)
/* The following line loads the MooTools JavaScript Library */
JHTML::_('behavior.framework', false);
/* The following line gets the application object for things like displaying the site name */
$app = JFactory::getApplication();
/* The following line loads the Joomla Document and then use variables to load different template items */
$doc = JFactory::getDocument();
$doc->setGenerator('Medical Consulting Group');
$params = &$app->getParams();
$pageclass = $params->get('pageclass_sfx');
$syspath = $this->baseurl.'/templates/system/';
$path = $this->baseurl.'/templates/'.$this->template;
?>
<?php echo '<?'; ?>xml version="1.0" encoding="<?php echo $this->_charset ?>"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
<head>
<!-- Include JQuery -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<!-- Include JQuery noconflict -->
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/jquery.noconflict.js"></script>
<jdoc:include type="head" />
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,900' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/reset.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/menu.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />