Page revisions are missing information about author

Created on 11 July 2025, 4 days ago

Overview

All page revisions are currently authored by anonymous user.

Proposed resolution

Revisions should be authored by the person who published the content.

User interface changes

🐛 Bug report
Status

Active

Version

0.0

Component

Page

Created by

🇫🇮Finland lauriii Finland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @lauriii
  • 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
  • Pipeline finished with Canceled
    4 days ago
    #545082
  • 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
  • Pipeline finished with Success
    4 days ago
    #545084
  • 🇺🇸United States tedbow Ithaca, NY, USA

    see MR comment

  • 🇺🇸United States tedbow Ithaca, NY, USA

    I am still getting the anonymous if I don't change the title. Also I do think we want

    $use_existing_revision_id = AutoSaveManager::contentEntityIsConsideredNew($original_entity);

    Because otherwise if you first create a page that hasn't been published and change the title it will never be considered new which I don't think is the intention

    and that would leave the first revision showing as anonymous, which I don't think is the intention.

  • 🇺🇸United States tedbow Ithaca, NY, USA

    I think I found a bug that is 0.x and this branch.

    $use_existing_revision_id = AutoSaveManager::contentEntityIsConsideredNew($entity);
    
            if ($entity instanceof EntityPublishedInterface) {
              $entity->setPublished();
            }
            // If the entity is new, the autosaved data is considered to be part
            // of the first revision. Therefore, do not create a new revision
            // for new entities.
            if ($use_existing_revision_id) {
              $entity->setNewRevision(FALSE);
            }
    

    Even if $use_existing_revision_id === true a new revision is always created.

    I think the intention of this code, from reading the comment, is that if you

    1. create a new page inside XB
    2. make some changes to the page
    3. publish the page
    4. There should be only 1 revision in the log after publishing

    The last item does not work. there are always 2 items. Presumably for every XB page there will always be the same first revision with the same data, excepted for created and changed timestamps, because no changes have been made for this revision.

    I am not sure why this happens

    This relates to this issue because that first revision will always show as "anonymous"

    But that might be a bigger problem that we could fix in a follow-up. If someone one knows why this is happening it and it is a small fix it might make sense to fix it here

  • 🇫🇮Finland lauriii Finland

    I think that's a separate issue, good catch! Let's file another issue for that 👍

  • Pipeline finished with Success
    4 days ago
    #545153
  • 🇺🇸United States tedbow Ithaca, NY, USA
  • Pipeline finished with Success
    4 days ago
    Total: 797s
    #545201
  • 🇺🇸United States tedbow Ithaca, NY, USA

    re #8 I created 🐛 New XB pages also create a new revision on publish even though they are intended not to Active . I didn't add a todo in this issue's MR because I don't think we would change what we are doing here

  • 🇪🇸Spain isholgueras

    I've tested it in this branch and in 0.x. In 0.x can reproduce the issue but in this branch the user is there. Even I created a new Content Editor user (nacho) with the right permissions and works well.

    The code looks good to me too, so I think it's RTBC.

  • Pipeline finished with Skipped
    3 days ago
    #545371
  • Pipeline finished with Skipped
    3 days ago
    #545372
  • 🇫🇮Finland lauriii Finland
  • Tested following scenarios and changes are working as expected :

Production build 0.71.5 2024