-
Posts
11,255 -
Joined
-
Last visited
-
Days Won
374
Everything posted by adrian
-
URL character limit is 128 - how to increase this?
adrian replied to formulate's topic in General Support
This bit me today so I created a feature request: https://github.com/processwire/processwire-requests/issues/382 Would you guys mind giving it a thumbs up to get Ryan's attention? Thanks. -
Exactly my thoughts!
-
Yeah thanks. I am already using his latest release (with that fix) here. I'll commit the changes sometime soon. I just need to spend a bit of time revisiting the changes I made for Pete, and also revisit everyone's suggestions for improving the settings page, and also Robin's "Shortcuts" panel idea. I'll probably commit all these things together - maybe on the weekend or early next week.
-
@Erik - it doesn't look like @Pete is maintaining this module anymore. Give https://processwire.com/modules/protected-mode/ a go - it also has the advantage of optionally sending proper 503 headers when you're using it for blocking access during maintenance downtime.
-
Hi @flydev ?? - yeah, @Robin S and I have been discussing this one. As @bernhard mentioned to you, this is a change in the Tracy core. I have mixed feelings about the change - it is kinda nice seeing the actual bd() call that was made, I do find myself hovering to see the file/line quite often. Unfortunately I think to change this behavior, I'll probably need to hack the Tracy core. Note that I am already moving the position of that element compared to the core because they had it top right which is really messy if the bd() call is long. Curious what others think of this - do we need to revert this, or do you like seeing the bd() call next to each dump? Would it be better if both the bd() and the file/number were visible?
-
@ryan - any reason why Soma's PageEditSoftLock has been removed from the modules directory? I still install that on all my sites so it would be great to have it back please. Thanks!
-
@bernhard - that css always works for me. I see that you just started an issue with the Tracy core which is great, but I can also just add that locally to the css that I package with the module. Seems like a good solution me although I am still unsure how much benefit actually showing the \n is in the first place. Note that the code for adding these, is all here: https://github.com/nette/tracy/blob/cf7d278957bd4301a409aa689159a9700459ff86/src/Tracy/Helpers.php#L343-L376 If there are strong opinions on this, I could potentially hack this file to remove these things, or it might be possible to convert back again in the module's code.
-
@bernhard - this is something that was added to the Tracy core. Remember that you can use be() - barEcho() - to echo out a string to the dumps panel in the Tracy bar. Does that work OK for you?
-
Yeah exactly - it may not be an issue for you, but if someone was setting things up, it could be confusing - not saying it's not a possibility to get things right, but I know that Ryan had concerns when we've talked through this issue.
-
I think the key issue with admin view access is how the tree handles showing pages/branches below pages that are not viewable. It would break the hierarchy. Admin Restrict Branch is limited in what it does, but I think it does it well. But it's always only going to work with one branch, although for many use cases that is all you need. That said, I'd love to see a core way of hiding pages from view, but again there's that hierarchy problem to solve, or maybe those situations just need to be prevented from happening.
-
@mtwebit - I think the bootstrap line in the runByCron.php file should be: require_once(__DIR__ . '/../../../index.php'); It didn't work for me the way you had it. Unfortunately I am also having issues with wanting to create and execute a task via my AdminActions module - because the method that is being called belong to the action's class and not the ProcessAdminActions parent class, things aren't working. I think I'll end up building a custom approach to doing what I need but just wanted to let you know of a possible issue that others might also have.
-
I was just playing around with the module and this feature - I am correct in assuming it's still broken? I wasn't sure if I was doing something wrong. I started fixing things, but no real luck yet - it just keeps reporting a failure. And when I tried to emulate the PDF module's approach of redirecting to the tasker admin page, it seems like it never actually executes. Anyway, I'll go try the cron approach and see if that works.
-
Inconsistent breadcrumbs for process sub pages
adrian replied to Richard Jedlička's topic in Module/Plugin Development
A couple of real world examples, just in case they help in addition to @Zeka's answer. https://github.com/adrianbj/ProcessAdminActions/blob/5d77e86ae20f016d3b9ce1abd791b1af9e82451e/ProcessAdminActions.module.php#L683 https://github.com/adrianbj/AdminRestrictBranch/blob/4964a3f5b83338f7313f7c6daeefe6c6793640b0/AdminRestrictBranch.module.php#L131-L144 -
admin action: loop through .csv file rows but when done unlink this file
adrian replied to froot's topic in API & Templates
Looks like that is happening because you are turning off outputformatting after doing the deleteAll(). Do it beforehand and things should be fine. -
admin action: loop through .csv file rows but when done unlink this file
adrian replied to froot's topic in API & Templates
Sorry, I'm not sure then - it's working here. I think perhaps you need to do some debugging at your end to make sure the unlink call is actually being made and also clarify that $file->filename contains the full path to the csv file. Also, try: $this->wire('files')->unlink('/fullpath/site/assets/files/1443/file.csv'); in the Tracy console just to test this in isolation. If that doesn't work, try a regular php unlink and if that doesn't work, check to make sure there aren't any file permission issues. -
admin action: loop through .csv file rows but when done unlink this file
adrian replied to froot's topic in API & Templates
@fruid - this works: $this->wire('files')->unlink($file->filename); but the problem is that in your example, your code never gets here because you have "return true" or "return false" in the if/else above this point. I simplified things right down so obviously this doesn't handle the processing of the CSV file, but this is basically what you want so that you are unlinking before returning true. protected function executeAction($options) { $parent = ''; $parent_title = ''; $url = config()->paths->assets.'cache/AdminActions/'; if(count($options['csv_upload'])) { $n = 0; $file = $options['csv_upload']->first(); $fp = fopen($file->filename, 'r'); fclose($fp); $this->wire('files')->unlink($file->filename); return true; } else { $this->failureMessage = 'Please upload a CSV file'; return false; } } -
admin action: loop through .csv file rows but when done unlink this file
adrian replied to froot's topic in API & Templates
@fruid - can you please post the entire code for your action - should be an easy fix, but will be simpler if I have everything to test things. -
We sort of have this already - take a look at the Custom Links section of the settings for the Processwire Info panel. You can add links to any page on the site, including items under Admin > Setup. Of course this doesn't allow for external links. For external links, I could add an additional settings field for storing these, or we could go with a separate Shortcuts Panel. Semantically it would be strange having external links under the PW Info panel, but maybe that's OK? Any thoughts? Also, just to let you know, that these links are actually stored as relative paths, rather than page IDs so that you can copy/paste Tracy's settings via my ModuleSettingsImportExport module and have them work on another site. Also, the appropriate icon is also automatically used. Note I have teppo's Changlelog, MikeRocketts's Jumplinks and ryan's Upgrades linked to, in addition to the default links which are added when Tracy is installed.
-
Hi @Robin S - thanks for your work on that - I really like that actually. I wonder if that's enough on its own, or whether we should combine with the @Pixrael's option for integrating the search/filter box as well? What does everyone think? What do you think about the Perfmon Debug Toolbar that @netcarver mentioned. I just installed it again to take a look. Note that you'll need to fix the order of the arguments in the implode() on line 187 to get things working, but otherwise it seems like everything is still OK. Does it do what you are looking for, or is there other / different info you'd like to see? Even with this, I'd still be willing to add something similar to Tracy. There is also of course Ryan's ProDevTools Profiler.
-
Chances are you already have too many browser extensions installed to fit - the last one on the right will let you access the hidden ones.
-
@Pixrael - that actually seems to work really nicely - thank you. You've probably noticed that I have implemented @tpr's excellent Filterbox (https://github.com/rolandtoth/FilterBox) in several of the panels in Tracy and I had been wondering how well it might work for the module settings. I might still take a look at that first (since I am already using it), but Jetbox does seem pretty slick and your Tampermonkey example worked a treat. I wonder if @Robin S and @szabesz would mind testing with it as well to get their thoughts on whether this would be a good approach. At the moment I only tested with the current layout with all fieldsets opened, but I feel like it might be more useful if it also works when the fieldsets are loaded in a collapsed state - this is where things could really be cleaned up. Anyone else have any thoughts?
-
Custom fields support for file and image fields: misinformation?
adrian replied to Mike-it's topic in General Support
As @Robin S noted in the post that @3fingers linked to - that example is a Page reference field. I just recreated that here and it works as expected: A little OT, but creating Page Reference fields is really quick and easy with: https://processwire.com/modules/process-page-field-select-creator/ -
Hi @Robin S and @szabesz - thanks for your input on this. This is going to be an interesting one because I actually don't like AOS's jumplinks for the reason that I can't use CTRL/CMD +F to find the setting I am looking for - I often have to enable/disable several sections before I find the one where the setting I am looking for is hiding. A tabbed interface would have the same issue. I feel like Tracy's approach to having everything open and displayed with those quick links (that are at the top of the settings) together with CTRL/CMD +F is actually pretty effective. There are also of course the direct settings links at the bottom of each debug bar panel which further helps to get you where you want to go. Of course this might be my bias because I already know the names of the settings so I know what to search for. With my thoughts out of the way, I have had enough comments over the years about how overwhelming the settings are that obviously I need to listen to you guys and improve things ? Robin - I have used tabs in module settings with AdminActions - I think it can be a nice interface, but in addition to my noted concerns above and your noted point about the tabs ending up over more than one line, some of the fieldset names (labels) are quite long - I can probably shorten many of these, but it is another issue to consider when using tabs. Stepping back a little - I wonder if we can solve some of the confusion by eliminating some settings - I have probably overdone things with settings that no-one will ever change. To be honest, I almost never change any settings beyond those in the first couple of fieldsets and the email address for error notifications on live sites. Maybe it would be best to have all the settings that are likely to be used by most people, open and up top and everything else in a collapsed "Advanced settings" fieldset. Maybe we need to do a bit of a survey to figure out what most users find themselves regularly changing and use that as a guide. On a side note, I often make use of https://processwire.com/modules/module-settings-import-export/ for copying settings between sites - maybe promoting that approach would also help? Any other approaches we should be thinking about? OT, but I am thinking that maybe this settings improvement feature request deserves to be split into its own thread. PS - Robin - I completely agree about the need to improve the styling of inactive tabs in th Uikit theme.
-
Great - thanks. One thing to note here is that it is of course possible for one of these superusers to go to Tracy's settings and uncheck that "Restrict superusers" checkbox, or even give themselves the "tracy-debugger" setting. I am guessing you don't really mind that because it's not that they aren't trusted, but rather you just don't want to confuse them with Tracy. Anyway, just something to be aware of in case you hadn't thought about it. That "tracy-debugger" permission has been around forever and already allows you to give non-superusers access to Tracy. The only restrictions by default are that they don't have access to these panels: Console, FileEditor, Adminer, Terminal, AdminTools. You can also restrict them further with the "Disabled panels for restricted users" setting.