- Issue created by @lauriii
- Merge request !1272Issue #3535457: Page revisions are missing information about author → (Merged) created by penyaskito
- 🇺🇸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
- create a new page inside XB
- make some changes to the page
- publish the page
- 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 👍
- 🇺🇸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
. In0.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.
-
lauriii →
committed b62cbcf3 on 0.x authored by
penyaskito →
Issue #3535457 by tedbow, penyaskito, lauriii, isholgueras: Page...
-
lauriii →
committed b62cbcf3 on 0.x authored by
penyaskito →
Tested following scenarios and changes are working as expected :