On draft page wrong profile card loads on clicking the avatar

Hello,

I noticed on draft page, on post drafts the topic author profile card loads instead of mine by click of my profile avatar.

Thanks :slightly_smiling_face:

1 Like

I can reproduce it here in Meta (And I actually get a lot of errors in the console)

It also happens on one of my sites (But no errors in the console)

Is it possible that user-card in Drafts is using the field “username” instead of “draft_username”? :thinking:

Example of drafts.json response on my site
{
   "drafts":[
      {
         "excerpt":"Probando",
         "created_at":"2022-09-10T22:07:10.363Z",
         "draft_key":"topic_30",
         "sequence":6,
         "draft_username":"Alexander",
         "avatar_template":"/user_avatar/www.rinconestudiantil.ml/alexander/{size}/3_2.png",
         "data":"{\"reply\":\"Probando\",\"action\":\"reply\",\"categoryId\":10,\"archetypeId\":\"regular\",\"metaData\":null,\"composerTime\":3958,\"typingTime\":900}",
         "topic_id":30,
         "username":"wexeljose",
         "username_lower":"wexeljose",
         "name":"José Wexel",
         "user_id":1,
         "title":"Becas de la Fundación Chamangá",
         "slug":"becas-de-la-fundacion-chamanga",
         "category_id":10,
         "archetype":"regular"
      },
      {
         "excerpt":"El Consejo de Formación en Educación es el consejo de educación terciaria pública perteneciente a la Administración Nacional de Educación Pública de Uruguay, tiene como cometido la formación de profesionales de la educación, incluyendo la formación de maestros, profesores, maestros técnicos y educad\u0026hellip;",
         "truncated":true,
         "created_at":"2022-07-25T17:40:48.557Z",
         "draft_key":"topic_26",
         "sequence":37,
         "draft_username":"Alexander",
         "avatar_template":"/user_avatar/www.rinconestudiantil.ml/alexander/{size}/3_2.png",
         "data":"{\"reply\":\"El Consejo de Formación en Educación es el consejo de educación terciaria pública perteneciente a la Administración Nacional de Educación Pública de Uruguay, tiene como cometido la formación de profesionales de la educación, incluyendo la formación de maestros, profesores, maestros técnicos y educadores sociales :botija:.​\\n\\nLa siguiente presentación fue brindada por una Estudiante de Magisterio en una charla dada recientemente:\\n\\n\\n\u003ciframe src=\\\"https://docs.google.com/presentation/d/e/2PACX-1vTLBeoqzHEVu12s151J4nlYE_YJVkFmDDKY5TRx6Q4oZ6QVGmS7M1bLcQAWjCOrQw/embed?start=false\u0026loop=false\u0026delayms=60000\\\" frameborder=\\\"0\\\" width=\\\"1280\\\" height=\\\"320\\\" allowfullscreen=\\\"true\\\" mozallowfullscreen=\\\"true\\\" webkitallowfullscreen=\\\"true\\\"\u003e\u003c/iframe\u003e\\n\\n---\\n\\n:link: Puedes ver más información en http://www.cfe.edu.uy/\",\"action\":\"edit\",\"title\":\"[Información] Magisterio - CL / TyT\",\"categoryId\":8,\"tags\":[\"treinta-y-tres\",\"cerro-largo\"],\"archetypeId\":\"regular\",\"metaData\":null,\"composerTime\":2924,\"typingTime\":300,\"postId\":40}",
         "topic_id":26,
         "username":"Alexander",
         "username_lower":"alexander",
         "name":"",
         "user_id":1,
         "title":null,
         "archetype":null
      }
   ]
}

I am the author of the second topic, but not the author of the first topic visible in the response

1 Like

I was unable to reproduce it on meta, maybe it is already fixed?

Did you try it with post draft or new topic draft? This is only happens when you make post draft on other authors topic. For example try to create a draft in this topic. :slightly_smiling_face:

So now I see it too.

This happens when a draft is a reply to a topic not a new topic itself.

1 Like

Putting a #pr-welcome on this, in case someone from the community wants to fix.

1 Like

I wanted to mention this again, I have noticed that “data-user-card” (and the href) correspond to the OP, instead of the author of the draft (but avatar for example is ok)

Capturar

Does it correspond to this file? :thinking: