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

Kirbytag helper function not working as expected #2474

Closed
lukaskleinschmidt opened this issue Feb 25, 2020 · 2 comments
Closed

Kirbytag helper function not working as expected #2474

lukaskleinschmidt opened this issue Feb 25, 2020 · 2 comments

Comments

@lukaskleinschmidt
Copy link
Contributor

@lukaskleinschmidt lukaskleinschmidt commented Feb 25, 2020

Describe the bug
Right now it is not possible to pass a page (parent) reference to the helper function.

// does not work
echo kirbytag('image', 'some-image.jpg', [
  'parent' => $page,
]);

// using the kirbytags helper works though
echo kirbytags('(image: some-image.jpg)', [
  'parent' => $page,
]);

After some digging I probably found the issue. I can't tell if this is by design or just an oversight but the Kirby\Cms\App uses the Kirby\Text\KirbyTag class instead of the extended Kirby\Cms\KirbyTag one. I think that this is indeed a bug and not a feature 🙂
So deleting this line fixes the issue:

https://github.com/getkirby/kirby/blob/3.3.4/src/Cms/App.php#L15

Kirby Version
3.3.3

@afbora

This comment has been minimized.

Copy link
Contributor

@afbora afbora commented Feb 25, 2020

@lukaskleinschmidt Great caught! 👍

afbora added a commit that referenced this issue Mar 2, 2020
@afbora afbora mentioned this issue Mar 2, 2020
4 of 4 tasks complete
@afbora afbora self-assigned this Mar 2, 2020
@afbora afbora linked a pull request that will close this issue Mar 2, 2020
4 of 4 tasks complete
afbora added a commit that referenced this issue Mar 2, 2020
@bastianallgeier

This comment has been minimized.

Copy link
Contributor

@bastianallgeier bastianallgeier commented Mar 5, 2020

@bastianallgeier bastianallgeier added this to the 3.3.5 milestone Mar 5, 2020
bastianallgeier added a commit that referenced this issue Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.