Skip to content

Share button copies "undefined" instead of valid URL #197

@erdzan12

Description

@erdzan12

Summary:

The Share button on our page is intended to copy the URL of the current page to the clipboard. However, currently, it's copying an "undefined" value after the base URL. For instance, when using the Share button at https://cards.leier.lu/vorlesung/bpi, it copies https://cards.leier.lu/vorlesung/bpi#undefined to the clipboard, which is not the correct behavior.

Steps to reproduce:

  1. Go to https://cards.leier.lu/vorlesung/bpi.
  2. Click on the Share button.

Expected results:

The correct URL with the id of the card (https://cards.leier.lu/vorlesung/bpi#2) should be copied to the clipboard.

Actual results:

The URL https://cards.leier.lu/vorlesung/bpi#undefined is copied to the clipboard.

Additional information:

This issue has been reproduced on different browsers including Chrome, Firefox, and Safari, suggesting it's not browser-specific. We need to ensure that the correct URL is copied when users hit the Share button.

Suggested Fix:

The problem seems to be related to the way we fetch the URL to be copied. Please investigate whether it's due to a JavaScript error or a backend service error.

Screenshots:

(Attach any relevant screenshots here, if possible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions