If I simply run this as per the /wire/core/Templates/API.md doc :
$template = $templates->new('product');
Then go to the templates section in the admin (/admin/setup/templates), the following error occurs:
TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in wire/modules/Process/ProcessTemplate/ProcessTemplate.module:517
#0 wire/modules/Process/ProcessTemplate/ProcessTemplate.module (517): count()
#1 wire/core/Wire/Wire.php (411): ProcessTemplate->___getListTableRow()
#2 wire/core/WireHooks/WireHooks.php (1077): Wire->_callMethod()
#3 wire/core/Wire/Wire.php (476): WireHooks->runHooks()
#4 wire/modules/Process/ProcessTemplate/ProcessTemplate.module (413): Wire->__call()
#5 wire/core/Wire/Wire.php (408): ProcessTemplate->___getListTable()
#6 wire/core/WireHooks/WireHooks.php (1077): Wire->_callMethod()
#7 wire/core/Wire/Wire.php (476): WireHooks->runHooks()
#8 wire/modules/Process/ProcessTemplate/ProcessTemplate.module (251): Wire->__call()
#9 wire/core/Wire/Wire.php (405): ProcessTemplate->___execute()
#10 wire/core/WireHooks/WireHooks.php (1077): Wire->_callMethod()
#11 wire/core/Wire/Wire.php (476): WireHooks->runHooks()
#12 wire/core/ProcessController/ProcessController.php (364): Wire->__call()
#13 wire/core/Wire/Wire.php (405): ProcessController->___execute()
#14 wire/core/WireHooks/WireHooks.php (1077): Wire->_callMethod()
#15 wire/core/Wire/Wire.php (476): WireHooks->runHooks()
#16 wire/core/admin.php (174): Wire->__call()
#17 site/templates/admin.php (18): require('...')
#18 wire/core/TemplateFile/TemplateFile.php (328): require('...')
#19 wire/core/Wire/Wire.php (405): TemplateFile->___render()
#20 wire/core/WireHooks/WireHooks.php (1077): Wire->_callMethod()
#21 wire/core/Wire/Wire.php (476): WireHooks->runHooks()
#22 wire/modules/PageRender.module (547): Wire->__call()
#23 wire/core/Page/Page.php (3092): PageRender->render()
#24 wire/core/Wire/Wire.php (408): Page->___renderPage()
#25 wire/core/WireHooks/WireHooks.php (1077): Wire->_callMethod()
#26 wire/core/Wire/Wire.php (476): WireHooks->runHooks()
#27 wire/core/Page/Page.php (3037): Wire->__call()
#28 wire/core/Wire/Wire.php (405): Page->___render()
#29 wire/core/WireHooks/WireHooks.php (1077): Wire->_callMethod()
#30 wire/core/Wire/Wire.php (476): WireHooks->runHooks()
#31 wire/modules/Process/ProcessPageView.module (211): Wire->__call()
#32 wire/modules/Process/ProcessPageView.module (116): ProcessPageView->renderPage()
#33 wire/core/Wire/Wire.php (408): ProcessPageView->___execute()
#34 wire/core/WireHooks/WireHooks.php (1077): Wire->_callMethod()
#35 wire/core/Wire/Wire.php (476): WireHooks->runHooks()
#36 index.php (60): Wire->__call()
#37 {main}
If I simply run this as per the
/wire/core/Templates/API.mddoc :Then go to the templates section in the admin (/admin/setup/templates), the following error occurs: