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

kirbytext() fails, if text contains a link to a non-existing page #6083

Closed
tritrics opened this issue Dec 21, 2023 · 0 comments · Fixed by #6085
Closed

kirbytext() fails, if text contains a link to a non-existing page #6083

tritrics opened this issue Dec 21, 2023 · 0 comments · Fixed by #6085
Assignees
Milestone

Comments

@tritrics
Copy link

Description

With the new link-field in Kirby 4 it is possible to add links to intern pages in textarea fields. This looks like this:

(link: page://sk0iiTNRft7shn6R text: Link)

If the page is deleted afterwards or if the ID is manually changed by the user, the link-conversion by kirbytext() causes an php fatal error.

Expected behavior
Link should be removed because it's not valid.

To reproduce

  1. Add a page A
  2. Link to page A in a textarea field on page B
  3. delete page A
  4. use <?= $page->textareafield()->kirbytext() ?> in a template

Your setup

Kirby Version
Kirby 4

Console output
Call to a member function url() on null in /kirby/config/tags.php line 200

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