Support » Installing WordPress » Problem with non-Root Blog

  • Resolved kurts54321

    (@kurts54321)


    I’ve seen other posts similar to this, but whatever they’ve suggested doesn’t seem to work for me.

    I’ve just upgraded from WP 2.0.0 to 2.3.2. My earlier version made use of the Filosofo Home Page plugin to achieve this functionality, and it worked well. However, for this version I’ve deactivated Filosofo and am instead using the feature inside the WP distribution.

    My home page at http://urbanvillagescooters.com works just fine. However, my blog at http://urbanvillagescooters.com/blog returns a 404 error.

    I have a Home page created with content and with a separate Home template. I also have a Blog page created. I’ve tried it with and without content, and with either a special Blog template or using the Default template. However I try it I’m stuck with 404 errors.

    Help!

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter kurts54321

    (@kurts54321)

    Update: It appears that the only page with a problem is the root page of the blog (see the link above). I have no problem accessing individual posts via their permalinks.

    Thread Starter kurts54321

    (@kurts54321)

    This is the template I’m using for the blog that I’m having problems with:

    <?php
    /*
    Template Name: Blog
    */
    ?>
    
    // Which page of the blog are we on?
    $paged = get_query_var('paged');
    query_posts('cat=-0&paged='.$paged);
    
    // make posts print only the first part with a link to rest of the post.
    global $more;
    $more = 0;
    
    //load index to show blog
    load_template(TEMPLATEPATH . '/index.php');
    ?>

    I wonder if it is the problem. All the rest of my templates are much more substantial, meaning they have a lot more code.

    Could index.php be missing? Could that be generating the 404 error?

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    That is possibly one of the weirdest templates I’ve ever seen. I’m totally not even seeing the point of having such a template.

    What, exactly, are you trying to do? Because I’m completely lost by both your description of the problem and the complete nonsensicalness of that template.

    Thread Starter kurts54321

    (@kurts54321)

    Ok, first there’s an extra ?> line in the middle of the above template.

    Second, the template is from WordPress Pages Documentation.

    As an experiment I set my Posts page (in Options >> Reading) to my FAQ page. When I did that, going to http://urbanvillagescooters.com/blog resulted in a failed search (instead of a 404 page) while going to the FAQ page returned 404. Switching the Posts page back to the Blog page made the FAQ work correctly and the blog return 404.

    Any thoughts?

    If you are on WP 2.3.2 – you may want scroll up a bit on that Codex page and read the relevant information:
    http://codex.wordpress.org/Pages#Using_a_Page_as_the_Front_Page_.28version_2.1.2B_only.29

    There is no need for that setup that you have!

    Thread Starter kurts54321

    (@kurts54321)

    moshu,

    I am trying to use WordPress as a CMS for my website, with the blog being a “subdirectory” underneath it. I DON’T want my Front Page (at http://urbanvillagescooters.com) to display my posts.

    I DO want to have a Posts page, located at http://urbanvillagescooters.com/blog that will show my latest posts. That is the setup I had using WordPress 2.0.0 and the Filosofo plugin, and that’s the functionality I’m trying to achieve with the current WordPress release.

    As I understand it, the Posts page is supposed to be where the “root” of the blog posts lives. Is this correct?

    You do NOT need any plugin for that.

    All you need is to assign one (existing) Page as your frontpage and another one as your posts page. Done.
    No additional template files, no plugin.

    Thread Starter kurts54321

    (@kurts54321)

    moshu,

    That’s what I’m doing. The Filosofo plugin is deactivated. I am not using any plugin to do this.

    Another thing: It appears that the search is busted as well. No matter what search I do it returns “No posts found.”

    More and more I’m getting the feeling that the blog is messed up. It works fine as a CMS – displaying and editing Pages – and it will display posts accessed via their Permalinks, but searching and listing posts doesn’t seem to work.

    I’ll keep poking at it and post my results here. Any and all suggestions are welcome!

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    kurts: I’m still uncertain what you’re trying to do here. All you have to do to make a static home page is to make a new Page, assign it to the front page, then make an empty “blog” page and assign it to the posts. No special templates required. No plugins required. Everything you’re talking about is unnecessary, the whole thing can be setup and working in minutes.

    That template you’re using is broken. It’s just that simple, I cannot see how it would do anything desirable, ever. And anyway, to just show posts, you don’t need it. You don’t need *any* page template to show posts on a separate page with a static front page. All you need is a blank Page (named “blog” in your case).

    Thread Starter kurts54321

    (@kurts54321)

    Here’s the latest test:

    1) I created an empty Page called “testblog”. It uses the “Default” template. I also changed the template of the “blog” page from “Blog” (the template shown earlier) to “Default”.

    2) I changed the Options >> Reading >> Posts page to be “testblog”. I left the Front page to be “Home” (which is the front page of my website and which does NOT display any posts.)

    3) I displayed the Front page (http://urbanvillagescooters.com). This updated the page navigation links at the top to include “testblog” as one of the listed pages.

    4) I clicked on the “testblog” link (http://urbanvillagescooters.com/testblog) and received a 404 error.

    5) I then backed up and clicked on the “Blog” link (http://urbanvillagescooters.com/blog) and got to the empty “blog” page (it shows up as an ordinary page).

    I will leave these pages unchanged for a few hours so you can check them out for yourself and see what I mean.

    My only 2 questions:
    1. HOW did you achieve #3? – Did you delete any template file called “home.php”, you are using a normal *=non-custom) index and you went to Options > Reading and selected a Page to be your “frontpage”, right?
    2. Why is testblog redirecting to “Blog” and showing “Blog” as the current_page_item?

    Thread Starter kurts54321

    (@kurts54321)

    moshu,

    Re: #3 – I have a template file called home.php. It is an ordinary Page that does not display any posts. It is used by Options >> Reading >> Front Page. I have not changed it in any way since the upgrade from 2.0.0 to 2.3.2.

    Regarding your second question – testblog is not redirecting to Blog. It is coming up as 404. It just so happens that 404.php fakes the navigation bar so that it appears to be a page missing from the Blog. (That confused me for a moment also, and then I realized what I’d done. The earlier release of WP had problems with is_page() for things like this, so I tweaked the header to make things work the way I want.)

    I’m also finding other oddities as I try to diagnose this. For example, TinyMCE sometimes works on the Page/Post editor, and sometimes it doesn’t. Likewise when I do a search in the Manage >> Pages list I get Posts as well as Pages in the results list. Stuff like that.

    I think I’m going to scrub the entire installation and start over. Either that or downgrade back to 2.0.0. I can’t think of anything else to do!

    home.php is NOT an ordinary template file, regardless what you think! It is a template file that overwrites index.php.
    Learn: Template_Hierarchy
    DELETE it!

    Then try to make things to work with the default or classic – especially if you messed around with your template files before upgrading. After that make sure your theme is compatible with 2.3.2.

    Thread Starter kurts54321

    (@kurts54321)

    moshu,

    Switching the theme to one of those provided with the WP software is a good idea.

    I switched to the Default theme, which I uploaded along with WP 2.3.2. The functionality remained the same as with my customized theme. This suggests that the problem is not with the theme, but with the software installation.

    I have since switched back to my custom theme. I am traveling these next two days, and need to leave the site in a known condition (even if the blog portion doesn’t work). When I return I plan to reinstall WP 2.3.2 as a clean install. If that doesn’t work I’ll be downgrading back to the earlier release.

    Thread Starter kurts54321

    (@kurts54321)

    Well, I found the problem. The Event Calendar plugin (version 3.1._rc4) was the cause of the problem. Deactivating the plugin fixed the problem.

    Now I’m left with how to deal with my events. There is a newer release of this plugin, which I may try. Or I may try dealing with event listing differently. I don’t know just yet.

    Thanks to moshu and Otto42 for your assistance!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Problem with non-Root Blog’ is closed to new replies.