Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean orphaned adstxt post types #138

Merged
merged 10 commits into from Apr 5, 2023

Conversation

sksaju
Copy link
Member

@sksaju sksaju commented Apr 2, 2023

Description of the Change

Clean orphaned posts while visiting the settings management screen so that the unreferenced post will not remain as published in the database.

Closes #93

How to test the Change

Changelog Entry

Added - Check for and delete orphan (app-)ads.txt posts not referenced in the option.

Credits

Props @sksaju, @peterwilsoncc.

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@sksaju sksaju mentioned this pull request Apr 2, 2023
1 task
@sksaju sksaju self-assigned this Apr 3, 2023
Copy link
Contributor

@peterwilsoncc peterwilsoncc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a few notes inline.

To answer your question from the issue, I think this is as good a place as any to look for orphan posts.

inc/admin.php Outdated Show resolved Hide resolved
inc/admin.php Outdated Show resolved Hide resolved
inc/admin.php Outdated Show resolved Hide resolved
inc/admin.php Show resolved Hide resolved
@sksaju
Copy link
Member Author

sksaju commented Apr 3, 2023

I've added a few notes inline.

To answer your question from the issue, I think this is as good a place as any to look for orphan posts.

Thanks, @peterwilsoncc I've updated PR according to your feedback, please let me know if you find any other issues. Thank you

Copy link
Contributor

@peterwilsoncc peterwilsoncc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks so much for following up.

I pushed a few minor coding standards and comment changes.

Testing notes:

  • create ads file
  • Edit ads file to ensure revision created
  • delete option from database
  • refresh ads editing page
  • ensure new post created
  • ensure old post is deleted
  • save, create revision
  • repeat for app-ads file.

@peterwilsoncc peterwilsoncc merged commit 3d08cfe into develop Apr 5, 2023
11 checks passed
@peterwilsoncc peterwilsoncc deleted the fix/clean-orphaned-adstxt-post-types branch April 5, 2023 00:13
@peterwilsoncc peterwilsoncc added this to the 1.5.0 milestone Apr 5, 2023
@dkotter dkotter modified the milestones: 1.5.0, 1.4.3 Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean orphaned adstxt post types.
3 participants