Overview

Steps to reproduce:

  1. Create a new page
  2. Update the page title
  3. Click "Review x changes"
  4. Verify that the panel is displaying the old page title

Proposed resolution

User interface changes

CommentFileSizeAuthor
Screenshot 2025-02-12 at 11.47.13 PM.png391.88 KBlauriii
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

lauriii created an issue. See original summary.

omkar-pd made their first commit to this issue’s fork.

omkar-pd’s picture

Status: Active » Needs review

In AutoSaveManager.php there is a @todo Update label from incoming entity data once it exists for label.
https://git.drupalcode.org/project/experience_builder/-/blob/0.x/src/Aut...

Is it the right change?

wim leers’s picture

Status: Needs review » Needs work
Related issues: +#3505118: The status badge should indicate if there are changes to the page

I believe this is indeed the correct place/approach, but it should not hardcode title[0][value].

See the MR for #3505118: The status badge should indicate if there are changes to the page at https://git.drupalcode.org/project/experience_builder/-/merge_requests/6... for the correct generalized approach, which looks like this:

      $label_field_input_name = sprintf("%s[0][value]", $content_entity_type->getKey('label'));
      $is_new = $this->contentEntityIsConsideredNew($entity_form_fields[$label_field_input_name], $content_entity_type);
wim leers’s picture

Issue tags: +Needs tests
omkar-pd’s picture

Thanks @wim,

I'll look into it.

wim leers’s picture

What do you mean? 🤔

omkar-pd’s picture

Sorry, I meant 'I will look into it.' I mistyped in a hurry.

omkar-pd’s picture

I've implemented the changes as mentioned in #5. Keeping this in "Needs Review" since tests are still required, allowing someone else to pick it up and continue

akhil babu made their first commit to this issue’s fork.

akhil babu’s picture

Status: Needs work » Needs review

This warning was appearing in logs while running the tests. So I have updated the AutoSaveManager::save() method to check if $data["entity_form_fields"] exists or not.

/var/www/html/web/modules/contrib/experience_builder/src/AutoSave/AutoSaveManager.php:34
Undefined array key "entity_form_fields"

Please review

lauriii’s picture

Issue tags: -Needs tests

Looks like there's test coverage already. The MR needs a rebase still though.

nagwani’s picture

Issue tags: +sprint

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

tedbow’s picture

Status: Needs review » Reviewed & tested by the community

If tests pass, I think this is good

  • tedbow committed 23ef7fc6 on 0.x authored by omkar-pd
    Issue #3506267: Changing page title doesn't update in the review changes...
tedbow’s picture

Status: Reviewed & tested by the community » Fixed
tedbow’s picture

nagwani’s picture

Issue tags: -sprint

Status: Fixed » Closed (fixed)

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