getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.27k stars 167 forks source link

[3.6.0-alpha.4] Custom sections doesn't working #3627

Closed afbora closed 3 years ago

afbora commented 3 years ago

Describe the bug

The section type "modified" is not valid

I'm getting above error when i try to implement custom sections like following sample. Btw I've tested on 3.6.0-alpha.1 and doesn't working too. But working on 3.5.7.1.

Kirby::plugin('yourname/modified', [
    'sections' => [
        'modified' => [
            'props' => [
                'headline' => function ($headline) {
                    return $headline;
                }
            ]
        ]
    ]
]);

Kirby Version

3.6.0-alpha.4

afbora commented 3 years ago

Source of this issue is pagetable plugin with following error. Also this issue brokes other plugins load. I added to broken list https://github.com/getkirby/kirby/issues/3485

Uncaught TypeError: Cannot read property 'TYPED_ARRAY_SUPPORT' of undefined

afbora commented 3 years ago

@distantnative @bastianallgeier I've tracked down the issue and found the source of issue. We started to use <script type="module"> in Panel 3.6.0 and parcel doesn't support that: https://github.com/parcel-bundler/parcel/issues/2833 Should I open a separate issue? Seemed like a big problem to me.

distantnative commented 3 years ago

Yes please. That could be a big issue indeed. As far as I know we need type module for vite to work.

afbora commented 3 years ago

I've created new issue about that https://github.com/getkirby/kirby/issues/3628