Stop using post as a noun

Created on 12 April 2009, about 15 years ago
Updated 13 October 2023, 8 months ago

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

🐛 Bug report
Status

Fixed

Version

11.0 🔥

Component
UI text 

Last updated 3 days ago

No maintainer
Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States PapaGrande

    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.

  • 🇺🇸United States PapaGrande

    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:

  • 🇬🇧United Kingdom catch

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

  • 🇳🇿New Zealand quietone New Zealand

    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.

  • First commit to issue fork.
  • Status changed to Needs review 9 months ago
  • 43:19
    23:43
    Running
  • @sourabhjain opened merge request.
  • Status changed to RTBC 9 months ago
  • 🇺🇸United States PapaGrande

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

    Thanks, @sourabhjain.

  • last update 8 months ago
    30,382 pass
  • last update 8 months ago
    30,392 pass
  • last update 8 months ago
    30,394 pass
  • 🇳🇿New Zealand quietone New Zealand

    Saving credit

    • quietone committed 4cbb3c5d on 11.x
      Issue #431612 by pillarsdotnet, RoboPhred, Albert Volkman, sourabhjain,...
  • Status changed to Fixed 8 months ago
  • 🇳🇿New Zealand quietone New Zealand

    Nice to close a 15 year old issue!

    Committed to 10.2.x and 11.x Thanks!

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

Production build 0.69.0 2024