WordPress / wordcamp.org

WordCamps are casual, locally-organized conferences covering everything related to WordPress.
https://wordcamp.org
126 stars 74 forks source link

Sessions: Author column in admin shows session speaker's name #716

Open CdrMarks opened 2 years ago

CdrMarks commented 2 years ago

Describe the bug

After creating 22 out of our 36 sessions for an upcoming WordCamp, I noticed the author column was showing three sessions with the speaker's name instead of my own name image

Request for Discretion The speakers and sessions for this WordCamp have not been announced yet. Names, sessions, and screenshots are intentionally omitted at this time.

To reproduce

I cannot reproduce this with any new sessions. This is what I had done for the three that this occurred on.

Steps to reproduce the behavior:

  1. As a WordCamp site administrator, create a new session. (Sessions > Add New)
  2. Enter a session title
  3. Select a speaker from the Speaker sidebar.
  4. Check off one track from the list in the sidebar
  5. Save the session as draft.
  6. Go back to the list of sessions and see the author is the the speaker.

Expected behavior

The author of the session should be the WordCamp organizer user that created the session.

Screenshots

Browse to https://birmingham.wordcamp.org/2022/wp-admin/edit.php?post_type=wcb_session and review the list of sessions that do not have my name (Ryan Marks). There are 3.

WordCamp

https://birmingham.wordcamp.org/2022/

System (please complete the following information):

iandunn commented 2 years ago

Some potentially useful info from the slack discussion:

:thinking_face: , i think the [intention] is that all of those posts should have the submitter as the post author [rather than all of them having the lead organizer]

https://github.com/WordPress/wordcamp.org/blob/2b8cf32f0b1f2fa8a6b0bed05eaaf4c6ac6[…]t/plugins/wordcamp-forms-to-drafts/wordcamp-forms-to-drafts.php

The dropdown problem might be because the authors aren't being added to the site as contributors? These may be related too: https://github.com/WordPress/gutenberg/issues/11000 / https://core.trac.wordpress.org/ticket/50754#comment:3

patriciabt commented 2 years ago

Hello I mentioned a similar issue on Slack's wordcamp-meta channel, and Ryan Marks gave me the link to this GitHub issue. I thought it would be easier to show you on video so here is my Loom https://loom.com/share/4031242333734511a1a5741de562ced2

I'm not sure if it's intentional to have speakers as authors?

This video shows 2 issues, 1 is the one related to this ticket and the other one is about characters encoding (I believe), I'll post that in the related discussion.

And yes, French accent ;)

ryelle commented 2 years ago

Thanks for the detailed video, @patriciabt.

I'm not sure if it's intentional to have speakers as authors?

It is intentional - when a speaker's wp.org username is added to a session (either by the form submission, or manually by an organizer), the session is updated to set that user as the author. Every time the session is saved, it runs that update - so you're changing the author, and this code runs and changes it right back. These users are not users on your site, but because WordCamp.org and WordPress.org use the same user accounts, we can pull in the user data. Speakers don't have access to edit anything on your site, it's just for display.

Personally I think this makes sense, the session will be presented by the speaker, so having the organizer's name as the author might be confusing.

The issue where the speaker shows up in the quick edit dropdown, but not in the editor dropdown is due to a difference in how Gutenberg builds that dropdown.

The character encoding issue is definitely a problem. I didn't see another issue about that though, have you created one?

patriciabt commented 2 years ago

Thank you @ryelle

For display where? The only speaker (Marco Narzisi) where it mentions one of our org (Maxime Culea) as the author is because we do not know for now his wp org id, but display is correct anyway (for example in his session), it correctly mentions he's the speaker https://geneve.wordcamp.org/2022/session/free-journalism-fake-news-truth-in-the-age-of-wordpress/ TBH I find it strange but as it's intentional so be it :)

For the characters, no I didn't create an issue here for that, I just mentioned in wordcamp-meta on slack

Thanks a lot