lemmy-ui
lemmy-ui copied to clipboard
Regression: Prefilling `create_post` form from URL parameters no longer works
Requirements
- [X] This is a bug report, and if not, please post to https://lemmy.ml/c/lemmy_support instead.
- [X] Please check to see if this issue already exists.
- [X] It's a single bug. Do not report multiple bugs in one issue.
- [X] It's a frontend issue, not a backend issue; Otherwise please create an issue on the backend repo instead.
Summary
Prior to Lemmy 1.18.0, it was possible to use parameters in the URL to load a "New Post" form with some fields prefilled, e.g.:
https://lemmy.instance/create_post?lang=en&url=https%3A%2F%foo.bar&title=Foo+Bar&community_id=1&body=Description+of+foo+bar
This was super useful for bookmarklets and "share" style URLs.
Unfortunately this does not seem to work anymore. I'm not sure if the names of the GET parameters have changed, or if this feature was dropped along the way.
Steps to Reproduce
- Navigate to /create_post?title=Foo+bar
- Observe that the Title form field is not prepopulated with
Foo bar
Technical Details
N/A
Lemmy Instance Version
0.18.1
Lemmy Instance URL
https://links.roobre.es
In case this helps: Taking a quick look at the git history, it might be possible that https://github.com/LemmyNet/lemmy-ui/pull/977 broke this functionality.
I'm gonna toss in, I feel like this might be a bigger issue than this issue's activity would suggest. Without this functionality, third-party apps have no way to add Lemmy as a share target for an article (ie those "Share to FB", "Share to Twitter" buttons attached to many articles/sites...there's no way to add a "Share to Lemmy" button).
The friction this causes may have an impact on Lemmy adoption rate, and certainly an impact on perceived ease-of-use.
PS I recognize that due to the federated nature, a "Share to Lemmy" button would likely require an extra step to choose the instance, which adds some friction anyway. I also doubt large corporate outlets are chomping at the bit to add a "Share to Lemmy" button to their site, but certainly FOSS projects (including one that I'm working on) would probably want this functionality.
This still appears to be an issue on the latest Lemmy versions (as tested on infosec.pub). I was hoping to make a basic automation/bookmarklet for myself, but it seems like I'd have to use the API instead.
cc @SleeplessOne1917
Working on this now. The only thing that I think will end up different is the language, since we use IDs for those instead of the 2 character locale names.
Sweet, thx.