fabianmichael / kirby-markdown-field

Super-sophisticated markdown editor for Kirby 3, community built.
Other
160 stars 14 forks source link

pagelink dialog does not return results #170

Closed MacGyer closed 1 year ago

MacGyer commented 1 year ago

Hello,

I am using kirby-markdown-field and have enabled the pagelink button.

Unfortunately, there is no page to select, as the API calls returns an 404.

grafik

The actual API call: http://redacted-domain.com/api/pages/home/fields/contentblocks/fieldsets/markdown/fields/text/pages?page=0

grafik

Following is the blueprint file in blueprints/fields which is then used in the actual field via extends:

buttons:
    headlines:
        - h1
        - h2
        - h3
        - h4
        - h5
        - h6
    bold: '**'
    italic: '_'
    ul: '-'
    ol: true
    link:
        blank: true
    pagelink: true
    blockquote: true
    hr: '---'
size: medium

How do I configure the pagelink button?

What else do you need to inspect the issue?

Thanks in advance.

olivertedwards commented 1 year ago

I am also having this issue since Kirby 3.9.5, which was released today. Perhaps the update is the culprit? :)

fabianmichael commented 1 year ago

I was able to re-produce that issue, but only when extending the markdown block without setting the field type in the block blueprint to markdown. Internally, Kirby’s markdown block uses a textarea in the modal, but the block preview uses a markdown field. Those are pretty similiar, but the textarea field type does not have the pages endpoint. Please update your blueprints to test whether the issue still occurs after that.

MacGyer commented 1 year ago

@fabianmichael thx for investigating. I put the type: markdown in my extended field and it works!