artaylor Posted July 17, 2016 Share Posted July 17, 2016 Hi Martijn, Excellent module that I have used a number of times! I am using it on a site running version 3.0.11 of PW and it was working fine. I just tried to upgrade the site to 3.0.25 an error (see below). I then noticed that InputFieldSelectFile is not actually PW 3 compatible (LOL). So, 2 questions: 1. Are you planning to make an official PW 3 compatible version? 2. Any idea what might be causing this error until then? If I switch back to 3.0.11 it works fine. I clear the compiler cache every time. Notice: Trying to get property of non-object in/home/anthony/Projects/fetishfantasystudios.com/site/assets/cache/FileCompiler/site/modules/FieldtypeSelectFile/FieldtypeSelectFile.moduleon line 64 Thanks, and keep up the great work! Anthony Link to comment Share on other sites More sharing options...
Peter Knight Posted August 6, 2016 Share Posted August 6, 2016 Hi @martijn-geerts I'm testing this for the first time on 2.8.29 and am getting the following error Quote Trying to get property of non-object in /var/www/vhosts/mydomain.com/httpdocs/site/modules/FieldtypeSelectFile/FieldtypeSelectFile.module on line 64 It doesn't say it's 2.8 compatible but was wondering if you had plans to try it? I can always revert to 2.7.3 etc but thought I'd ask. Many thanks P Link to comment Share on other sites More sharing options...
Martijn Geerts Posted August 11, 2016 Author Share Posted August 11, 2016 Hi @Peter Knight, first of all: sorry I didn't seen your message before (Still not really used to the new forum I guess). Ok, I installed a clean ProcessWire 2.8.29, installed FieldtypeSelectFile and everthing looks fine from here. Are there steps for me to reproduce the error? And did you pressed submit on the module-info interface? (/processwire/module/edit?name=FieldtypeSelectFile) Link to comment Share on other sites More sharing options...
Peter Knight Posted August 13, 2016 Share Posted August 13, 2016 Hey @Martijn Geerts No worries. In the end I upgraded and it worked with PW 3.X Soon after testing it, the project I was working on required functionality outside of the Modules scope. Thanks for replying though. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted June 26, 2019 Author Share Posted June 26, 2019 There has been a small update on this module thanks to @Jonathan Lahijani. @Jonathan Lahijani added: PHP files can have a comment called "Description" at the top of the file which will be displayed in the dropdown if it exists. Check this option to disable it. 4 Link to comment Share on other sites More sharing options...
heldercervantes Posted July 27, 2020 Share Posted July 27, 2020 Just to add a suggestion. This field can't be used as a condition for another field's visibility. It's an easy fix though, just have to add an ID to the field (matching the name) and it starts working. 1 Link to comment Share on other sites More sharing options...
DV-JF Posted March 17, 2021 Share Posted March 17, 2021 On 7/28/2020 at 12:44 AM, heldercervantes said: Just to add a suggestion. This field can't be used as a condition for another field's visibility. It's an easy fix though, just have to add an ID to the field (matching the name) and it starts working. Stumble upon this.... After reading and reading again I don't get it... In German we say "Ich stehe auf dem Schlauch 🥺 " Which ID do I have to add to which field in order to use the selection in this field as a condition of visibility for another field? Hints are welcome 😬 many greets! Link to comment Share on other sites More sharing options...
heldercervantes Posted March 27, 2021 Share Posted March 27, 2021 On 3/17/2021 at 3:21 PM, DV-JF said: Stumble upon this.... After reading and reading again I don't get it... In German we say "Ich stehe auf dem Schlauch 🥺 " Which ID do I have to add to which field in order to use the selection in this field as a condition of visibility for another field? Hints are welcome 😬 many greets! Sorry, only noticed this message now. If you're still wondering about this, go to the InputfieldSelectFile.module file and look at line 96. Should be something like this: $output.= "<select name='" . $this->name . "' id='" . $this->name . "' class='uk-select'>" . implode('', $array) . "</select>"; In your file you're probably missing this id=... part. You just need to add that. Link to comment Share on other sites More sharing options...
Peter Knight Posted March 9 Share Posted March 9 Hi @Martijn Geerts Great Module. Thanks for contributing this to the community. I think I've found a bug using ProcessWire 3.0.184 If I specify a subfolder such as blocks/ or just blocks, I can see the list of available files in the fieldtypeselectfile dropdown. But on the frontend, I get an error as follows. I can see that the blocks subdirectory isn't being recognised. Quote Error: Exception: Filename doesn't exist: site/templates/PK-CTA-2button.php (in wire/core/TemplateFile.php line 177) Happy-ish to just work off the main templates folder but for house-keeping purposes, I'd love to specify a sub-folder. Link to comment Share on other sites More sharing options...
Peter Knight Posted March 10 Share Posted March 10 Does anyone know if this Module works in RepeaterMatrix or what I might be doing wrong to get a Call to undefined function wireRenderFile() error? Used within the template itself (and outside Matrix), I can successfully render my file using the following <?php $myfile = $page->fieldtypeselectfile; ?> <?php echo wireRenderFile("$myfile");?> However, when I create a Matrix Repeater field called Element_Picker.php and add that same code into site/templates/fields/matrix/Element_Picker.php I get an error Fatal Error: Uncaught Error: Call to undefined function wireRenderFile() in site/templates/fields/matrix/Element_Picker.php:3 #0 wire/core/TemplateFile.php (327): require() #1 wire/core/Wire.php (414): TemplateFile->___render() #2 wire/core/WireHooks.php (951): Wire->_callMethod('___render', Array) #3 wire/core/Wire.php (485): WireHooks->runHooks(Object(TemplateFile), 'render', Array) #4 site/modules/FieldtypeRepeaterMatrix/RepeaterMatrixPage.php (284): Wire->__call('render', Array) #5 site/templates/fields/matrix.php (3): RepeaterMatrixPage->render() #6 wire/core/TemplateFile.php (32 (line 3 of site/templates/fields/matrix/Element_Picker.php) This error message was shown because: you are logged in as a Superuser. Error has been logged. Thanks. Much appreciated as always. Link to comment Share on other sites More sharing options...
Peter Knight Posted March 11 Share Posted March 11 18 hours ago, Peter Knight said: Does anyone know if this Module works in RepeaterMatrix or what I might be doing wrong to get a Call to undefined function wireRenderFile() error? Got this to work. I needed to include this at the top of the PHP include <?php namespace ProcessWire; ?> 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