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

Write a plugin that finds outdated attachments links in posts #1839

Open
rafalp opened this issue Jan 17, 2025 · 0 comments
Open

Write a plugin that finds outdated attachments links in posts #1839

rafalp opened this issue Jan 17, 2025 · 0 comments
Assignees
Labels
area: backend This issue involves Python, Django or dependency (eg. database)

Comments

@rafalp
Copy link
Owner

rafalp commented Jan 17, 2025

In #1813 I've changed attachment syntax in posts to <attachment=filename:id>, and implemented a simple markup updating migration that uses regexes to find and replace old syntax with new one.

There are limitations to what this implementation can accomplish, so I would still like to have a tool for site admins to manually finish the rest. And I would like to not have to keep it as part of Misago's codebase proper, so I could have a plugin that would add admin page for finding those posts for admin.

Simplest way to find attachments is to run Post.objects.filter(original__contains="/a/") search. This isn't too fast (especially on very big forums) but it does the job.

@rafalp rafalp added the area: backend This issue involves Python, Django or dependency (eg. database) label Jan 17, 2025
@rafalp rafalp added this to the Next feature release milestone Jan 17, 2025
@rafalp rafalp self-assigned this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend This issue involves Python, Django or dependency (eg. database)
Projects
None yet
Development

No branches or pull requests

1 participant