-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
Thanks @tpr - great idea. That horrible hover background highlighting was a result of the built-in Tracy css. It was on my list of things to tweak, but never got it. The latest version has your code in place and also contains a new CPU usage item on the System Info panel. I have submitted a PR to the Tracy project to see if they will include that in their package. I don't really want to have to maintain this addition every time they release an update - hopefully they will include it.
-
Tips on populating a dropdown from another dropdown
adrian replied to cb2004's topic in General Support
Admittedly I don't fully understand your needs, but PW has some inbuilt support for this if you are using Page fields. You can do something like this: parent=page.service for the page field's "define selector to find pages". This will create an ajaxified UI for field relations. It may not work for what you need, but thought I'd mention it just in case. -
Thanks Charles, I am glad you like it! It's funny really - I initially didn't expect to spend much time on it - I thought I would just implement it as is, but then kept having more and more ideas - and getting suggestions from lots of you guys (especially @tpr) and it just snowballed
-
If you can't get that to work, you could try adding a dedicated field to the content tab and adding a save hook to take it's value, sanitize it as a page name and then use it to populate the page name. I am also curious as to your reasoning for this - if it's to make it easier for editors to remember to update it, then maybe you should just install https://processwire.com/talk/topic/7724-page-rename-options/ - even if it's only installed during development of the site, and then uninstalled once live to protect URLs from changing automatically?
-
Not tested, but take a look at these: http://stackoverflow.com/questions/5127776/is-there-any-way-to-start-automatically-the-firebug-inspector-after-starting-fir https://getfirebug.com/wiki/index.php/Firebug_Preferences (in particular, the hideDefaultInspector setting.
-
"In addition, fields using a type of Repeater or PageTable are not currently supported for drafts (though support is planned). " https://processwire.com/api/modules/prodrafts/#drafts-and-fields
-
I just wanted to mention how great I think it is to use Horst's ALIF module (https://processwire.com/talk/topic/11666-alif-admin-links-in-frontend/) in conjunction with Tracy. The user switcher alone makes it invaluable! You'll notice that I disabled the Debug Mode indicator in ALIF because I have one in Tracy. I have also just added a new option to hide the panel labels which makes the debug bar much more compact and visually appealing: Here's the version with the panel labels which is the default just so you initially know what's what! Note that for positioning of ALIF, I am using Bottom, Right, and 23px for the value for Top | Bottom setting.
-
That's awesome news @Ipa - I was starting to go a little crazy! i just committed a new version which adds a "Allow Logging in Production Mode" setting. This restores the default behavior of the core Tracy debug tool. With this checked (the default), Tracy will still run in the background for all users (including guest access) - she will quietly capture and log any errors/warnings/notices/dumps etc to her log files, which of course you can be emailed about, or view via the Tracy Logs panel when you are logged in as a superuser. Please all take a look at the new option and let me know if you come across any inconsistencies between config setup and actual access. Thanks again everyone for your help with this!
-
You need to go to the main Modules page and install the new Theme module. If you have not renamed it, ie left it as AdminThemeDefault, then I think you should get the option to choose which one to use.
-
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?