Duplicate body and head tags

Permalink
Hi,
I have a problem that's been driving me mad for hours. First of all I am always getting a "Call to a member function display() on a non-object" so I have no page displaying properly.
Then when I check the source code I can see that for some reason in the middle of the code appears this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" href="/mobile/concrete/themes/concrete/main.css" />
    <script type="text/javascript" src="/mobile/concrete/js/jquery.js"></script>
<link href="/mobile/concrete/css/app.css" rel="stylesheet" type="text/css" media="all">
<link href="/mobile/concrete/css/font-awesome.css" rel="stylesheet" type="text/css" media="all">
<link href="/mobile/concrete/css/jquery-ui.css" rel="stylesheet" type="text/css" media="all">
</head>
<body class="ccm-ui">



I have the template set with the header and footer where it should be, removed the meta tags concrete already uses, tested put my javascripts links, up, down, before after ... well i basically tried pretty much everything but still don't have a clue what could be happening ... I would really could do with some help troubleshooting the issue !! many thanks. I have attached my template, if this can help, and I am not sure if this could be a cause but mention it any way, I have concrete installed in a subfolder, but I made a clean install from the folder directly ... so the config should be fine.

1 Attachment

View Replies:
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi ptityop

Is this a one page theme style website?

Looking at your template file, I see a few things that might be an issue:
- Loader::element('footer_required') is inside the wrapper class div
- you are missing defined('C5_EXECUTE') or die("Access Denied.");
- you are missing Loader::element('header_required', array('pageTitle' => isset($pageTitle) ? $pageTitle : ''))
ptityop replied on at Permalink Reply
thanks for the reply ... would it be too much to send me the proper code you are mentionning is missing as those things are not mentionned in the tutorial that explains how to build a template. So far I have moved the footer section outside the div, and this alone is not the issue ... If you could send me the full code for the 2 other options that would be great otherwise I can fetch the info .... I am just so tired of going through all the do and forums ... :-) thanks a lot
MrKDilkington replied on at Permalink Reply
MrKDilkington
@ptityop

The information is covered in this tutorial.
http://documentation.concrete5.org/developers/designing-for-concret...

I highly recommend reading the "Building a Concrete5 Theme" sections and the full "Designing for concrete5" section.
ptityop replied on at Permalink Reply
thats the tutorial i followed but it does not mention anything about missing defined('C5_EXECUTE') or die("Access Denied.");
- you are missing Loader::element('header_required', array('pageTitle' => isset($pageTitle) ? $pageTitle : ''))

Well ... I think I I just have to go for the second option ... It's like starting from scratch ... what I am most bothered with is that I have many stacks already created and translated .... any idea of which tables I Can replace once I rebuilt the template, so that at least I get the content back ?
MrKDilkington replied on at Permalink Reply
MrKDilkington
@ptityop

I don't think you need to lose any content by rebuilding the template. You can reuse the same stacks and areas, just don't change their names.
ptityop replied on at Permalink Reply
Thanks for your help, being a stubborn, I just spent more time trying to see what was bugging and I checked the database tables where I found the pb. For some reason the multilingual tables where not properly set , with stacks ids not corresponding with the proper language, or wrong Ids, so I corrected those tables and got everythng working properly !