Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] toUrl() on Link field with Page that got deleted throws error #5367

Closed
tobimori opened this issue Jul 12, 2023 · 0 comments · Fixed by #5368
Closed

[v4] toUrl() on Link field with Page that got deleted throws error #5367

tobimori opened this issue Jul 12, 2023 · 0 comments · Fixed by #5368
Assignees
Milestone

Comments

@tobimori
Copy link
Contributor

Description

Kirby's Url component will throw an error when trying to create the Url for a page that doesn't exist anymore.

Expected behavior
null return, no error; similar to when the field would be empty (it's shown empty in the panel as well).

To reproduce

  1. Create a Link Field
  2. Set a page in such Link Field
  3. Access the URL via $field->toUrl()
  4. Delete the Page
  5. Kirby will throw an error

Your setup

Kirby Version 4.0.0.alpha-4

@afbora afbora added this to the 4.0.0-alpha.5 milestone Jul 13, 2023
@afbora afbora self-assigned this Jul 13, 2023
afbora added a commit that referenced this issue Jul 13, 2023
afbora added a commit that referenced this issue Jul 13, 2023
@afbora afbora linked a pull request Jul 13, 2023 that will close this issue
5 tasks
afbora added a commit that referenced this issue Jul 13, 2023
afbora added a commit that referenced this issue Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants