# Using Kirby Webpack Starterkit together with Sortable/Modules Plugin

**URL:** <https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889>\
**Category:** Questions\
**Tags:** v2\
**Created:** [December 27, 2018, 6:37pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889 "2018-12-27T18:37:11Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![ToGe88](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@ToGe88](https://forum.getkirby.com/u/ToGe88)\
**Post date:** [December 27, 2018, 6:37pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/1 "2018-12-27T18:37:11Z")

</div>

Hey there,

for a new project, i’d like to use the Kirby Webpack Starterkit from @pqml as mentioned in another Topic. But there seem to be some behavioral problems with either the Modules/Sortable Plugin.

With the Modules Field i get the following error:

 ![48](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/0/07429385f7fc5750a80e3bd5d8af6659d3ef7410.png)

And with the Sortable Field i get parse errors when i try to duplicate a page:

 ![04](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/d/dbddf7634320419867917a4bef0a0b1994d894e1.png)

I normally don’t get this errors. Is it possible that with the Kirby Webpack Starterkit moving the site structure to a parent folder www/ is causing some problems? Did someone else have this problem in the past and could figure it out?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 27, 2018, 6:47pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/2 "2018-12-27T18:47:08Z")

</div>

What is the modules field? I only know the modules plugin and that is not installed in the fields folder, but the plugins folder.

BTW: when referring to (third-party) plugins, always post a link.

---

<div class="post-metadata">

**Author:** ![ToGe88](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@ToGe88](https://forum.getkirby.com/u/ToGe88)\
**Post date:** [December 27, 2018, 10:30pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/3 "2018-12-27T22:30:30Z")

</div>

Hey texnixe,

i’m referring to the Sortables Plugin (since this would be my optimum solution for now). I followed the Setup Instructions for the invisible modules Folder as said in the Modules Plugin GitHub and then set the fields options for the Sortable Plugin accordingly:

```auto
title: Section
pages: 
  template: section
  build:
    - title: modules
      uid: modules
      template: modules
files: false
fields:
  title:
    label: Title
    type: text
  text:
    label: Text
    type: textarea
  modules_field:
    label: Modules
    type: sortable
    parent: modules

```

i then get the parse error when trying to paste some module and get the strange error that i can’t sort the modules anymore when i dragged one of them…

Any Suggestions?

Kind regards Tobi

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 27, 2018, 10:34pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/4 "2018-12-27T22:34:20Z")

</div>

What I was referring to was the first error message. It seems that you put the modules plugin into the fields folder instead of in the plugin folder. Maybe that also causes the second problem, but not sure.

---

<div class="post-metadata">

**Author:** ![ToGe88](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@ToGe88](https://forum.getkirby.com/u/ToGe88)\
**Post date:** [December 27, 2018, 10:56pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/5 "2018-12-27T22:56:18Z")

</div>

No i only have the modules Plugin in the plugins-folder and the sortable Plugin. Both plugins are registered in the kirby.config.json. What am i doing wrong here?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 27, 2018, 11:03pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/6 "2018-12-27T23:03:12Z")

</div>

I don’t know, I’m not familiar with this kit, but if you look at the error message in your first screenshot and where it is caused, it says`/site/fields/modules/modules.php`, so where does this come from if it is installed in the plugins folder?

---

<div class="post-metadata">

**Author:** ![ToGe88](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@ToGe88](https://forum.getkirby.com/u/ToGe88)\
**Post date:** [December 27, 2018, 11:37pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/7 "2018-12-27T23:37:33Z")

</div>

As i said i don’t get both errors together. Since i now only use the Sortable Plugin only the parse error occurs. I get an console error when clicking on the second (copied) one…See this GIF:

 ![53](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/c/c3c7031936eed3d9db29ebe2e9f61448ae91ab2d.gif)

But i recognized that the new ones still have a dot in the uid but the first doesn’t:

 ![28](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/3/37362bf85c4b332ce9b242356de68c1dc570b3e4.png)

And still some console error occurs before it goes to the parse error debugger but it’s too fast to read it…

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [December 27, 2018, 11:39pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/8 "2018-12-27T23:39:58Z")

</div>

I just setup a fresh copy of the kirby webpack together with sortable and the modules. I also brought code from a site i know works fine with these plugins, with kirby 2.5.12 and it all breaks. Kirby webpack seems to mess with the way configs and stuff work out of the box. It’s late and im tired so maybe i made a mistake somewhere, but im pretty sure something in the way that kirby webpack works is interfering with the modules plugin.

---

<div class="post-metadata">

**Author:** ![ToGe88](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@ToGe88](https://forum.getkirby.com/u/ToGe88)\
**Post date:** [December 27, 2018, 11:57pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/9 "2018-12-27T23:57:56Z")

</div>

Okay Thank you Jimbo, since i was setting up so many projects with the same Plugins before i really was wondering what the hack happened there… So glad you ran into the same errors… ☹

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 28, 2018, 12:23am UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/10 "2018-12-28T00:23:54Z")

</div>

I just tested a fresh Webpack kit with just the sortable plugin (without the modules plugin) and it works without any problems, using your blueprint from above.

Maybe the problem is that your “modules” that are no longer modules have a prefix that is not defined in the blueprint? Only guessing here…

---

<div class="post-metadata">

**Author:** ![ToGe88](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@ToGe88](https://forum.getkirby.com/u/ToGe88)\
**Post date:** [December 28, 2018, 11:10am UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/11 "2018-12-28T11:10:25Z")

</div>

But how else should I bre able to use the structure of the modules as recommended with a modules folder under /site?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 28, 2018, 11:17am UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/12 "2018-12-28T11:17:55Z")

</div>

But didn’t you say above that you are not using the modules plugin anymore, only the sortable plugin? I’m confused.

Maybe you can provide steps to reproduce or provide the project as a .zip and send me a download link via PM.

Edit: I now added the modules plugin to the set and it still works without any problems.

---

<div class="post-metadata">

**Author:** ![ToGe88](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@ToGe88](https://forum.getkirby.com/u/ToGe88)\
**Post date:** [December 28, 2018, 12:25pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/13 "2018-12-28T12:25:29Z")

</div>

When i use the sortable Plugin without the modules structure under /site just by using default pages i don’t get the console error. But still get the parse error Debugger when i try to paste in a page (Button on the left next to copy). You don’t get this error?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 28, 2018, 12:28pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/14 "2018-12-28T12:28:09Z")

</div>

No, as I said, no console error and no PHP parse error. Kirby 2.5.12 and php 7.2.10.

I used the examples from the demo branch of the modules plugin, put them into `site/modules`. Then selected either the gallery or the text module when creating new modules via the sortable field.

---

<div class="post-metadata">

**Author:** ![ToGe88](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@ToGe88](https://forum.getkirby.com/u/ToGe88)\
**Post date:** [December 28, 2018, 12:31pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/15 "2018-12-28T12:31:01Z")

</div>

Hm then i don’t know. Could you send me the yml of the page you were using sortable on? Is it with the described build of the modules parent page? That would be very nice.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 28, 2018, 12:33pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/16 "2018-12-28T12:33:03Z")

</div>

It’s the code from above:

```auto
title: Section
pages: 
  template: section
  build:
    - title: modules
      uid: modules
      template: modules
files: false
fields:
  title:
    label: Title
    type: text
  text:
    label: Text
    type: textarea
  modules_field:
    label: Modules
    type: sortable
    parent: modules

```

And my modules.yml

```auto
title: Modules
pages:
  template:
    - module.text
    - module.gallery

```

---

<div class="post-metadata">

**Author:** ![ToGe88](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@ToGe88](https://forum.getkirby.com/u/ToGe88)\
**Post date:** [December 28, 2018, 12:40pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/17 "2018-12-28T12:40:36Z")

</div>

Hm i don’t know what i am doing wrong here. Same Blueprint same errors. Since i’m at the very beginning of the project, could you send me your ZIP for the whole Setup? That would be nice.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 28, 2018, 2:29pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/18 "2018-12-28T14:29:17Z")

</div>

When using modules, you should use the modules field instead of the sortable field, that prevents the dots when duplicating modules.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:25pm UTC](https://forum.getkirby.com/t/using-kirby-webpack-starterkit-together-with-sortable-modules-plugin/11889/19 "2025-02-06T17:25:35Z")

</div>


