Field Input Type doesn't work in CB-Templates

Hi, I try to create a Content Blocks Template, but can’t add a field with Input Type Dropdown.
It*s grayed out and has a spinning loading icon after it’s added and it disappears when saving.

The same field does work in regular resources. I tried it with multiple Dropdown-Fields on multiple pages.

Content Blocks Version 1.12.0-rc2 and 1.12.0-rc3

Hi @desper

Thanks for reporting it! That one’s actually already been fixed in our development version, and will be included soon in the next release.

In the mean time, you could fix it manually by going to the file

assets/components/contentblocks/js/inputs/dropdown.js

and change line 39 from:

context: MODx.activePage.record.context_key,

to:

context: MODx.activePage.record ? MODx.activePage.record.context_key : 'web',

You would then also need to set the system setting contentblocks.debug to 1.
(You can unset this once the new release comes out and you’ve updated it)

1 Like

awesome. thank you!

1 Like

Hi @desper,

Just to let you know the version 1.12.0-pl has just been released with those fixes applied. When you upgrade, don’t forget to unset the contentblocks.debug system setting. :wink:

2 Likes