FOSDEM / pretalx-integration

Pretalx at FOSDEM
2 stars 0 forks source link

Speaker URLs include custom id instead of slug #46

Open cbeyls opened 8 months ago

cbeyls commented 8 months ago

The speaker URLs now look like this:

https://fosdem.org/2024/schedule/speaker/WBPJSF/

Before, they looked like this:

https://fosdem.org/2023/schedule/speaker/richard_hartmann/

Is it possible to revert to having a slug instead of a custom id?

It currently causes an issue for my app, since I'm transforming the speaker name to a slug in order to generate the speaker URL. Ideally, that URL should be part of of the schedule XML but it's not yet the case, so relying on slugs is my only alternative to be able to open the speaker details in a browser.

Alternatively, the numerical id of the speaker (present in the schedule XML file) should be able to be used to generate an URL that redirects to the proper URL, if that's possible to do. Otherwise, I'll have to remove that feature.

kergon commented 8 months ago

On Wed, Dec 27, 2023 at 09:44:57AM -0800, Christophe Beyls wrote:

The speaker URLs now look like this: [1]https://fosdem.org/2024/schedule/speaker/**WBPJSF/ Before, they looked like this: [2]https://fosdem.org/2023/schedule/speaker/richard_hartmann**/ Is it possible to revert to having a slug instead of a custom id?

Of course - these things aren't meant to be changing so you're right to ask for it to be fixed (or to send a patch if you have time to look at it yourself before any of us do).

johanvdw commented 8 months ago

Does the Id have to be numerical? It seems more logical to include the slug as Id. It would also solve that you have to guess which algorithm is used to generate the slug.

Op wo 27 dec 2023 19:11 schreef Alasdair G. Kergon @.***

:

On Wed, Dec 27, 2023 at 09:44:57AM -0800, Christophe Beyls wrote:

The speaker URLs now look like this: [1]https://fosdem.org/2024/schedule/speaker/**WBPJSF/ Before, they looked like this: [2]https://fosdem.org/2023/schedule/speaker/richard_hartmann**/ Is it possible to revert to having a slug instead of a custom id?

Of course - these things aren't meant to be changing so you're right to ask for it to be fixed (or to send a patch if you have time to look at it yourself before any of us do).

— Reply to this email directly, view it on GitHub https://github.com/FOSDEM/pretalx-integration/issues/46#issuecomment-1870520823, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGUAUUFWKVB6SR4PGCHA6TYLRPTHAVCNFSM6AAAAABBETIOLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQGUZDAOBSGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kergon commented 8 months ago

On Wed, Dec 27, 2023 at 11:33:31AM -0800, Johan Van de Wauw wrote:

Does the Id have to be numerical? It seems more logical to include the slug as Id. It would also solve that you have to guess which algorithm is used to generate the slug.

The URLs on our website that people may want to access or link to directly need to remain human-readable and interpretable. The one for the speaker needs to continue to use a slug based on the speaker's name.

cbeyls commented 8 months ago

To clarify:

Excerpt from the XSD:

<xs:complexType name="persons">
    <xs:sequence>
      <xs:element name="person" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute type="xs:positiveInteger" name="id" />
              <xs:attribute type="uuid" name="guid"/>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

This doesn't mean we are not allowed to add our own extra fields in addition to the standard, like the slug, the full person URL, maybe even the person's bio. But this is probably out of scope for now, so let's stick to compatibility first.

By the way, I submitted another pending pull request to level up the XML schedule file's compatibility with Pretalx while preserving backwards-compatibility.

johanvdw commented 8 months ago

Checked the old implementation in penta and will change the speaker slug that we export. It does not support two speakers with the same name.

cbeyls commented 8 months ago

I found a few duplicate speakers with the same name and different ids:

Adolfo García Veytia https://fosdem.org/2024/schedule/speaker/XWDLEB/ https://fosdem.org/2024/schedule/speaker/WY7TVG/

Franck Pachot https://fosdem.org/2024/schedule/speaker/7LPUZN/ https://fosdem.org/2024/schedule/speaker/PPGSD8/

Matias Vara Larsen https://fosdem.org/2024/schedule/speaker/UPSWS9/ https://fosdem.org/2024/schedule/speaker/DDG8BC/

Nathan Skrzypczak https://fosdem.org/2024/schedule/speaker/D7WJZ9/ https://fosdem.org/2024/schedule/speaker/CV9HWQ/

Stephen Chin https://fosdem.org/2024/schedule/speaker/AWTL8L/ https://fosdem.org/2024/schedule/speaker/JNYDPV/

cbeyls commented 7 months ago

It appears this will not be fixed for this year's edition. I left the broken feature in my app for now, in case it gets fixed at some point. For next year we should focus on enriching the XML schedule with speaker data (URL, photo, bio).

johanvdw commented 7 months ago

I may still fix it for speakers, but not for talks, because too many references have been made to the long names.

johanvdw commented 7 months ago

refrained from changing this at this point (because people have published links in too many places).

cbeyls commented 7 months ago

No problem, let's fix it for 2025