# Blueprint Issues after Kirby2 to 3 upgrade

**URL:** https://forum.getkirby.com/t/blueprint-issues-after-kirby2-to-3-upgrade/20888
**Category:** Questions
**Tags:** v3
**Created:** [January 22, 2021, 10:08am UTC](https://forum.getkirby.com/t/blueprint-issues-after-kirby2-to-3-upgrade/20888 "2021-01-22T10:08:53Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![helloanselm](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/helloanselm/32/11487_2.png) [@helloanselm](https://forum.getkirby.com/u/helloanselm)
#### Post date: [January 22, 2021, 10:08am UTC](https://forum.getkirby.com/t/blueprint-issues-after-kirby2-to-3-upgrade/20888/1 "2021-01-22T10:08:53Z")

</div>

Hi folks,

I’m upgrading a project to Kirby 3 and now get issues with the blueprints that I couldn’t find a solution for. So hopefully someone can help me out here or give me a hint.

If you need more info, let me know what exactly I should provide as well.

On panel pages (actually all of the pages get redirected to /panel/site) I get the following error:

> **The section “pages” could not be loaded:** `Kirby\Cms\Blueprint::extend(): Return value must be of type array, int returned`

site.yml:

```
title: Site
columns:
- width: 1/2
	sections:
		pages: true
- width: 1/2
	fields:
		title:
			label: Title
			type: text

```

Thanks for any hint.  
Anselm

---

<div class="post-metadata">

### Author: ![pixelijn](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pixelijn](https://forum.getkirby.com/u/pixelijn)
#### Post date: [January 22, 2021, 10:16am UTC](https://forum.getkirby.com/t/blueprint-issues-after-kirby2-to-3-upgrade/20888/2 "2021-01-22T10:16:28Z")

</div>

The indentation of the `- width` parameter is wrong, if this is not a copy/paste error.

Also, you have to remove the title field, the title is added automatically, therefore a field named title must not be present.

> [@helloanselm](#):
>
> ```auto
> sections:
> pages: true
> 
> ```

You cannot set a section to true.

```auto
title: Site
columns:
  - width: 1/2
    sections:
      pages:
        type: pages
        # other section options here  
  - width: 1/2
    fields:
      # fields here but no title field

```

---

<div class="post-metadata">

### Author: ![helloanselm](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/helloanselm/32/11487_2.png) [@helloanselm](https://forum.getkirby.com/u/helloanselm)
#### Post date: [January 22, 2021, 10:32am UTC](https://forum.getkirby.com/t/blueprint-issues-after-kirby2-to-3-upgrade/20888/3 "2021-01-22T10:32:29Z")

</div>

@pixelijn Thanks, forgot about the title issue again. Unfortunately, this isn’t solving the described error. I even took your example as the `site.yml` blueprint and it outputs the exact same error as before. So I assume the issue is somewhere else than the blueprint itself?

---

<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: [January 22, 2021, 9:49pm UTC](https://forum.getkirby.com/t/blueprint-issues-after-kirby2-to-3-upgrade/20888/4 "2021-01-22T21:49:01Z")

</div>

If the code @pixelijn posted is the only code in your site.yml, then it should work.

---

<div class="post-metadata">

### Author: ![helloanselm](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/helloanselm/32/11487_2.png) [@helloanselm](https://forum.getkirby.com/u/helloanselm)
#### Post date: [January 23, 2021, 7:30am UTC](https://forum.getkirby.com/t/blueprint-issues-after-kirby2-to-3-upgrade/20888/5 "2021-01-23T07:30:23Z")

</div>

It’s the only code I currently use. It’s still returning the same error. That’s why I think it must have to do something with the upgrade, however I have no clue where to start. I used the upgrade guide and the project doesn’t have too much custom stuff in there anymore.

Unfortunately, I don’t have any starting point for debugging this here now. If anyone has an idea, let me know.

---

<div class="post-metadata">

### Author: ![helloanselm](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/helloanselm/32/11487_2.png) [@helloanselm](https://forum.getkirby.com/u/helloanselm)
#### Post date: [January 23, 2021, 7:53am UTC](https://forum.getkirby.com/t/blueprint-issues-after-kirby2-to-3-upgrade/20888/6 "2021-01-23T07:53:05Z")

</div>

I now tried again to use only the site.yml from starterkit. It results in the same error, also when flushing content from site.txt file.  
I reinstalled the kirby folder via composer as well (3.5) so not sure what else I could do now.

---

<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: [January 23, 2021, 8:54am UTC](https://forum.getkirby.com/t/blueprint-issues-after-kirby2-to-3-upgrade/20888/7 "2021-01-23T08:54:17Z")

</div>

> [@helloanselm](#):
>
> Kirby\Cms\Blueprint::extend()

Hm, I wonder if there are problems in other pages’ blueprints that are loaded through the pages section.

The error seems to point to an extend property used in one of the blueprints.

---

<div class="post-metadata">

### Author: ![helloanselm](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/helloanselm/32/11487_2.png) [@helloanselm](https://forum.getkirby.com/u/helloanselm)
#### Post date: [January 23, 2021, 10:08am UTC](https://forum.getkirby.com/t/blueprint-issues-after-kirby2-to-3-upgrade/20888/8 "2021-01-23T10:08:56Z")

</div>

Yep, that was the hint that helped, thanks! It was in one of the `pages/a.yml` blueprints and an indentation issue in there:

incorrect (issue made visible by wrong tab indent):

```
sections:
	pages:
		type: pages
	flip: true
	limit: 999
	title:
		…

```

correct:

```
sections:
	pages:
		type: pages
    	flip: true
    	limit: 999
	title:
		…

```

What I still don’t understand is that there’s no `extend` property used anywhere so far and it made the entire panel non-working, even though this error was just in one of the many blueprints.

Could this be improved, either in the error reporting or better in the way how blueprints are loaded individually?

---

<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: [January 23, 2021, 10:17am UTC](https://forum.getkirby.com/t/blueprint-issues-after-kirby2-to-3-upgrade/20888/9 "2021-01-23T10:17:31Z")

</div>

> [@helloanselm](#):
>
> better in the way how blueprints are loaded individually?

Kirby has to read the blueprints of stuff it loads, for example, to determine if a page may be shown in a section or not (think `read: false`).

The error message at least gave a hint what was wrong, and I think it probably refers to some sort of inner extending happening here without you actually having to extend something explicitly in a blueprint. But yes, the error message could be improved.

It’s something that is also worth a note in the docs.
