fixes https://github.com/TryGhost/Ghost/issues/17076
When a post is saved `_revisionSaveTask` gets queued to execute 10
minutes from the save. When a post is published via the publish modal
`_revisionSaveTask` does not get dequeued. When `_revisionSaveTask` gets
executed at the 10 minute mark it is assumed that it is ok to save a
revision, which will cause the post to be reverted back to a draft. This
change enforces another check during the task exection to ensure that it
is in fact still ok to save a revision (in case anything has changed in
the 10 minutes since the task queued, i.e the post being published)
fixes https://github.com/TryGhost/Team/issues/3505
I've investigated this, but luckily this is expected behaviour, and was just an error previously in the test:
- The `feedback_more_like_this` and `feedback_less_like_this` columns are only hidden if there is no newsletter with feedback enabled, or if member features are disabled.
- Having a post which is a draft, should not change the visible columns, only global settings should change the comments (so the format is consistent).
- Instead of that, the columns should be null, which means it will be visible but empty.
fixes https://github.com/TryGhost/Ghost/issues/17076
When a post is saved `_revisionSaveTask` gets queued to execute 10
minutes from the save. When a post is published via the publish modal
`_revisionSaveTask` does not get dequeued. When `_revisionSaveTask` gets
executed at the 10 minute mark it is assumed that it is ok to save a
revision, which will cause the post to be reverted back to a draft. This
change enforces another check during the task exection to ensure that it
is in fact still ok to save a revision (in case anything has changed in
the 10 minutes since the task queued, i.e the post being published)
refs https://github.com/TryGhost/Team/issues/3504
- Removed Cypress. Tests will get replaced by Playwright
- Removed unused files and HTML files
- Updated scripts to work similar to Portal, Signup-Form
- Updated to pinned dependencies and removed unused dependencies
closes https://github.com/TryGhost/Team/issues/3493
- Fixed pages not saving on force revision. As a side effect, it broke
admin navigation as it doesn't manage to create a new revision upon going back to the pages list.
- This was simply caused by a missing option in the API endpoint config.
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at b646916</samp>
This change enables the `pages` endpoint to handle page revisions by
adding the `save_revision` permission. This is part of a pull request
that adds page versioning and restoring functionality to Ghost.
refs: https://github.com/TryGhost/Toolbox/issues/595
We're rolling out new rules around the node assert library, the first of which is enforcing the use of assert/strict. This means we don't need to use the strict version of methods, as the standard version will work that way by default.
This caught some gotchas in our existing usage of assert where the lack of strict mode had unexpected results:
- Url matching needs to be done on `url.href` see aa58b354a4
- Null and undefined are not the same thing, there were a few cases of this being confused
- Particularly questionable changes in [PostExporter tests](c1a468744b) tracked [here](https://github.com/TryGhost/Team/issues/3505).
- A typo see eaac9c293a
Moving forward, using assert strict should help us to catch unexpected behaviour, particularly around nulls and undefineds during implementation.
refs TryGhost/Ghost#3494
- By default, the post scheduler runs as user_id = 1, which is the
original owner of the site
- If ownership has been transferred to a different user, it's possible
that there is no user with id = 1
- In this case, the scheduler would fail to publish a post, because
updating the post using user_id = 1 failed a foreign key constraint in
the post_revisions table
- This commit fixes the issue by checking if the contextUser exists, and
if not, replacing it with the current owner of the site
no issue
Updates the labels of the post history components to reflect the type of
content (post or page).
It modifies the `restore-revision`, `gh-post-settings-menu`, and
`modal-post-history` components.