WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Single Post not calling sidebar or footer suddenly -- why? (36 posts)

  1. kenwinstoncaine
    Member
    Posted 7 years ago #

    Hi:

    Not sure when or why this happened.

    The index page of my site http://www.mindbodyspiritjournal.com is calling the sidebar and footer just as it always has. However, I noticed today that the single.php is not calling the sidebar and footer. Example: http://www.mindbodyspiritjournal.com/life-coaching-reporter/just-one-little-shift

    I checked the code carefully for single.php, line by line, against the original in the theme that has always worked in the past and see no corruption.

    The last two lines on that page in the theme editor are:

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Any idea why this might be happening and what I can do to get it working again?

    Thanks,
    kwc

  2. KatGirl
    Member
    Posted 7 years ago #

    Have you check validation? Its saying that you're missing the closing div for page, content and wrapper. It also says that you're 23 warnings busy.

  3. kenwinstoncaine
    Member
    Posted 7 years ago #

    Let me admit my ignorance. How do I check validation? And what does "23 warnings busy" mean?

    I'm sure you've pinpointed a problem. Maybe THE problem. But I need a primer on how to validate and what it all means. Can you point me to one?

    Thanks,
    kwc

  4. vkaryl
    Member
    Posted 7 years ago #

    Hi Ken -

    http://validator.w3.org/ - that's where to start. And here's a great "helper" site: http://www.samdevol.com/wordpress-troubleshooting-i-have-to-validate-oh-my/

  5. kenwinstoncaine
    Member
    Posted 7 years ago #

    OK. That's got me started. 97 errors in 130-some posts.... Phewwww.

    And it looks like for some reason that every time I use the "More" function to continue a post on another page, that some code isn't getting closed right...

    It is going to take a lot of time to find all of these and fix them.

    Thanks for the tips.

    kwc

  6. vkaryl
    Member
    Posted 7 years ago #

    Tell you what, get most of it sorted, then post back and let us know where you're at with it.

    Lots of times, fixing one thing will clear a bunch of other errors, so don't hyperventilate!

  7. kenwinstoncaine
    Member
    Posted 7 years ago #

    You're so right, vkarly.

    I've only focused on the single-post page errors. And disabling one plug-in corrected 21 of 28 errors. Nice.

    Now, I'm still puzzling over the closing divs for page, content and wrapper, as KatGirl pointed out, (Cool screename, by the way.) It also says I'm missing the closing div for body. It points in each case to the last of two closing divs on the page.

    What do I need to do? Add four more lines of </div>? Or does each div's closing div somehow need to be identified as to what it is closing?

    Appreciate the instruction because I'm div ignorant.

    An example of one of the actual errors cited is:

    Error Line 63, column 6: end tag for "div" omitted, but OMITTAG NO was specified .
    </div>
    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    ‚úČ

    Info Line 34, column 0: start tag was here .
    <div id="content">

    ---
    Now... what is on line 63 is this: </div>

    Is that somehow the wrong form? Or is it just telling me that I need to add a few more of those?

    Thanks,
    kwc

    p.s. UPDATE: I tried both adding four </div>s down at the bottom and when that failed to validate, adding in the order the errors are cited:
    </div id="content">
    </div id="wrapper">
    </div id="page">
    </div id="body">

    beginning at line 63. That also did not validate. So I'm not at all sure what is needed.

  8. kenwinstoncaine
    Member
    Posted 7 years ago #

    I guess no one is following this any more. I will start a new thread about closing divs and take the current puzzle there.

    Thanks,
    kwc

  9. moshu
    Member
    Posted 7 years ago #

    The validator still shows 91 errors on your main page... You either have a faulty copy of that theme - or the theme has never been valid (I doubt). Maybe you've edited the template files and something got messed up?

  10. kenwinstoncaine
    Member
    Posted 7 years ago #

    Thanks, Moshu. I haven't started trying to fix the main page yet. I'm still trying to figure out the div closing problem on the single page php.

    Something about html that I don't understand there. How to properly close those four divs.

    The main page, interestingly, IS calling the sidebars like the single page should be and used to.

    I'm going to tackle the main page errors soon as I get the single page to validate.

    What do I need to do to close those four divs?

    Thanks,
    kwc

  11. moshu
    Member
    Posted 7 years ago #

    Forget the 4 divs and,please, try to answer the questions :)
    Does it works properly with the default or classic theme?
    Would it work with a copy of your theme that was NOT edited at all by you?

  12. kenwinstoncaine
    Member
    Posted 7 years ago #

    p.s. I wish I could remember editing the template files in the last two weeks. Because I'd go right there an undo whatever I did. But I let this thing sit for most of that time. Was feeling guilty about that, but was swamped with other projects.

    Then when I went in to make a post, discovered that the single pages were no longer calling the sidebar. And, per KatGirl's suggestions, when I started checking validation, discovered an s'load of problems. Trying to tackle 'em one at a time.

    I DID do quite a few minor edits in templates months ago, but the site was coming up fine in IE and Firefox with those. Am certain that I could have made some html errors since I'm still 80% in the 1995 dark ages as far as understanding html goes. (It all changed on me when I wasn't looking sometime around the beginning of the 2000s? And I'm just now beginning to catch up. It's slower going than I'd like.)

    kwc

  13. kenwinstoncaine
    Member
    Posted 7 years ago #

    I haven't switched templates yet to check. Will try that in a moment.

  14. moshu
    Member
    Posted 7 years ago #

    OK, I'd try this.
    Rename your existing theme's folder to something else on the server and upload a fresh, unaltered copy of the theme (supposedly you have one, since everybody has a backup copy of the files they are working on :)
    Then active the new, unedited theme. See if it works or you have the same errors. Then we'll take it from there.

  15. kenwinstoncaine
    Member
    Posted 7 years ago #

    OK. It didn't call the sidebar on single posts in Default, but did in Classic. What does that tell you?

  16. moshu
    Member
    Posted 7 years ago #

    OK, I just caught you while trying out other themes: with the default you have only 4 errors on the main page - so it is definitely related to your editing.
    I'd start with a new copy of your favourite theme and editing it very cautiously: only one line at a time and always checking for the validation.

    EDIT. In default the sidebar is not shown by design!

  17. kenwinstoncaine
    Member
    Posted 7 years ago #

    Yes. I have the original theme files.

    Will take quite awhile to work with them, though, because they were for a flicker site and don't at all resemble the site I built.

    But I have a new problem.

    I also tried to look at the site in another theme (that worked in May) but now can't even access the theme editor. I get the following message:

    Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/journal/public_html/wp-content/themes/Regulus/functions.php on line 186

    Guess I need to fix that first so that I can see the site again.

    How do I tell which line is line 186 in functions.php? Is there a particular editor I can open it in that will number the lines (as did the validation editor)?

    Thanks,
    kwc

  18. moshu
    Member
    Posted 7 years ago #

    Every decent text editor listed in the Codex shows the line number (otherwise we'd go mad when working with code :)
    http://codex.wordpress.org/Glossary#T

    If you didn't edit the functions.php file - it sounds like a corrupted file. Files get corrupted more often than you'd think: during download, unzip, upload etc.

  19. kenwinstoncaine
    Member
    Posted 7 years ago #

    OK. I uploaded a backup of the Regulis functions.php and got out of Regulis and have it back to its original broken right now.

    So I have two paths to pursue here.

    - Your suggestion of uploading a backup of the original theme and making changes, one line at a time, checking validation between each. Since there are at least 100 changes and probably many, many more than that, that will be a lengthy task.

    - Correcting as many of the validation errors as I can on the Index page and seeing what I end up with.

    I can't make time for either this afternoon. And may end up doing both. Am thinking that trying to correct the validation errors on the index page is probably the simplest first step. And maybe it will lead me to the corrupted file that is causing the current issues. And maybe, without too many hours, I can get the code to validate.

    That would really be nice. And if not, then it's start building all over, I guess. And maybe I'll pick a whole new theme at this point if I'm going to do that.

    I've been intending to make a bunch of changes anyway to simplify this thing. It's no longer a simple clean layout like I intended. I've messed it up with way too many categories. And the colunns in the two-column sidebar are too narrow to allow for much meaningful content there.

    So, third option: Maybe use this an an opportunity to re-theme/re-design the whole works.

    A fourth just occurred to me: I could upload a backup from two or three weeks ago, while the site was still working, and then start tackling the validation errors in that version.

    Too many choices now.

    I'll be back. Thanks for the help.

  20. moshu
    Member
    Posted 7 years ago #

    I've messed it up with way too many categories.

    That's a statement I agree 100% with :)

  21. kenwinstoncaine
    Member
    Posted 7 years ago #

    Back to this. Looked into my backups. They are just sql backups. Dont include the theme files. So I have weekly backups of my posts, basically.

    So now going into my theme files to see what the most recent versions I have are.

    And going to tackle the validation of the exiting broken index page for an hour or so and see if I can make much progress.

  22. kenwinstoncaine
    Member
    Posted 7 years ago #

    Not.

    Verizon Wireless, my ISP, is experiencing intermittent outages, so this work is no go tonight. Back to it soon.

  23. kenwinstoncaine
    Member
    Posted 7 years ago #

    Finally! Back to this. Have been days without internet service. Turned out it was the Google Toolbar 2.0 update that was issued late last workweek and that automatically updated itself that was interfering with my wireless connection. Had to turn off several new functions in it, but now I'm back online just like before Google Toolbar updated.

    Now I'm totally flummoxed as to what to attempt next.

    When I begin the validation process for the main page at http://www.mindbodyspiritjournal.com, I run into multiple instances of codes supposedly not closing. But when I go to the line indicated, I see the code is closed. It's exactly the same as with the div closing issue cited much earlier.

    Going to read back through this whole thread and see if I get any inspirations.

    Sure wish my weekly backups had backed up the theme also!

    kwc

  24. moshu
    Member
    Posted 7 years ago #

    A lot of errors are coming from how the "more" tag is inserted in your posts:
    it starts with the anchor tag: <a href...> tag and it should end with </a>. But for some reason (hitting Enter?) there is a <p>... </p> pair in between the anchor tags, which is not valid in any circumstances; and the validator says <a> is not closed = meaning something wrong comes before the closing tag.

    Are you using the wysiwyg (aka RTE or TinyMCE) editor monster when writing posts? It is notorious about adding all kind of crappy code to the posts...

    Also, for tags that don't have closing "pairs", like hr or img - in xhtml the end should look like:
    <hr /> <== notice the space and the / [slash].
    Same for <br /> etc.

    Error 28/29. You can NOT have <p> tags around list!

    Some basics of the XHTML: http://www.w3schools.com/xhtml/default.asp

  25. kenwinstoncaine
    Member
    Posted 7 years ago #

    Hi Moshu, thanks for checking in and giving me some direction. Not sure if I'm using the wysiwyg editor. Will check that now. Because I can't find WHERE to edit the code to get rid of that bogus stuff when the 'more' is inserted.

  26. moshu
    Member
    Posted 7 years ago #

    If above the Writing area you see a Word-like toolbar > you are using the wysiwyg.
    This is how to turn it off:
    http://www.vindictivebastard.net/images2/turnoff-rte.gif

    When turned off, in the Write text area you will see the actual code - and you can edit it.

  27. kenwinstoncaine
    Member
    Posted 7 years ago #

    Don't think I'm using the wysiwyg editor. Under Options/Writing the only formatting option I have checked is "WordPress should correct invalidly nested XHTML automatically" ... and I'm wondering if that might be adding some superfluous coding to the "more" function.

    I've looked at a few posts and I'm not hitting a return after inserting the "more" code. Am inserting it by selecting it from the menu above the post box.

    Going to work on some of your other suggestions. If you have any idea in what file I might look to find where the actual coding for the "more" can be edited, I'd appreciate hearing it.

    That does seem to be the most common problem.

  28. kenwinstoncaine
    Member
    Posted 7 years ago #

    Oops. We crossed in the mail. So then, YES, I'm using a WYSIWYG editor and will go to that link you offered and find out how to turn it off.

  29. kenwinstoncaine
    Member
    Posted 7 years ago #

    No, I didn't have that "use rich visual editor" or whatever box checked. And I don't have a Word-like menu above the Post box. Thought I did when you first wrote that, but I just looked. What I have is a line of code buttons between the Title box and the Post box.

    However, I don't see the raw code when I'm writing. Or when I call up old posts to edit them.

    Somehow I've got to get to where I can see that I guess, to delete the bad code in all those posts ... unless I can find the actual function call (maybe wrong term?) that is putting them in and edit it.

    Am going on a deeper hunt to see if I can find where to turn on raw code in my edit posts box.

  30. moshu
    Member
    Posted 7 years ago #

    Sorry, in that case I am getting confused...

    Wisiwyg OFF: http://www.transycan.net/abc/no_wysiwyg.gif

    Wysiwyg ON: http://www.transycan.net/abc/wysiwyg_on.gif

    With the wysiwyg OFF you should see the code.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags