-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Add failsafe for permalinksToUrls method if uuid does not exist #6165
Comments
I just noticed the same issue outside of blocks. In this case the whole website went down because a page was deleted. I'd personally classify this as a bug instead of an enhancement. To reproduce
Edit: |
I recently discussed this issue with @mrflix and he rightfully suggested it might help to talk about the expected behaviour: The (link: ) tag deals with this in a very elegant way in my opinion. When debug mode is on, an exception is thrown, otherwise the error page's URL is used. I'd expect the In the meantime, as mentioned in my previous comment, I think the Kirby community would really appreciate a disclaimer in the docs. Not everyone looks at the source code and the method is there for a reason. |
I'ld categorize this as a bug as well as it crashes page rendering in unexpected situations. Is there any update on this? |
Sorry that it took so long. This is definitely a bug. I just submitted a PR for it #6313 |
Description
Example: A text block has an inline link to a page. If the linked page is deleted and the uuid does not exist anymore, the following error is displayed:
Because in the
permalinksToUrls
method, the$url
in this line isnull
:https://github.com/getkirby/kirby/blob/main/config/methods.php#L488
Your setup
Kirby Version
4.0.3
The text was updated successfully, but these errors were encountered: