didn't know what category to put this in...

could the machine name for a blog entry be changed from blog to blog_entry as it's more representative of what it really is.

a blog (as a whole) - consisting of a title, description, and refrences to blog entries etc is more of what a blog is.
thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

add1sun’s picture

Version: 6.4 » 7.x-dev

Should be for 7.

karschsp’s picture

Issue tags: +Novice

tagging for novice queue.

George2’s picture

if the tables are going to have a constant naming format, ie. singular / plural, and as singular is impossible because user is a reserved word in pgsql, maybe it should be blog_entries ?

Dave Reid’s picture

Title: changing machine name » Change 'blog' machine name to 'blog_entry'
Category: bug » task
jbomb’s picture

Assigned: Unassigned » jbomb
wretched sinner - saved by grace’s picture

Is it worth, at the same time, changing the Human name to Blog Entry also? (for the same reasons?)

jbomb’s picture

changing the human readable name to "Blog entry" as well makes sense to me.

jbomb’s picture

Assigned: jbomb » Unassigned

Thought I might be able to do this this week, but it doesn't look like that's going to happen.

brianV’s picture

From what I can see, the human readable name is already 'Blog Entry'...

JamesAn’s picture

Status: Active » Needs review
FileSize
1.28 KB
4.58 KB

Here are patches for both blog and blogapi.

I don't use blogapi, but I read through the code to try to change the blog_entry machine-readable name. I went with the singular form as the default content types (article and story) are also singular.

Status: Needs review » Needs work

The last submitted patch failed testing.

JamesAn’s picture

Status: Needs work » Needs review
FileSize
2.51 KB
11.71 KB

Hrm.. still new.. I keep forgetting to test these patches. Silly me.

Here are the patches that pass the tests. They include changes to the tests since renaming the machine-readable name affects the permission strings.

Status: Needs review » Needs work

The last submitted patch failed testing.

JamesAn’s picture

FileSize
14.79 KB

Hm. I misunderstood how the patch tests work. The whole patch has to be self-contained. I see now.

This patch modifies blog, blogapi, and the test for dblog - all the areas that have the blog machine-readable name hard-coded in.

George2’s picture

good luck this time james ; )

jbomb’s picture

Status: Needs work » Needs review

Flipping to needs review for test bot.

JamesAn’s picture

Zomg! It passed. I'm excited. XD This is so cool.. ^_^"

Thanks for flipping the status over. I was impatiently waiting for the test bot to make its rounds and didn't realize the status was not set. -.-"

catch’s picture

Looks like a good change.

What happens if you install Drupal 6 and blog module, then upgrade to Drupal 7? Seems like we probably need an update to change the node type from blog to blog_enty in existing installations since so much is hard coded to it.

Dave Reid’s picture

Seems like it should be easy enough to do:

function blog_update_N() {
  $blog_type = node_get_types('type', 'blog');
  $blog_type->old_type = $blog_type->type;
  $blog_type->type = 'blog_entry';
  node_type_save($blog_type);
}
JamesAn’s picture

Simple enough. The patch adds a blog.install with the function: blog_update_7000().

JamesAn’s picture

Status: Needs review » Needs work

Hmm.. when I try to run this 7000 update, it throws an error that field_attach_rename_bundle() doesn't exist when called by node.module's node_type_save, line 584. Any ideas?

catch’s picture

I don't think there's a guarantee that all modules are enabled during update.php. Not sure if that's being worked on at the moment or not though.

JamesAn’s picture

Status: Needs work » Postponed

Makes sense. field_attach_rename_bundle() is in field.autoload.inc, which is loaded on field_init(). I noticed a TODO note for D7 there:

TODO D7: Determine which functions need to always be "loaded", and put autoloaders for them into field.autoload.inc. Also figure out how to make this work during installation.

If it doesn't work during installation, maybe it doesn't work during updates yet either. I don't exactly know how drupal install and update work.

Should this be postponed until this TODO issue is resolved? And has an issue be filed for the TODO?

JamesAn’s picture

Status: Postponed » Needs work

Resuming. The TODO in field_init() was resolved in #439236-10: field_attach_create_bundle() undefined when creating a content type on hook_update():

Okay, so how about not using hook_init() at all and just explicitly including the required files whenever field.module is loaded?

JamesAn’s picture

Status: Needs work » Needs review
FileSize
13.87 KB

Let's see if this goes. A bunch of changes to reroll.

Like before, blog.install is added with a few changes, but the error that postponed this issue no longer occurs. I think I added the file in correctly.

Hopefully, testbot will be happy.

catch’s picture

Status: Needs review » Needs work

I think it makes sense to do this, but the patch needs an upgrade function for existing sites with blog module installed.

JamesAn’s picture

Status: Needs work » Needs review
FileSize
13.98 KB

Oops. I didn't correctly add blog.install into the patch. Here it is again.

Dries’s picture

Complete the following sentence: "I'm going to write a blog ...". Should we use "blog post" or "blog entry"? I'd be inclined to say "blog post" but maybe "blog entry" is the norm.

catch’s picture

I'd probably say blog post first too, but we use post to mean a lot of things and I have small mission to stop using it as a noun in core #431612: Stop using post as a noun, whereas entry currently has a lot less chance for confusion.

JamesAn’s picture

I have the habit of saying "post" as well, but I agree that it's vague and overused. An "entry" seems to be more precise as an entry is part of something (e.g. a diary, journal, or blog entry), whereas a "post" doesn't give the noun any more definition.

"Post" is also currently confused with "content" and "node", as they all seem to be used interchangeably.

So I still think "blog entry" is more appropriate.

Status: Needs review » Needs work

The last submitted patch failed testing.

brianV’s picture

Status: Needs work » Needs review

Setting to 'needs review' - testbot was broken.

langworthy’s picture

Here's what Derek Powazek has to say.

People! A "blog" is a container of blog posts. An individual entry on that blog is called a "post." Please make a note of it.

While I understand the noun/verb confusion over post, I don't see that same confusion with blog post, which I believe is more familiar than blog entry.

As Derek describes, the name of the entry is post. Considering the noun/verb confusion, this isn't perfect, but IMHO it's the best option.

karschsp’s picture

I am leaning towards "blog post" as well, assuming we can remove "post" from elsewhere in core as catch mentioned in 29 #431612: Stop using post as a noun. I'm not sure if this patch is necessarily dependent on that, but it would be nice if they both got in.

michaelfavia’s picture

+1 for blog post. Catch's personal quest to rid us of "post" is really more about ridding us of the misuse of the word. people were using it as the generic descriptor of content because it was all they could think of besides "node" and they new that wasn't going to fly from a usability standpoint. :). I think htis is a proper use of the term as well.

NaheemSays’s picture

An alternative approach could be to remove blog from being a special node type.

I attempted something similar in #470580: Allow multiple content types for user blogs but I do not have the skills to take that any further.

JamesAn’s picture

Status: Needs review » Needs work

I like the idea of allowing blogs to support multiple content types. I took a peek at #470580 and it's a whole lot more involved than I've time for, at the moment.

I'll push through this "blog post" patch first and then I'll look at that.

michaelfavia’s picture

@dries: mind weighing in with your preference if one at all for this?

I too value the idea behind multiple content types in a "blog" but I also agree that we don't want them all available. There seem to be two options then:

1. Define "blog content types" across all users as a system variable under "site configuration". This would allow admins to designate bloggable content and it would all be automatically posted to the blog streams.

2. Add a "Add to blog" checkbox field to all content types letting users determine which content should end up in their blog themselves. This could be added in the publishing options fieldset or the like.

I favor option 1 as the easiest option for both the end user and for implementation sake. I'm all for presenting users with fewer options and checkboxes at authoring time. more complex use cases could develop in contrib.

Little direction and ill write it.

NaheemSays’s picture

In the linked patch (comment 36), it is possible to choose which content types are allowed to appear in a blog.

That allows to choose what content types a user can add to the user blog, but it can probably be extended (to fix the test exceptions and) to have a default on/off setting per content type too.

JamesAn’s picture

Status: Needs work » Needs review
FileSize
13.96 KB

This patch rerolls the one from #27 and changes the machine name type to "blog_post" instead.

Status: Needs review » Needs work

The last submitted patch failed testing.

JamesAn’s picture

Title: Change 'blog' machine name to 'blog_entry' » Change 'blog' machine name to 'blog_post'

Changing title to reflect the change in the machine name.

rschwab’s picture

Version: 7.x-dev » 8.x-dev

+1 for 'blog_post'. I agree 'post' is ambiguous, but 'blog_post' is crystal clear. However, I think this breaks the API freeze for 7x.-dev.

Jody Lynn’s picture

+++ modules/blog/blog.install	10 Jul 2009 18:18:51 -0000
@@ -0,0 +1,18 @@
+  $blog_type->type = 'blog_entry';

Should be blog_post

Powered by Dreditor.

deekayen’s picture

Project: Drupal core » Blog
Version: 8.x-dev » 8.x-2.x-dev
Component: blog.module » Code
a_thakur’s picture

Status: Needs work » Needs review

The blog module is removed from core in d8. This issue should be closed.

a_thakur’s picture

a_thakur’s picture

Status: Fixed » Needs work

Sorry my bad. I didn't check the issue properly.

a_thakur’s picture

Status: Needs review » Fixed

+1 for blog post.

blog_post is clear.

rschwab’s picture

As far as I can tell, the machine name is still blog.

jasdev.moun’s picture

Assigned: Unassigned » jasdev.moun

+1 for "blog_post".

jasdev.moun’s picture

Assigned: jasdev.moun » Unassigned
opdavies’s picture

Assigned: Unassigned » opdavies

I'll sort this. :)

acabouet’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Blog module is removed in D8 core. Closing this.

chris_hall_hu_cheng’s picture

Status: Closed (won't fix) » Active
Issue tags: -Novice

I have re-opened this issue as the blog module although no-longer in D8 Core, is now in contrib.

chris_hall_hu_cheng’s picture

Assigned: opdavies » chris_hall_hu_cheng
Status: Active » Fixed

Inadvertently fixed this one whilst getting the tests to work etc. node type blog makes no sense for a individual post.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.