WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Admin manage posts link (13 posts)

  1. Drewminstry
    Member
    Posted 6 years ago #

    Running wordpress 2.3 as a small CMS with a blog as the frontpage.
    in the admin section, I go to "manage posts":
    http://myblog.com/wordpress/wp-admin/edit.php?post_status=draft&author=1
    That's perfect for the first page, but at the bottom of that page is a link to "previous entries" which points to:
    http://myblog.com/blog/wordpress/wp-admin/edit.php?post_status=draft&author=1&paged=2
    a 404!
    You see that an extra "blog/" has sneaked in there

    Myblog is "www.ministryofmanipulation.com"
    I'm installed in directory: myblog.com/wordpress
    my blog url is: myblog.com/blog
    but the rest of the cms appears at myblog.com
    I'm not a big PHP user, and the fault is more likely to be with my settings or hacking than with the new 2.3 code.
    What have I done wrong?
    Any suggestions or questions regarding the blog setup?
    thanks
    Drew

    PS: Also here in the wordpress support forum, go "Add new topic" and the "what version of wordpress are you using?" box above the text entry box doesn't give me 2.3 as an option.

  2. Jeremy Clark
    Moderator
    Posted 6 years ago #

    Your url options are messed up. Go to the Options > General > and change the url to match your directory structure.

  3. Drewminstry
    Member
    Posted 6 years ago #

    edited original post for clarity

  4. Drewminstry
    Member
    Posted 6 years ago #

    Jeremy Clark, thank you for answering, can you elaborate?
    my current WordPress address (URL): http://ministryofmanipulation.com/wordpress
    and Blog address (URL): http://ministryofmanipulation.com/blog
    this puts every page on the site is currently where I'd like it to be! I've tried *many* variations of the above, and i'm not clear what you are suggesting should be the alternative.

    Background info:
    The blog was historically at: .com/blog/
    and all the posts are at: .com/blog/postname
    and pages are at .com/pagename
    Which is all good for our small CMS.
    Having recently eliminated an old front page, the blog is still at .com/blog/ but you probably viewed it at: .com/index.php.*
    which nowdays defaults to the blog while we decide if we should reinstate the old front page.
    There are a few quirks to this install!
    Smiles
    Drew

    *Note: Id love it if that was a clean URL without the index.php, but I'll solve that another day.

  5. Jeremy Clark
    Moderator
    Posted 6 years ago #

    After you editing the OP I can see that there is a different problem. Your settings look correct. This might be a bug. You might want to have a look around the trac and see if it has been report there.

  6. Drewminstry
    Member
    Posted 6 years ago #

    Thank you. I couldn't see anything similar there.
    I'll hold out till the morning before reporting, to see if anyone else has anything to add.

  7. MichaelH
    Member
    Posted 6 years ago #

    Making these assumptions:
    1. You want visitors to see your WordPress blog at http://ministryofmanipulation.com
    2. You actually have the WordPress files in a folder called blog, and the blog folder resides in your web-root folder.

    Your WordPress address (URL) should be http://ministryofmanipulation.com/blog

    Your Blog address (URL) should be http://ministryofmanipulation.com

    You would place an index.php file in your web-root folder with the following contents:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./blog/wp-blog-header.php');
    ?>

    Explanation:
    Even though the actual WordPress files reside in a sub-directory, with an index.php file in your webroot, and the Options->General admin page Blog address (URL) is set so that WordPress acts as your main page. This particular setup is described in Giving_WordPress_Its_Own_Directory.

  8. Drewminstry
    Member
    Posted 6 years ago #

    Micheal H. Huge, thanks for that, inspired by your post - tentatively I'll say that I think its now fixed. but perhaps not quite as simple as you suggested!
    I say tentatively, because I remember that I had the setup described below back in version 1.5-2.2(ish) when I made the current version of the site and after a few days I found that it didn't work... but I can't remember why. Which was why, having tried several alternatives, I ended up with the weird set-up described in OP.
    ---------------------------------------
    I'll describe what I have done (and seems to work now) for future reference:

    My WordPress address (URL) is http://ministryofmanipulation.com/wordpress (to match the install directory)
    My Blog address (URL) is now (at your suggestion): http://ministryofmanipulation.com
    Although I actually want my blog to appear at "http://ministryofmanipulation.com/blog/"
    Because it was historically located there with an alternative static front page at root.
    (aside:I'm not 100% convinced that I want the blog appearing at the root url long term. I know that in the short term this creates a slightly bum set-up where my blog is at "/blog/" and "/index.php" but I'll deal with fixing that headache later!)
    But I'm running as a small CMS and have 50 or so static pages, which I want to be at URL "/pagename" (which they were, and still are with the change in blog address - good so far).

    By removing the "/blog" from the blog url, as you suggested, all my posts move from "/blog/postname/" to "/postname/". Not good, lost all my old links. So to fix that, I have also adjusted permalinks - custom name to "/blog/%postname%/" (previously just "/%postname%/")
    same with category base now "/blog/category" (previously just "/category")

    Now I'm missing one important page "/blog/" ! which is where most of my visitors bookmarks bring them.
    I solved this easily before, by having a blog PAGE called "Blog" with no content in the page, but with its own page template to make it look like a blog page. with that (www.ministryofmanipulation.com/blog/) looks identical to (www.ministryofmanipulation.com/index.php)
    Ta da, that appears to have put everything back in place, and fixed the original problem.
    (aside: I had unsucessfully tried to solve this last item by adding a line in htaccess:
    Redirect permanent /blog http://ministryofmanipulation.com/index.php
    Which of course breaks the URL link to every blog page by removing "/blog" from it, Doh.
    I'm sure that if I understood rewrite rules a bit more I could have cleverized this, but no worries, above works ok.)

    So, my whole site is at the same urls it was before, and this has solved the original problem with the admin manage posts link. Thanks again for the suggestion.

    It's not perfect, I need to decide where the blog should be. and then I'll settle on one of those locations.
    But first I'll solve some more important "wp_post2cat" problems that have arisen with 2.3 :(

  9. Drewminstry
    Member
    Posted 6 years ago #

    And a day later I remember what the problem with that it!
    It breaks the preview. So now blog is functioning, but I cannot preview posts.

    I'd say that the original problem is resolved, but has created a new problem :(

  10. Drewminstry
    Member
    Posted 6 years ago #

    It also breaks the search function!
    ok. I've gone back to my previous set-up (described in OP) which works for everything on on the site.
    except the admin link problem the OP.

    I found an old thread with people reporting the same problem on older version of WP:
    http://wordpress.org/support/topic/103325?replies=3#post-625375
    And they seem to have a very similar set up to me.

    Also I've tracked down the problem a bit:
    In "edit.php" I have: "<?php next_posts_link(__('« Previous Entries')) ?>" which is generating the wrong URL.
    and that is coming from wp-includes/link-template.php
    But more than thant is too complex for me.

    Similar threads that might be useful, and suggest solutions some that I tried and didn't work and some that hurt my brain:
    http://wordpress.org/support/topic/94419?replies=15
    http://wordpress.org/support/topic/106834?replies=13#post-625386

    Any suggestions?
    Drew <-still talking to myself

  11. Drewminstry
    Member
    Posted 6 years ago #

    Moved my installation to the root
    and set
    my blog url is: myblog.com/blog

    Fixed the problem and fixed all other problems.
    My guess is that there are problems with the WP code that mean that it's not reliable if installed in a subdirectory, and running anything other than a standard install.
    Lesson learnt - If you want to make a WP CMS, install into the root. even if the codex tells you that you can install in a sub-directory.

  12. moshu
    Member
    Posted 6 years ago #

    For the sake of future users who will come to this topic via Search... I need to add that the "lesson learnt" is completely false.

    You can install WP in any subdirectory or subdomain, wherever you want. (Contact me if you want tens of examples!)

    Even the method described above by MichaelH (and known by the name "Giving WP its own directory) works perfectly for everybody else, when:
    a) you have WP in a subdir
    b) you want to display it in the root.

    However, neither the documentation, nor anybody in this thread ever said that you can change arbitrarily the two URI values in the Options, like
    example.com/wordpress
    and
    example.com/blog
    No, this will NOT work.

  13. sparkalyn
    Member
    Posted 6 years ago #

    I ran into this problem because
    my WP URL was set to http://website.com/wordpress and
    my blog URL was set to http://www.website.com

    adding the "www" prefix to the WP url solved it for me.

Topic Closed

This topic has been closed to new replies.

About this Topic