• Resolved morpheus3k

    (@morpheus3k)


    hi, guys!

    I’m using WP 2.1 with a nice theme and some plugins that I installed for the first time today.

    My problem is that some of the links are not working. For example: previous or next entries are not working. that won’t be too critical, but some admin-functions have the same problem. When I try to “update options” wp trys to open
    http://blog.helowin.com/blog/wp-admin/options-general.php?updated=true
    instead of http://blog.helowin.com/wp-admin/options-general.php?updated=true
    (the /blog/ is extended to the adress which doesn’t belong there)

    I tried to deactivate the plugins and changed the theme to the original wp-theme, but noting of these steps solved that problem.
    I also searched on this site, but didn’t find an answer.

    Can anyone help me?

    Thanks
    Martin

Viewing 13 replies - 1 through 13 (of 13 total)
  • Check the 2 URI values in admin > Options > General.
    Also, if you tried to “trick” WP saying you have a subdomain at blog.example.com but you are redirecting it to example.com/blog – you will always have troubles.

    Thread Starter morpheus3k

    (@morpheus3k)

    Thanks for the answer, but I have the correct URI in those fields:
    http://blog.helowin.com

    In most cases there isn’t any problem, but in some cases like “previous”, “next entries” or some options in wp-admin it occurs.
    The subdomain isn’t redirecting…

    So there isn’t a helpful solution for that problem? The only way to fix this issue is to migrate my wp from my subdomain to my main domain?

    You should have mentioned you are using a plugin for “pagination”. Deactivate it and check if it works. Or, switch to another theme (like classic or default) to see what happens.

    Thread Starter morpheus3k

    (@morpheus3k)

    Thanks for the fast reply!

    I had mentioned that I use plugins, but deactivating doesn’t help. I tried now to use the default theme of wp, but that doesn’t help, too.

    The strange thing about that behavoir is that the problem occurs in the admin-section, too!

    Thread Starter morpheus3k

    (@morpheus3k)

    Now I have updated to 2.1.1, but it hasn’t changed anything… πŸ™

    Thread Starter morpheus3k

    (@morpheus3k)

    Isn’t there any solution?
    Has anyone else that problem?

    Same here:
    Everything is ok on main page. Link to older post is
    http://intersezioni.awardspace.com/index.php?paged=2

    but at the bottom of this page links to older and newer posts are:

    http://intersezioni.awardspace.com/http://intersezioni.awardspace.com/index.php?paged=3
    http://intersezioni.awardspace.com/http://intersezioni.awardspace.com/index.php

    instead of
    http://intersezioni.awardspace.com/index.php?paged=3
    http://intersezioni.awardspace.com/index.php

    Is there a way to avoid this problem?
    Do I have to edit something or it’s a server issue?
    I’m running WP 2.1.2 with no plugins and this problem occours with any template.

    Thanks in advance.

    Hello!
    I’m glad I found a solution.

    WordPress 2.0.4

    Open wp-includes/template-functions-links.php

    Line 440
    Change

    // showing /page/1/ or ?paged=1 is redundant
    	if ( 1 === $pagenum ) {
    		$qstr = str_replace('page/1/', '', $qstr); // for mod_rewrite style
    		$qstr = remove_query_arg('paged', $qstr); // for query style
    	}
    	return $qstr;
    }

    to

    // showing /page/1/ or ?paged=1 is redundant
    	if ( 1 === $pagenum ) {
    		$qstr = str_replace('page/1/', '', $qstr); // for mod_rewrite style
    		$qstr = remove_query_arg('paged', $qstr); // for query style
    	}
    	# new line for pagelinks
    $qstr = 'http://www.yourdomain.com/?' . $page_querystring . '=' . $pagenum;
    
    return $qstr;
    }

    WordPress 2.1.2

    open wp-includes/link-template.php

    Line 441
    Change

    // showing /page/1/ or ?paged=1 is redundant
    	if ( 1 === $pagenum ) {
    		$qstr = str_replace('page/1/', '', $qstr); // for mod_rewrite style
    		$qstr = remove_query_arg('paged', $qstr); // for query style
    	}
    	return $qstr;
    }

    to

    // showing /page/1/ or ?paged=1 is redundant
    	if ( 1 === $pagenum ) {
    		$qstr = str_replace('page/1/', '', $qstr); // for mod_rewrite style
    		$qstr = remove_query_arg('paged', $qstr); // for query style
    	}
    	# new line for pagelinks
    $qstr = 'http://www.yourdomain.com/?' . $page_querystring . '=' . $pagenum;
    
    return $qstr;
    }

    Obviously if you have a subdomain you’ll have to add:

    # new line for pagelinks
    $qstr = 'http://yoursubdomain.yourdomain.com/?' . $page_querystring . '=' . $pagenum;

    Thanks to article who pointed me to the right direction.
    It’s not a definitive solution, once you change your domain you will have to edit your url again but at least it works.

    Have a nice day!

    Thread Starter morpheus3k

    (@morpheus3k)

    Thanks cuca, I will try it.

    But it would be great, if someone of the WP-Team could find the problem itself, because most of wordpress works fine except the “previous / next entries” link and the “option” redirection within the admin panel.

    I hoped it had been fix in the newest version (2.2.2). I even tried to set up wordpress with a new mysql database, but the some problems appeared.

    Thanks all for your help
    Martin

    Thread Starter morpheus3k

    (@morpheus3k)

    I’ve found “the bug”…

    $qstr = $_SERVER['REQUEST_URI'];

    results: /blog/index2.php
    (instead of /index2.php)

    It seems this is not actually a wordpress bug. There 2 options:
    Find out, why this is happening, or change the way wordpress gehts the URL πŸ™‚

    Thread Starter morpheus3k

    (@morpheus3k)

    I saw that this will be fixed in WordPress 2.3.

    If someone needs this fix now, you find it here:
    http://www.helowin.com/download/link-template.php.txt
    Just rename it to link-template.php
    and copy it into /wp-include/

    best regards
    Martin

    Haaalp.
    Could someone explain that in english for WP2.3?
    I have a very similar sounding problem:

    Whole site works fine, (including next and prev links on front end, but problem with Admin “manage posts”
    bottom of 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

    It has an extra “/blog” in it.

    I started a thread here:
    http://wordpress.org/support/topic/135854?replies=9#post-622941
    with all my install details in, I’m not sure if its identical to your problem.
    I tried the link-template.php above, that just broke the next and prev links on my main blog!
    Thanks
    Drew

    I’ve got the same problem, so I guess I’ll just have to edit the URL manually to get where I need to go until this bug is fixed. :-/.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘wrong previous / next links and options-updates’ is closed to new replies.