Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
blog.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2007 at 00:42 UTC
Updated:
24 Jan 2008 at 22:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
chx commentedMenu definiton badly botched. Also, user_current_load contained some old code, I fixed that as well. There is no real need for the special access for this menu entry as the blog_page_user contains the necessary checks.
Comment #2
webchickTested and works as advertised. This is a re-roll that fixes a notice when viewing another user's blog, by re-working the output in blog_page_user() to run it through theme('item_list') rather than hard-coding the ul and lis.
Comment #3
snufkin commentedTested with anonym, user1 and standard user. It also corrects the bug that anonym was not allowed to view user blogs, even though access content is set for anonymous.
Comment #4
gábor hojtsy- Hm, the change in user_current_load() might be a bit far reaching. Where is that used?
- It is also interesting that "edit own blog" is the permission to create new blog entires?! Really? Aren't there specific permissions added with the blog node type to let blog post creation?
It would be great to clear these two questions up.
Comment #5
desbeers commentedhttp://drupal.org/node/176759 (User-specific blogs pages and feeds not accessible) is more or less a duplicate of this issue. Don't know wich one to mark as duplicate; both have patches attached. So I just mention it; to be on the safe side. Have no time to compair the patches now, but hopefully I can do later.
Comment #6
chx commentedthe user_current is used in the my account link and this is necessary as the current code is waaaaay outdated, it's simply a remnant of early menu system code, it's before to_arg calls was introduced. blog permission redux is not in the scope of this issue.
Comment #7
desbeers commentedFeeds for users are broken too. Attached the same patch as from webchick (that was working well), but now also with a working user-feed.
Leaves a menu-issue left: when someone has no 'edit own blog' permission; the 'my blog' link will still appear. Also; before if you visited your own blog-page the title was 'my blog' and now is always 'username's blog'.
But the menu items should be a separated issue; it's not about user posts.
Comment #8
eaton commentedNope. Those are permissions explicitly added by node.module for admin-created content types. modules that define their own content types can set their own permissions at will...
Comment #9
desbeers commentedModules that define their own content types HAVE TO set their own permissions... I tried to delete all permissions set/checked in blog.module in hope that node.module will take care of it but that's not the case (would be very nice).
Now, the 'edit own blog' permission is all or nothing at all. 'create', 'update' and 'delete' all depend on it; so 'manage own blog' would be a better name or even better; node.module should take care of that (the 'standard' permissions').
But again, this is not part of the original issue (as Chx and I told). Let's first fix the 'user-pages' and then look at menu/access issues.
Comment #10
gábor hojtsyOk, now I see we deal with %user_current which translates to the load function. BUT now I don't see what is the difference between user_current_load() and user_load() after the patch? I looked into both and user_load() seem to return FALSE equally if the argument is not numeric or not an array, which is basically what happens here. So why do we need both?
Agreed, that permissions should be dealt with in another issue.
Why is this a problem? Then the page is a view page, right?
Well, because there is an explicit set title in the patch, this can be overcome by comparing $account to $user and acting on that.
Also, I noted that in the feed fix, we should write
url('blog/' . $account->uidinstead ofurl("blog/$account->uid"(see how the code does this above in the patch).Comment #11
salvisYes, but it's always empty. Users who don't have 'edit own blog' permission don't have a blog, and they shouldn't have a 'my blog' menu item either.
I like seeing my content in the same context that other users are seeing it. For example, I might want to print out a blog entry and give it to someone else.
Note: this is different from 'My account', which is a) not content and b) destined primarily to myself rather than to the outside.
Comment #12
desbeers commentedI corrected the code-style for the feed-update; my mistake.
I agree that I prefer the 'nam's blog' title; also for my own page.
I will work on the permission/menu problems and will create a differend issue for that; leaving this just to the 'user-page' problem.
Comment #13
catchapplied patch (fine with a couple lines offset), enabled blogs, posted an entry.
/blog is fine
/blog/1 narrows down and I agree "username's blog" should be used whoever's looking at it.
/blog/1/feed also works as expected.
RTBC.
Comment #14
catchsorry, just to add it works for admin created additional user as well.
Comment #15
gábor hojtsyThanks for the patch and for the tests, committed.
Comment #16
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #17
GreenJelly commentedIs their a patched blog for 5.X? Where can we get it?
Thanks
GreenJelly