-
Posts
11,185 -
Joined
-
Last visited
-
Days Won
372
Everything posted by adrian
-
Module development is fun and educational - glad you learned stuff along the way. It's not a bad addiction to have BTW - That module of Soma's of one of my must haves for sure! Glad you like Tracy!
-
Hey guys, I believe that those instructions from Ryan about copying the templates-admin folder to site/modules/ are outdated. All you want now is the AdminThemeJoer or AdminThemeAndrei folder in site/modules/
-
@BernhardB - looks good, but I would like to know if there are any advantages over Soma's Helper Field Links: https://processwire.com/talk/topic/421-helperfieldlinks-field-and-template-edit-shortcuts/ which also provides links to edit fields and templates, as well a lots of info on the settings right there in the Inputfield. Please don't this as a criticism - honestly curious, and also making sure you already know about the other module.
-
Thanks for the report that it's working! I am not a ML user, so I don't think I would be the best person to figure out whether this would be useful, or what the right approach would be. Would it be useful at all to have a dedicated panel for each installed language that could show all sorts of language specific content, or would that just be going overboard ? If you guys brainstorm, I would be happy to implement, or accept a PR
-
@lpa - the latest version looks for the TracyDebugger class in the global namespace. This now works for me whether or not I specify the PW namespace at the top of my templates, which is what I think you might have been doing. I don't get any errors and the Variables panel is populated correctly. Hopefully it will finally work for you also I have also added a new TracyLogs panel - works like the PW Logs one - very handy I think! I also changed the config settings to put all the show panel options into one multiple checkbox field, so everyone who is upgrading will find they have to visit the settings to set the status of the panels again.
-
I know I must be missing something obvious, but wasn't your first post getting you all items? If so, then why not just strip the beginning [ and ending ] and be done with it?
-
Here is some info to help explain what is going on and how to fix it: http://stackoverflow.com/questions/15559735/no-square-bracket-json-array http://stackoverflow.com/questions/7109424/remove-the-brackets-in-json Also, I am curious about the "true" option you are passing - I don't think that is valid, although it may not do any harm either.
-
Ok great - I actually made that change to the module already - I figured that it made sense regardless of whether it worked for you or not - still not sure why it was working as is for me - I am still getting the hang of this namespace stuff Is it possible that your template doesn't have any defined variables? That wouldn't be uncommon in a simple template where you are just outputting PW fields. Try defining a test variable somewhere in the template file, eg. $test = "this is my test variable"; and let me know if it starts showing up after that. Btw - thanks for continuing to help debug this - really appreciated
-
So the line added to the end of my compiled template files currently looks like: if(class_exists('TracyDebugger')) { TracyDebugger::$templateVars = TracyDebugger::templateVars(get_defined_vars(), \ProcessWire\wire('page')); } Does that match what you are currently seeing? What if you manually add \ProcessWire\ in front of each TracyDebugerr, like this - just do it for one of the compiled template files and load a page with that template - this is just a test for me at the moment to help debug. if(class_exists('\ProcessWire\TracyDebugger')) { \ProcessWire\TracyDebugger::$templateVars = \ProcessWire\TracyDebugger::templateVars(get_defined_vars(), \ProcessWire\wire('page')); } I feel like I am going off on a tangent here, but what happens if you also add false to that check, eg: if(class_exists('\ProcessWire\TracyDebugger', false)) { \ProcessWire\TracyDebugger::$templateVars = \ProcessWire\TracyDebugger::templateVars(get_defined_vars(), \ProcessWire\wire('page')); }
-
I haven't tried, but I don't think there is an "add" method for the options fieldtype. Did you read here: https://processwire.com/api/modules/select-options-fieldtype/#manipulating-options-on-a-page-from-the-api Also, shouldn't your: $field->months = $array; be outside the "for" loop?
-
You'll need to grab the image using wireUpload (or some other method if you prefer), then rename, then you can "add" to the image field. Take a look at this solution by Sevarf2: https://processwire.com/talk/topic/5490-hook-for-wireupload-filename-images/?p=53997 The reason is the filename not ending in an image extension - PW's sanitizer won't allow it through when directly adding. Hope that helps.
- 10 replies
-
- api
- page creation
-
(and 2 more)
Tagged with:
-
You need to empty .../site/assets/cache/FileCompiler/site/templates, not .../site/assets/cache/FileCompiler/site/modules Please tell me that works
-
any workflow improvment on adding child pages repeatly
adrian replied to adrianmak's topic in General Support
https://processwire.com/talk/topic/6102-batch-child-editor/ Try out the Add mode - just enter a page name for each row in the textarea and you're done!- 1 reply
-
- 1
-
-
@Ipa - did you clear your FileCompiler templates cache after installing the new version? - this is essential to ensure the new version of the code is added into the templates when they are compiled. Sorry, I should have made it more obvious that for this feature to work, you need to clear your compiled templates cache as it needs to add a line to the bottom of the compiled template. Once you do this once, it will work for future updates to your templates.
-
Awesome - thanks for letting me know. I did just make another change though in an attempt to fix the problem @Ipa is still having with the Variables panel. Hopefully this might work and hopefully I haven't broken anything for anyone else
-
Yeah, it is that feature which is responsible for adding that line to the bottom of the compiled templates - I just don't yet know why you are still getting the error and @tpr isn't and I have never seen it What version of PW and PHP are you running? Glad it's working now - thanks for letting me know. What do you mean about it being related to your browser?
-
@BernhardB - please try the latest version for me.
-
Actually I am seeing @BernhardB's issue when running 2.7.2 - I'll hopefully have a fix soon.
-
@BernhardB - are you using the latest version? Also, what version of PHP are you using - I wonder if there might be something connected with that? @Ipa - can you please try emptying the site/assets/cache/FileCompiler/site/templates folder and see if it starts working after that?
-
What happens if you prepend a slash? $dotenv = new \Dotenv\Dotenv(__DIR__);
-
$player->of(false); foreach($player->equipment as $equipment){ $u->equipment->remove($equipment); } $u->save("equipment"); EDIT: Ignore this and go with BitPoet's solution. I was just confirming that removeAll() worked, but he beat me to it
-
@Ipa and @tpr - can you please try the latest version and see if that error is now gone? Speaking of the latest version, it includes a few new features. The ability to force superusers to always be in DEVELOPMENT mode, even on a live site. The ability to restrict non-superusers by their IP address - this is very useful if you need to debug a live site for a guest (or non-superuser role) and want the debugger bar and other features normally restricted to development mode. You can set the mode to DEVELOPMENT, give the user the "tracey-debugger" permission, and then restrict to your current IP address. The Users panel provides details of IP Address restriction so you can always easily check if you're safe.
-
Does it stick around? or is it gone once you reload the page or something? Can you post the last line of one of your template files that is producing the error? Nevermind - sorry I see that @Ipa has already posted his.
-
Do you mean that it needs to stay as is and separate from the newly proposed multiple checkbox fields that lists checkboxes for all the panels, or do you think that it actually needs to be a separate checkbox field for frontend and another separate one for backend? Sorry, i am not seeing why they need to be separate ones, but it's early here, so maybe just not awake? Nevermind, you just mean separate options within the one checkbox field, together with all the panels. Although I actually think it might still make sense to leave this as a separate field, because it is not related to panels - it's the entire Debug Bar. Hoped that sounds ok to you. I guess I could also set it up so that you could choose which panels appear on the frontend and which ones appear on the backend - make them separately configurable, although not sure if that would really be that useful?
-
Hi @Ipa, Sorry about this. To populate the new "Variables" panel I am adding a line to the bottom of the compiled template files, but it includes a check to see if the class exists so I am not sure why you are getting that. Could you please post what that last line looks like for you?