Recent Topics

1 Feb 13, 2007 20:16    

My b2evolution Version: 1.9.x

Depending on how I access my blog, I cannot edit posts.

If I access my blog at (for example) www.domainname.com even logged in I can see the blog as normal but not see the Edit this post option.

If I access my blog directly where it is at www.mydomain.com/subdirectory I can see the edit posts option for all posts.

I know it's something stupid. Please explain, point and laugh.

2 Feb 13, 2007 23:46

In the backoffice under your blog settings you should have a section where you set a "base url" for your blog(s). I would double check this setting and maybe play around with it some. The cookie that is set when you are logged in is based upon the baseurl and so the cookie might not fly into action unless it sees the url it's looking for.

3 Feb 14, 2007 09:25

Right now I'm stumped.

1. If I go to www.mydomain.com and log in I'm fine until I view comments (or click on any links.) And have to log back into backoffice anytime I go there.

2. If I go to www.mydomain.com/subdirectory (where my blog is located) and log in, I see that I'm logged in and the edit posts option is under all posts like it should be. And I don't have to relog in to go to backoffice.

All links have the /subdirectory in them, like they should and this is probably why #1 is a problem. *shrug* I know it's something stupid, I just know it...

4 Feb 15, 2007 07:47

Could the problem be I need a stub file? So that no matter how I access the blog at www.mydomain or www.mydomain/subdomain I can log in just fine and not lose being logged in?

6 Feb 15, 2007 17:48

Has anyone come across this login problem?

7 Feb 15, 2007 19:12

You never said what your baseurl was set as and if you tried changing it. You may also want to delete the cookie that your browser has and then try going to www.mydomain.com and seeing if it works after logging in.

I'm guessing that your baseurl is set to www.mydomain.com/subdirectory when it should perhaps be set to www.mydomain.com.

9 Feb 15, 2007 20:14

Your $baseurl needs to be where you have b2evolution installed, so if you have it installed in /subdir/ then that's what your $baseurl should say (and don't forget you need the trailing slash). That's also the path you'll have to follow to find your back office because that comes from yourdomain/yourpath/admin.php - and "yourdomain/yourpath/" happens to be your $baseurl value.

The www thing is just another pain in the butt. Sometimes servers still expect a domain to have it, sometimes they don't. Personally I don't like it so I don't use it. If it's in your $baseurl then that bit will be included in all internal links b2evolution generates AND will be part of your cookie.

Anyway it makes sense that if your installation is in /subdir/ and your $baseurl has /subdir/ at the end of it then you won't be able to login, or be recognized as logged in, without it.

10 Feb 16, 2007 07:09

Thanks Ed. The real weird thing is when my blog was in www.mydomain/blogs I never had this login/stay login problem I've described. I was using 0.9.1. We recently upgraded to 1.9.x (and changed the subdir the blog is in to avoid bots that were attacking us) and then viola this login problem I've never had before. The only changes is the version we are running and the subdir it's in now. It was always in a subdir and no matter how I accessed it via www.mydomain.com/blogs or www.mydomain.com I never had login issues at all. Trying to figure out what's the deal affecting it.

11 Feb 16, 2007 09:59

This is possibly a cookie problem. Crack open conf/_advanced.php and have a play with the following section of code :-

/**
 * This is the path that will be associated to cookies.
 *
 * That means cookies set by this b2evo install won't be seen outside of this path on the domain below.
 *
 * @global string Default: preg_replace( '#https?://[^/]+#', '', $baseurl )
 */
$cookie_path = preg_replace( '#https?://[^/]+#', '', $baseurl );

/**
 * Cookie domain.
 *
 * That means cookies set by this b2evo install won't be seen outside of this domain.
 *
 * We'll take {@link $basehost} by default (the leading dot includes subdomains), but
 * when there's no dot in it, at least Firefox will not set the cookie. The best
 * example for having no dot in the host name is 'localhost', but it's the case for
 * host names in an intranet also.
 *
 * @global string Default: ( strpos($basehost, '.') ) ? '.'. $basehost : '';
 */
$cookie_domain = ( strpos($basehost, '.') ? '.'. $basehost : '' );

If it was me I'd probably be trying $cookie_path = '/'; ;)

¥

12 Feb 16, 2007 19:27

YAAAABBBBAAA! How dare you fix such a vexing problem so $%^#@ing easily! :p :lol: :p

Yabba-dabba-do! Mucho thanks!

14 Feb 20, 2007 01:26

thanks a lot for this. This solved a similar problem I had when usinh subdomain with b2evo.

Thanks!

15 Feb 21, 2007 17:35

Yabba is a genius. There are so many files, variables and options in b2 that unless you know exactly what you're looking for sometimes, you're hosed.

Now if Yabba did not come up w/the answer, I'd still bestow the genius title albeit with a hint of mockery :)

16 Feb 21, 2007 17:40

lol, wow, wonder what I could achieve if I wasn't a blonde? :P

¥

17 Feb 21, 2007 17:46

Don't wonder too long ... you might hurt yerself. :p

18 Feb 21, 2007 17:51

No worries, my brain has an auto-cutoff switch that kicks in every 1,000,000th of a second :D

¥


Form is loading...