Review main Merged

86019[TASK] Improve LatestChangedPages dashboard widget

Frank Nägler CR +2 V +2 Normal +109 −41 updated 09/17/24, 06:54

Commit message

This patch solves multiple smaller issues with the origin patch.

* It's now visible if the page itself was changed or a content
  on that page
* Widget options are now documented in the RST file
* The displayed date is the change date of the content element
  or page (whatever influenced the page to appear in the widget)
* Missing language information is added
* View webpage now respects the language parameter
* The edit content button now opens the correct page
* Using the current workspace restriction to fetch `sys_history`
  records does not work and is replaced by adding a direct equal
  where condition for the current workspace id
* Additionally, some small code quality improvements, e.g., missing
  strict type checks and wrong cases in function calls

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 4

Review log 2638

Show 813 earlier messages
  1. Frank Nägler uploaded patch set 1 09/11/24, 14:12

  2. core-ci voted on patch set 1 V +1 09/11/24, 14:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65461

  3. Frank Nägler updated the commit message in patch set 2 V +1 09/11/24, 20:41

  4. core-ci voted on patch set 2 V +1 09/11/24, 20:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65495

  5. Stefan Bürk updated the commit message in patch set 3 V +1 09/11/24, 23:33

  6. core-ci voted on patch set 3 V +1 09/11/24, 23:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65509

  7. Oli Bartsch uploaded patch set 4 V +1 09/12/24, 14:30

  8. core-ci voted on patch set 4 V +1 09/12/24, 14:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65581

  9. Frank Nägler uploaded patch set 5 V +1 09/12/24, 15:56

  10. core-ci voted on patch set 5 V +1 09/12/24, 16:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65590

  11. Oli Bartsch commented on patch set 5 09/12/24, 16:25

    LatestChangedPagesWidget.php:159

    Why return the whole row, while only `uid` is needed in the calling code?

    LatestChangedPagesWidget.php:165

    ParameterType should be set to `Connection::PARAM_INT`

    LatestChangedPagesWidget.php:175

    ParameterType should be set to `Connection::PARAM_INT`

    LatestChangedPagesWidget.php:176

    ParameterType should be set to `Connection::PARAM_INT`

    LatestChangedPagesWidget.php:227

    Shouldn't this be `pages`?
  12. Frank Nägler uploaded patch set 6 V +1 09/12/24, 18:34

  13. Frank Nägler commented on patch set 5 09/12/24, 18:35

    LatestChangedPagesWidget.php:159 Reply

    Acknowledged

    LatestChangedPagesWidget.php:165 Reply

    Acknowledged

    LatestChangedPagesWidget.php:175 Reply

    Acknowledged

    LatestChangedPagesWidget.php:176 Reply

    Acknowledged

    LatestChangedPagesWidget.php:227 Reply

    Acknowledged
  1. core-ci voted on patch set 6 V +1 09/12/24, 18:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65599

  2. Benjamin Franzke commented on patch set 6 09/12/24, 19:03

    Isn't this a FOLLOWUP? cc @bo@cedev.de
  3. Oli Bartsch commented on patch set 6 09/12/24, 19:08

    Reply

    Hi @ben@bnf.dev, Interesting question. I was about to make the same mistake by comparing with the initial patch. However, after a bit of consideration, I'm now quite sure there has been fixed a bit to much. This for sure qualifies as a full bugfix.
  4. Benjamin Franzke commented on patch set 6 09/12/24, 19:23

    Reply

    Ah, sounds good. Thanks you very much for the detailed answer. Have a nice evening and bon appetit.
  5. Benjamin Franzke uploaded patch set 7 V +1 09/13/24, 07:37

  6. core-ci voted on patch set 7 V +1 09/13/24, 07:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65633

  7. Ulrich Mathes uploaded patch set 8 CR +1 V +1 09/13/24, 08:47

  8. core-ci voted on patch set 8 V +1 09/13/24, 08:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65640

  9. Stefan Bürk commented on patch set 8 09/14/24, 01:14

    This widget has issues with workspaces (not directly): * switch to non-live workspace * edit a page and save the change in the workspace * view dashboard / widget => okay, change is displaye * switch to live workspace and than the dashboard again => broken (no information can be loaded). This is related to a broken rootline exception thrown by the RootlineUtility and in my case, admin and be debug mode the ajax is broken displaying the stack trace. Not sure if we should at least display the changes first only for the current workspace or workspace + liveworkspace or something else and investigate that bug later along with general workspace handling ? What do you think ?

    LatestChangedPagesWidget.php:178

    Please add `->setMaxResults(1)`

    LatestChangedPagesWidget.php:188

    Please add `->setMaxResults(1)`
  10. Stefan Bürk commented on patch set 8 09/14/24, 01:26

    LatestChangedPagesWidget.php:194

    I guess a custom context instance should be created and passed to the rootline utility to fetch the rootline for a page in the workspace it has been changed. Not sure if this is the rootline issue mentioned in the other comment.
  11. Stefan Bürk uploaded patch set 9 V +1 09/14/24, 02:50

  12. core-ci voted on patch set 9 V +1 09/14/24, 02:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65722

  13. Stefan Bürk uploaded patch set 10 V +1 09/14/24, 03:15

  14. Stefan Bürk commented on patch set 10 09/14/24, 03:20

    Reply

    For fetching the sys_history records the prepare querybuilder method removed all restrictions and readded the workspace restriction. That restriction does not apply for `sys_history` because that table is not TCA managed and "literally" not workspace aware. The workspace field is just a plain log. To solve this, removed adding that restriction back again and added the current workspace id filtering (where) to the query build up for the sys_history entries.

    LatestChangedPagesWidget.php:178 Reply

    Done

    LatestChangedPagesWidget.php:188 Reply

    Done

    LatestChangedPagesWidget.php:194 Reply

    Does not matter - the issue was another, and current workspace rootline is okay.
  15. core-ci voted on patch set 10 V +1 09/14/24, 03:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65724

  16. Frank Nägler uploaded patch set 11 V +1 09/15/24, 14:19

  17. core-ci voted on patch set 11 V +1 09/15/24, 14:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65815

  18. Frank Nägler commented on patch set 11 09/16/24, 09:30

    Reply

    Do you fixed it? I can't reproduce your comments with the latest patch set.
  19. Stefan Bürk commented on patch set 11 09/16/24, 11:51

    Reply

    Should be fine. Close it for now. If I find the time right in time I will verify that again.
  20. Stefan Bürk uploaded patch set 12 V +1 09/16/24, 13:58

  21. core-ci voted on patch set 12 V +1 09/16/24, 14:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65896

  22. Stefan Bürk voted on patch set 12 CR +1 V +1 09/16/24, 15:14

  23. Stefan Bürk commented on patch set 12 09/16/24, 15:14

    albeit it is more a bugfix right now
  24. Benni Mack voted on patch set 12 CR +2 V +2 09/17/24, 06:54

  25. Benni Mack merged patch set 13 09/17/24, 06:54