Closed svonlanthen closed 1 year ago
Whoops, thanks for pointing that out! Should be fixed now in 1.0.1.
@ttempleton Thank you - Installed the Update and works fine! Looking forward to work with this respectively the clients. In my opinion, paired with Neo, this is a great feature!
Bug Description
Creating new content template does not do anything
Test Payload on Axios-Call: entryType: "default" section:"test" siteId: 2
Response from Axios-Call on http://expo.ddev.site/index.php?p=admin%2Factions%2Fcontent-templates%2Fcp%2Fcreate&site=de&v=1689341958249
"Request missing required body param"
{ "name": "PHP Warning", "message": "Undefined variable $structuresService", "code": 2, "error": "Undefined variable $structuresService", "exception": "yii\\base\\ErrorException", "file": "/var/www/html/vendor/spicyweb/craft-content-templates/src/services/ProjectConfig.php", "line": 184, "trace": [ { "file": "/var/www/html/vendor/craftcms/cms/src/web/ErrorHandler.php", "line": 79, "function": "handleError", "class": "yii\\base\\ErrorHandler", "type": "->" }, { "file": "/var/www/html/vendor/spicyweb/craft-content-templates/src/services/ProjectConfig.php", "line": 184, "function": "handleError", "class": "craft\\web\\ErrorHandler", "type": "->" }, { "file": "/var/www/html/vendor/spicyweb/craft-content-templates/src/services/ProjectConfig.php", "line": 156, "function": "_structureId", "class": "spicyweb\\contenttemplates\\services\\ProjectConfig", "type": "->" }, { "function": "spicyweb\\contenttemplates\\services\\{closure}", "class": "spicyweb\\contenttemplates\\services\\ProjectConfig", "type": "->" }, { "file": "/var/www/html/vendor/yiisoft/yii2/db/Connection.php", "line": 818, "function": "call_user_func" }, { "file": "/var/www/html/vendor/spicyweb/craft-content-templates/src/services/ProjectConfig.php", "line": 108, "function": "transaction", "class": "yii\\db\\Connection", "type": "->" }, { "file": "/var/www/html/vendor/spicyweb/craft-content-templates/src/elements/ContentTemplate.php", "line": 318, "function": "save", "class": "spicyweb\\contenttemplates\\services\\ProjectConfig", "type": "->" }, { "file": "/var/www/html/vendor/craftcms/cms/src/services/Elements.php", "line": 3166, "function": "afterSave", "class": "spicyweb\\contenttemplates\\elements\\ContentTemplate", "type": "->" }, { "file": "/var/www/html/vendor/craftcms/cms/src/services/Elements.php", "line": 1062, "function": "_saveElementInternal", "class": "craft\\services\\Elements", "type": "->" }, { "file": "/var/www/html/vendor/craftcms/cms/src/services/Drafts.php", "line": 244, "function": "saveElement", "class": "craft\\services\\Elements", "type": "->" }, { "file": "/var/www/html/vendor/spicyweb/craft-content-templates/src/controllers/CpController.php", "line": 203, "function": "saveElementAsDraft", "class": "craft\\services\\Drafts", "type": "->" }, { "function": "actionCreate", "class": "spicyweb\\contenttemplates\\controllers\\CpController", "type": "->" }, { "file": "/var/www/html/vendor/yiisoft/yii2/base/InlineAction.php", "line": 57, "function": "call_user_func_array" }, { "file": "/var/www/html/vendor/yiisoft/yii2/base/Controller.php", "line": 178, "function": "runWithParams", "class": "yii\\base\\InlineAction", "type": "->" }, { "file": "/var/www/html/vendor/yiisoft/yii2/base/Module.php", "line": 552, "function": "runAction", "class": "yii\\base\\Controller", "type": "->" }, { "file": "/var/www/html/vendor/craftcms/cms/src/web/Application.php", "line": 304, "function": "runAction", "class": "yii\\base\\Module", "type": "->" }, { "file": "/var/www/html/vendor/craftcms/cms/src/web/Application.php", "line": 607, "function": "runAction", "class": "craft\\web\\Application", "type": "->" }, { "file": "/var/www/html/vendor/craftcms/cms/src/web/Application.php", "line": 283, "function": "_processActionRequest", "class": "craft\\web\\Application", "type": "->" }, { "file": "/var/www/html/vendor/yiisoft/yii2/base/Application.php", "line": 384, "function": "handleRequest", "class": "craft\\web\\Application", "type": "->" }, { "file": "/var/www/html/public/index.php", "line": 12, "function": "run", "class": "yii\\base\\Application", "type": "->" } ] }
Steps to reproduce
Expected behaviour
Should open the interface to pick fields like shown on Screenshot on https://plugins.craftcms.com/content-templates?craft4
Content Templates version
1.0.0
Craft CMS version
4.4.15