Problem/Motivation

Splitting off from #425478: Choose one: "content" or "node".

There are several places in core where we use post as a noun "No posts available" for example. 'Post' is a horrible, horrible way to describe nodes/content in Drupal because it maps more closely to a specific content type (post vs. page) than an individual item and it's been shown to cause confusion in the past - like the 'post settings' admin page.

So this issue should just be about removing those occurrences from core. Replacements are going to be dependent on context, but generally just 'content' or 'piece of content' ought to do. If someone takes this on, please post up any difficult places - since that's part of the point of having this issue. Anyone wanting to use 'node' instead of 'piece of content' please post over at #425478: Choose one: "content" or "node" - all we want to do here is remove 'post' and standardise as much as possible on what we have already.

Steps to reproduce

Proposed resolution

Change usage of post in form.inc, see #69

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-431612

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

webchick’s picture

Hell yes. Subscribe.

keith.smith’s picture

Me too. I intend on working on this, but if somebody beats me to it, that's fine also.

kresimir’s picture

Assigned: Unassigned » kresimir
taz88ny’s picture

subscribe

DeeLay’s picture

subscribe

kresimir’s picture

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

RoboPhred’s picture

Assigned: Unassigned » RoboPhred

Grepped up a list of occurances, will start knocking them off.

RoboPhred’s picture

Status: Active » Needs work
StatusFileSize
new38.39 KB

Here is the initial list of usages (without any changes). I did not include function names or code comments.

Some interesting cases I have found:

For the numerous lines such as:
"The comment module allows visitors to comment on your posts"
"comment on content" sounds odd to me, although no one on irc had a problem with it. I will use "comment on %type" where I can, but many of these are not in the context of a specific content type.

"Returns a list of the most recent posts in the system."
Again, "recent content" doesn't seem right, or accurate in this case. The specific quote came from the blog api, where it can be replaced by "recent blog entries", but the "recent posts" phrase is also used in aggregator and suchlike, where it can apply to comments as well.
In short, "content" doesn't imply comments. What word should replace "posts" in that context?

There is also one permission that applied: "view post access counter".

catch’s picture

Aggregator should probably use 'feed items'.

Comments should probably use 'comments'.

Permissions - we can either leave the renaming for a followup issue - or if you want to try the upgrade path there's several examples in system.install

It'd probably be handy to try 'comment on content' and 'most recent content' and see if it looks bad - if it does then we go back to the other issue and brainstorm - but having things consistent, even if that means a couple of awkward phrases here or there seems like a decent first step.

RobPhred - could you roll these changes into a patch? There's instructions at http://drupal.org/patch - or if you ask on irc there's plenty of people who can help.

RoboPhred’s picture

That is just a preliminary list, I have not started changing them yet; I will make a start on that.

RoboPhred’s picture

StatusFileSize
new33.94 KB

Here is the start of the patch. It does not contain all of the instances and I did not test it yet.

In the book module, I added the actual content type in place of "post". However, I am not sure if I am doing it right:

drupal_set_message(t('The post has been added to the selected book. You may now position it relative to other pages.'));

to

drupal_set_message(t('The !post has been added to the selected book. You may now position it relative to other pages.', array('!post' => $node->type)));

I am emulating what I saw another module do in a similar situation. Should "!" be used on the node type, or should it still be passed through check_plain with % or @. Is showing the machine name acceptable, or should it pull the human name for the type?

There is a strange line in the schema for comment module:

'description' => 'Maintains statistics of node and comments posts to show "new" and "updated" flags.',

"comments posts" looks like a mistype to me. Would changing this break something? Is an updater needed for changing the description?

Forums use "post" to describe user comments by convention, and "content" would probably just add confusion to it. What say you?

Bojhan’s picture

I will review this later on, can you supply the instances where you did not change it yet?

RoboPhred’s picture

Some time ago I lost all the work I did on this, and forgot to say so. I apologize, I am not working on this anymore. If no one else picks it up before then, I might take it up again (time permitting).

RoboPhred’s picture

Assigned: RoboPhred » Unassigned
RoboPhred’s picture

Assigned: Unassigned » RoboPhred

Bah, I had this issue locked for too long and prevented more work, so its only fair that I complete what I took up. I will put this as my first priority and grind it out asap.

RoboPhred’s picture

Status: Needs review » Needs work
StatusFileSize
new98.18 KB
new30.72 KB

That took a lot less time than I was taking before...

I did not change any permissions, and left most of the "post" mentions in the forum module, as that is the most often used word among other forums.
Some comments were updated.
I reworded a few output sentances on the lines I was working with as well. Not all rewordings were nessescary for the change, but it makes them more readable.

Something to check: a few added uses of "content" may not make sense in translation.

Menu link titles and one menu path was changed in the tracker, and the tests were updated to reflect this.

RoboPhred’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

RoboPhred’s picture

Status: Needs work » Needs review
StatusFileSize
new103.93 KB

Forgot -p

The last submitted patch failed testing.

flickerfly’s picture

I tried to apply the patch in #20 against D7 and failed. I tried -p0 and -p1. 1 was required to find the files and gave me a whole bunch of fresh new *.rej files to share. :-)

I'm guessing core has changed a lot since Sept. For example, this patch includes string changes for the upload module.

webchick’s picture

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

This would've been nice to do, but I'd prefer not to make anymore non-critical string clean-ups in Drupal 7 anymore, to help ease translations.

Freso’s picture

I love this, and I hope it gets in early once development on 8.x opens. :) So, to help this along, here's a quick review of the latest patch:

- * a forum topic, weblog post, story, collaborative book page, etc.
+ * a forum topic, weblog entries, story, collaborative book page, etc.

As it's singular, it should probably just be "weblog entry".

Your site content can be created in (and translated to) any enabled language, and every content may have a language-appropriate alias for each of its translations.

Probably "every piece of content".

+ drupal_set_message(format_plural($update_count, 'Changed the type of 1 content from %old-type to %type.', 'Changed the types of @count content from %old-type to %type.', array('%old-type' => $info->old_type, '%type' => $info->type)));

+ drupal_set_message(format_plural($update_count, 'Changed the type of 1 content from %old-type to %type.', 'Changed the types of @count content from %old-type to %type.', array('%old-type' => $info->old_type, '%type' => $info->type)));

Again, "piece of" and "pieces of" content.

+ $caption .= '<p>' . format_plural($num_nodes, '<strong>Warning:</strong> there is currently 1 %type content on your site. It may not be able to be displayed or edited correctly once you have removed this content type.', '<strong>Warning:</strong> there are currently @count %type content on your site. They may not be able to be displayed or edited correctly once you have removed this content type.', array('%type' => $type->name)) . '</p>';

"X piece(s) of %type content"?

+    watchdog('content', 'Deleted @count contents.', array('@count' => $count));
+    drupal_set_message(t('Deleted @count contents.', array('@count' => $count)));

"Content" can't be counted (grammatically, anyway), so we need "pieces of content" in both places.

+ $output = '<p>' . t('The node module manages content on your site, and stores all content (regardless of type) as a "node" . In addition to basic publishing settings, including whether the content has been published, promoted to the site front page, or should remain present (or sticky) at the top of lists, the node module also records basic information about the authors of the content. Optional revision control over edits is available. For additional functionality, the node module is often extended by other modules.') . '</p>';

stores all content (...) as a "node" . -> "stores all content (...) as "nodes"."

+ $output .= '<p>' . t('Though each content on your site is a node, each content is also of a particular <a href="@content-type">content type</a>. <a href="@content-type">Content types</a> are used to define the characteristics of content, including the title and description of the fields displayed on its add and edit pages. Each content type may have different default settings for <em>Publishing options</em> and other workflow controls. By default, the two content types in a standard Drupal installation are <em>Page</em> and <em>Story</em>. Use the <a href="@content-type">content types page</a> to add new or edit existing content types. Additional content types also become available as you enable additional core, contributed and custom modules.', array('@content-type' => url('admin/structure/types'))) . '</p>';

Though each content on your site is a node, each content is also of a particular content type. -> "Though all content on your site are nodes, each piece of content is also of a particular content type."

+ return '<p>' . t('The revisions let you track differences between multiple versions of content.') . '</p>';

Is the mentioning (ie., its placement on a site) of this in general or related to a/one "post"/piece of content? If it's "in general", the wording is OK, if it is in relation to a piece of content, it should rather be just that "of a piece of content."

+ $output .= '<p>' . t("The <em>Recent content</em> page is available via a link in the navigation menu block and displays new and recently-updated content (including the content type, the title, the author's name, number of comments, and time of last update) in reverse chronological order. Posts are marked updated when changes occur in the text, or when new comments are added. To use the tracker module to follow a specific user's contributions, select the <em>Track</em> tab from the user's profile page.") . '</p>';

Posts are marked updated [...] -> "Content is marked updated [...]"

+ drupal_set_message(t("You have added an action that changes a content's property. A Save content action has been added so that the property change will be saved."));

that changes a content's property. -> "that changes a piece of content's property." or "that changes the property of a piece of content." ("Content" can't be counted, so you can't have "a/one content".)

Powered by Dreditor.

RoboPhred’s picture

Assigned: RoboPhred » Unassigned

Dropping this for now, I cannot run D7 until I work out some PDO issues with my host.

pillarsdotnet’s picture

Status: Needs review » Needs work
pillarsdotnet’s picture

StatusFileSize
new68.63 KB

Assigned: Unassigned » pillarsdotnet

The last submitted patch, stop_using_post_as_noun-43612-27.patch, failed testing.

pillarsdotnet’s picture

StatusFileSize
new69.99 KB
pillarsdotnet’s picture

StatusFileSize
new70.15 KB

The last submitted patch, stop_using_post_as_noun-431612-30.patch, failed testing.

pillarsdotnet’s picture

StatusFileSize
new70.14 KB
Bojhan’s picture

Status: Needs work » Needs review

Actually this seems to introduce a lot of entries of the word 'node' we removed this word from core, because of its technical nature. Other than that most changes seem good.

pillarsdotnet’s picture

Status: Needs work » Needs review
pillarsdotnet’s picture

StatusFileSize
new162.64 KB

Status: Needs review » Needs work

The last submitted patch, stop_using_post_as_noun-431612-35.patch, failed testing.

pillarsdotnet’s picture

StatusFileSize
new168.23 KB
pillarsdotnet’s picture

Assigned: pillarsdotnet » Unassigned
Status: Needs work » Needs review
pillarsdotnet’s picture

Status: Needs review » Needs work
Issue tags: -Novice
albert volkman’s picture

Status: Needs work » Needs review
StatusFileSize
new154.16 KB

Made this apply to D8. Marking as NR for testbot, but I'm sure this will still need a lot of work.

Status: Needs review » Needs work

The last submitted patch, stop_using_post_as_noun-431612-40.patch, failed testing.

albert volkman’s picture

Status: Needs work » Needs review
StatusFileSize
new982 bytes
new154.16 KB

Fixed the $t typo.

Status: Needs review » Needs work

The last submitted patch, stop_using_post_as_noun-431612-42.patch, failed testing.

marthinal’s picture

Status: Needs work » Needs review
rcross’s picture

-1

maybe irrelevant at this point, but after reading [#1818278: Rename "node" to "content"] I actually think "post" is a reasonable term to use as a noun and it seems most people, whether intentional or not, seem to use it this way quite commonly.

Status: Needs review » Needs work

The last submitted patch, 42: stop_using_post_as_noun-431612-42.patch, failed testing.

meeli’s picture

Issue summary: View changes

Based on the outcome of https://www.drupal.org/node/1818278, I think we should rename "post" to "node" in user-facing text to create a consistent terminology. I don't love "node" but if we're going to use "nodes" instead of "content" then we should also use "node" instead of "post".

andypost’s picture

Looks all issues like #1818278: Rename "node" to "content" closed and we are behind a string freeze
No where we going to finish node to content transition?

cilefen’s picture

Version: 8.0.x-dev » 8.1.x-dev

No matter what, this is 8.1.x.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

papagrande’s picture

Issue tags: +Novice

This may be outdated and needs a check to see if there are still problems in D11 code. Please scan the code for uses of "post" as a noun, but ignore test fixtures.

Then spin off child issues by sub-system to keep the patches/MRs reasonably-sized.

papagrande’s picture

From @andypost at https://drupal.slack.com/archives/C014QES6HSQ/p1696523077987389?thread_t...

In UI as noun it exists in forum...

core/modules/forum/src/ForumSettingsForm.php:54: 3 => $this->t('Posts - most active first'),
core/modules/forum/src/ForumSettingsForm.php:55: 4 => $this->t('Posts - least active first'),
core/modules/forum/templates/forum-list.html.twig:40:

{{ 'Posts'|t }}
catch’s picture

Given #3267261: [Meta] Tasks to deprecate Forum, if forum module is the only remaining place this happens, I think we could close this as outdated, fourteen years after I opened it.

quietone’s picture

Issue summary: View changes

I searched core for POST and visually scanned the long list to confirm the usages were for the POST method. Then I searched for 'Post' and did the same scan. Finally searched for 'post' and there were many results. I gradually eliminated correct usages such as 'post update' etc. and eventually the results were small enough to change the grep to include the cases where post is used as a noun. This is the resulting command.

grep -rw post --exclude-dir=fixtures core/modules/book core/modules/forum core/modules/tracker core/includes/form.inc | grep -v 'post comments' | nl

The three modules, book, form and tracker, are approved for removal so we can eliminate those. That leaves form.inc which has an example using post as a noun.

 *   if ($success) {
 *     $message = \Drupal::translation()->formatPlural(count($results), 'One post processed.', '@count posts processed.');
 *   }
 *   else {

There is a change for that in the latest patch here. So we just need a new MR with that one change.

I have updated the IS and added some, but not all, credit.

sourabhjain made their first commit to this issue’s fork.

sourabhjain’s picture

Status: Needs work » Needs review

papagrande’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Bug Smash Initiative

After reading the relevant code, "items" makes sense in context and !4956 looks good.

Thanks, @sourabhjain.

quietone’s picture

Saving credit

  • quietone committed 4cbb3c5d on 11.x
    Issue #431612 by pillarsdotnet, RoboPhred, Albert Volkman, sourabhjain,...
quietone’s picture

Status: Reviewed & tested by the community » Fixed

Nice to close a 15 year old issue!

Committed to 10.2.x and 11.x Thanks!

Status: Fixed » Closed (fixed)

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