MbinOrg / mbin

Mbin: a federated content aggregator, voting, discussion and microblogging platform (By the community, for the community)
https://joinmbin.org
GNU Affero General Public License v3.0
220 stars 17 forks source link

Can't edit Body field of posts with images #784

Closed lindseymraz closed 2 months ago

lindseymraz commented 4 months ago

Describe the bug No field with which to edit Body text on on posts with images

On which Mbin instance did you find the bug? [kbin.melroy.org]

Which Mbin version was running on the instance? [1.5.3]

To Reproduce I'll be honest, I did not check all potential ways for this error to arise. I'd imagine this occurs on any kind of post with a photo, no matter which Add new button was used to make it happen, but I have no proof. The reproduction steps I provide below are the ones I do have proof for, or how I made the error arise myself.

Steps to reproduce the behavior:

  1. Click Add new link
  2. Paste a link to an image in the URL field
  3. Post your post
  4. Try to edit your post

Or,

  1. Go to an old post you made with an image
  2. Try to edit your post

In both cases, there is no field for you to edit your Body text. Even if you have Body text in your post.

Expected behavior There is a visible field for me to edit Body text.

Smartphone (please complete the following information):

MHLoppy commented 3 months ago

Chiming in to confirm the issue is occurring for me as well on a different server while accessing via desktop. In my specific case, it seems like despite the original submission being of the "link" type in the UI, because the link is to an image it's still getting treated as a "photo" submission type (which doesn't support editing the post's body).

On which Mbin instance did you find the bug? fedia.io ( https://fedia.io/ )

Which Mbin version was running on the instance? 1.6.0

Desktop:

BentiGorlich commented 3 months ago

Yeah I suspect it is coupled to the type of the post that is chosen. Since we lifted the constraint of an "image" post to not have a body, we should definitely make the body editable

BentiGorlich commented 2 months ago

I've looked into it yesterday and my conclusion is: to properly fix this problem we need to go from the different forms depending on the type one wants to post to just one create form (or maybe different create forms, but only one edit form?). The problem at hand is that we change the type of the post after the face. For example when one creates a "Link" thread and inserts an image url then the type of the post will changed to "Image" by our embed handler, though you can insert a body in a link post, but not in an image post...

@nobodyatroot @melroy89 what do you think we should do? I think my go to solution would be keep the different create forms, but move to only one edit form where you can just change all fields of an entry

ghost commented 2 months ago

I've looked into it yesterday and my conclusion is: to properly fix this problem we need to go from the different forms depending on the type one wants to post to just one create form (or maybe different create forms, but only one edit form?). The problem at hand is that we change the type of the post after the face. For example when one creates a "Link" thread and inserts an image url then the type of the post will changed to "Image" by our embed handler, though you can insert a body in a link post, but not in an image post...

@nobodyatroot @melroy89 what do you think we should do? I think my go to solution would be keep the different create forms, but move to only one edit form where you can just change all fields of an entry

that sounds reasonable to me