adrian Posted August 13, 2014 Share Posted August 13, 2014 I have fixed the issue initially reported by @Raul and noted again by @lisandi. Attached is a working version. Please let me know if you still have any problems with it. FieldtypeTemplates.zip 2 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted August 13, 2014 Share Posted August 13, 2014 Thanks, FieldtypeTemplates is one of my favorites 1 Link to comment Share on other sites More sharing options...
Hani Posted August 17, 2014 Author Share Posted August 17, 2014 Thanks for all the prompts to get this updated and out on GitHub, everyone. My apologies for not doing it a long time ago! Here's the modules directory entry: http://modules.processwire.com/modules/fieldtype-templates/ Out on GitHub: https://github.com/Hani79/Processwire_FieldType_Templates Shout out to @adrian for fixing the bug reported by @Raul and @lisandi 5 Link to comment Share on other sites More sharing options...
MuchDev Posted November 2, 2015 Share Posted November 2, 2015 I know this module is a bit older but I figured I would bump it to see if anyone knew the answer. I was going to use this on a module and was having a hard time implementing it. It looks to function perfectly attached to templates, but when I try and use it in my module I get the error: Method FieldtypeTemplates::setParent does not exist or is not callable in this context. I have checked and there doesn't seem to be any issues with a standard asm field. Anyone happen to know what I am doing wrong? $inputfields = new InputfieldWrapper(); $modules = Wire::getFuel('modules');//I was using wire('modules') with the same result, I just wanted to try this method $f = $modules->get("FieldtypeTemplates"); $inputfields->add($f); Link to comment Share on other sites More sharing options...
LostKobrakai Posted November 2, 2015 Share Posted November 2, 2015 First of all, fieldtype modules are not inputfields, so your posted code does not work no matter which field you actually want to add. Additionally some inputfields depend on their corresponding fieldtype, which makes them unusable in plain inputfield mode, which the module settings are using. Fieldtypes are only used in context of templates, as they handle things like persisting data to the db, which is only needed for pages. This module does not even have an inputfield, because it's using the core one, so to get the same functionality in the modules settings you can copy the code from the getInputfield() function of the module into your code. 3 Link to comment Share on other sites More sharing options...
MuchDev Posted November 2, 2015 Share Posted November 2, 2015 Thanks man, I just thought there might be a naming convention issue. Thanks for the response, should do the trick! Link to comment Share on other sites More sharing options...
Lance O. Posted June 25, 2016 Share Posted June 25, 2016 Selections aren't being retained or are being automatically selected/deselected in the "Template Types" area under the "Details" tab. If I make multiple edits to these checkboxes and save the page after each edit, the module is confused about my settings and messes up what I selected. :-( Link to comment Share on other sites More sharing options...
kixe Posted July 3, 2016 Share Posted July 3, 2016 @Lance O. If you use PW Version 3.0.22 you should make an update to the last available version. This should solve your problems. The date of your post looks a bit '3.0.22ish'@Hani Thanks for this great module. It is working as expected. Even in the latest 3.0.x I made the inputfield selectable to make all subclasses of 'InputfieldSelect' available. FieldTypeTemplates.zip 1 Link to comment Share on other sites More sharing options...
Karl_T Posted October 8, 2017 Share Posted October 8, 2017 On 2016/7/3 at 11:38 AM, kixe said: I made the inputfield selectable to make all subclasses of 'InputfieldSelect' available. FieldTypeTemplates.zip Hi @kixe, I found that single select is not working. I have fixed the issue based on your files. I forked the original repo here: Github 1 Link to comment Share on other sites More sharing options...
kixe Posted October 9, 2017 Share Posted October 9, 2017 @Karl_T I fixed this too but without publishing here. Sorry for this Furthermore I added options for the label etc. In the environments I use it (latest PW) everything works as expected, even single select. I forked now the original module and pushed my latest version on github.https://github.com/kixe/Processwire_FieldType_Templates 3 1 Link to comment Share on other sites More sharing options...
AndreasWeinzierl Posted October 17, 2022 Share Posted October 17, 2022 I have tried updating from 3.x to 3.0.200, however I get the following error in my log: 2022-10-17 19:51:04 ? Fatal Error: Uncaught Error: Class "FieldtypeMulti" not found in site/modules/FieldtypeTemplates/FieldtypeTemplates.module:30 Stack trace: #0 /wire/core/Modules.php(1686): include_once() #1 /wire/core/Modules.php(1605): ProcessWire\Modules->includeModuleFile() #2 /wire/core/WireClassLoader.php(284): ProcessWire\Modules->includeModule() #3 [internal function]: ProcessWire\WireClassLoader->loadClass() #4 /wire/core/Modules.php(2739): class_exists() #5 /wire/core/Modules.php(3023): ProcessWire\Modules->getModuleInfoInternal() #6 /wire/core/Modules.php(1106): ProcessWire\Modules->getModuleInfo() #7 wire/core/Modules.php(913): ProcessWire\Modules->loadModule() #8 /wire/core/Modules.php(389): ProcessWire\Modules->load() #9 /wire/core/ProcessWire.php(536): ProcessWire\Modules->init() #10 /wire/core/ProcessWire.php(314): ProcessWire\ProcessWire->load() #11 /index.php(52): ProcessWire\ProcessWire->__construct() #12 {main} thrown (line 30 of /site/modules/FieldtypeTemplates/FieldtypeTemplates.module) Any ideas? Link to comment Share on other sites More sharing options...
theoretic Posted May 12, 2023 Share Posted May 12, 2023 On 10/18/2022 at 12:24 AM, AndreasWeinzierl said: I have tried updating from 3.x to 3.0.200, however I get the following error in my log: 2022-10-17 19:51:04 ? Fatal Error: Uncaught Error: Class "FieldtypeMulti" not found in site/modules/FieldtypeTemplates/FieldtypeTemplates.module:30 Stack trace: #0 /wire/core/Modules.php(1686): include_once() #1 /wire/core/Modules.php(1605): ProcessWire\Modules->includeModuleFile() #2 /wire/core/WireClassLoader.php(284): ProcessWire\Modules->includeModule() #3 [internal function]: ProcessWire\WireClassLoader->loadClass() #4 /wire/core/Modules.php(2739): class_exists() #5 /wire/core/Modules.php(3023): ProcessWire\Modules->getModuleInfoInternal() #6 /wire/core/Modules.php(1106): ProcessWire\Modules->getModuleInfo() #7 wire/core/Modules.php(913): ProcessWire\Modules->loadModule() #8 /wire/core/Modules.php(389): ProcessWire\Modules->load() #9 /wire/core/ProcessWire.php(536): ProcessWire\Modules->init() #10 /wire/core/ProcessWire.php(314): ProcessWire\ProcessWire->load() #11 /index.php(52): ProcessWire\ProcessWire->__construct() #12 {main} thrown (line 30 of /site/modules/FieldtypeTemplates/FieldtypeTemplates.module) Any ideas? Hi @AndreasWeinzierl! Got into same trouble. Fortunatelty, it can be fixed quite easily. Just uncomment //namespace ProcessWire; at the very beginning of the module. Have no guess why @kixe had commented it. Works fine after uncommenting, at least for me ) 1 Link to comment Share on other sites More sharing options...
kixe Posted May 13, 2023 Share Posted May 13, 2023 On 5/12/2023 at 4:42 PM, theoretic said: Have no guess why @kixe had commented it. Done ... 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now