szabesz Posted February 7, 2017 Posted February 7, 2017 (edited) 4 minutes ago, adrian said: so you can color by dev.mysite.com vs staging.mysite.com vs mysite.com. +1 And thanks a million, as always... Edited February 7, 2017 by szabesz typo
Macrura Posted February 8, 2017 Posted February 8, 2017 Not completely sure what happened, but i upgraded Tracy on a site running 2.7.3 and it killed the site. I fixed the permissions on all of the Tracy files which were set incorrectly after upgrade, but this didn't prevent the issue. Error: Call to a member function queryString() on null (line 507 of ....wire/core/WireInput.php) This error message was shown because you are logged in as a Superuser. Error has been logged. 1
adrian Posted February 8, 2017 Author Posted February 8, 2017 Just now, Macrura said: Not completely sure what happened, but i upgraded Tracy on a site running 2.7.3 and it killed the site. I fixed the permissions on all of the Tracy files which were set incorrectly after upgrade, but this didn't prevent the issue. Error: Call to a member function queryString() on null (line 507 of ....wire/core/WireInput.php) This error message was shown because you are logged in as a Superuser. Error has been logged. Do you have the very latest version of Tracy - that PW 2.x problem was reported already and I fixed in in 4.0.1, unless it is occurring for some other reason as well. 1
adrian Posted February 8, 2017 Author Posted February 8, 2017 32 minutes ago, Macrura said: It's running 'version' => '4.0.4', Thanks. Can you please try replacing lines 227 and 228 of TracyDebugger.module: // don't init Tracy for the PW Notifications module polling if(strpos($this->wire('input')->queryString(), 'Notifications=update') !== false) return; with: // don't init Tracy for the PW Notifications module polling if($this->wire('input')) { $queryString = $this->wire('input')->queryString(); } else { $info = parse_url($_SERVER['REQUEST_URI']); $queryString = $info['query']; } if(strpos($queryString, 'Notifications=update') !== false) return;
Macrura Posted February 8, 2017 Posted February 8, 2017 OK - thanks @adrian i will need to test this after 5pm (i think the owners are working in the admin so I don't want to crash the site during NY business hrs..) 1
adrian Posted February 8, 2017 Author Posted February 8, 2017 Just now, Macrura said: OK - thanks @adrian i will need to test this after 5pm (i think the owners are working in the admin so I don't want to crash the site during NY business hrs..) No problem - thanks and sorry for the problems in the first place! Just an FYI why this is happening. It turns out that I had to move lots of logic from ready() into init() to fix some more SessionHandlerDB issues. The problem is that $input seems to be available much earlier in PW 3 than it was in PW 2, hence the reporting of $input as null. 1
Macrura Posted February 8, 2017 Posted February 8, 2017 ok thanks for helping out so fast, and hopefully this will help prevent this type of issue for forward versions! 1
adrian Posted February 8, 2017 Author Posted February 8, 2017 Hi everyone! Introducing the new Style Admin by Server Type feature. Hopefully this will reduce the chance of accidentally editing the wrong version of a site when you have more than one open in different tabs. Firstly, a huge shoutout to @szabesz for the idea for this new feature and for lots of testing and suggestions to improve it. Also @tpr chipped in with some CSS help yet again! This feature adds a ribbon down the side of the admin to let you know what version of the site you are on, eg. local, dev, staging, etc. Firstly you will need to enable it in the config settings. Then you'll want to set up your various server types and colors. It comes with the following defaults. If you don't like the side ribbon, you can actually style the output exactly how you want. 2
Macrura Posted February 8, 2017 Posted February 8, 2017 Hi Adrian, those changes didn't fix the error;
adrian Posted February 8, 2017 Author Posted February 8, 2017 Just now, Macrura said: Hi Adrian, those changes didn't fix the error; Let's take this to PM
tpr Posted February 9, 2017 Posted February 9, 2017 Admin styling: adding "pointer-events: none" could be useful I think. 1
adrian Posted February 10, 2017 Author Posted February 10, 2017 On 2/9/2017 at 2:33 AM, tpr said: Admin styling: adding "pointer-events: none" could be useful I think. Hey @tpr - where do you think this should be applied? Sorry if I am missing the obvious
tpr Posted February 10, 2017 Posted February 10, 2017 To the recently added staging bar. In AOS for example it partly covers the sidebar so items loose hover state when you move the mouse over the bar. 1
adrian Posted February 10, 2017 Author Posted February 10, 2017 4 minutes ago, tpr said: To the recently added staging bar. In AOS for example it partly covers the sidebar so items loose hover state when you move the mouse over the bar. Ok gotcha - I see how it helps now. I had a quick look and couldn't figure out what it achieved, but now I see and agree it's a little nicer. I wish there was a way to not have it partly cover the sidebar, but with those elements being absolutely positioned, I don't see an option. I think what I ended up with is a decent compromise though - it's narrow enough that it doesn't interfere, but is still obvious enough. If anyone has any better ideas I'd be happy to change. 2
adrian Posted February 14, 2017 Author Posted February 14, 2017 A few updates to the server type indicator ribbon: It's now possible to display it on the frontend as well. It might seem weird, but on occasion I have been looking at the frontend in the wrong tab (live vs dev) and wondering why my changes aren't doing anything You can now hide the indicator along with the Tracy debug bar when you use the hide icon. Here is the css to use if you'd prefer to have the indicator along the bottom: body::before { content: "[type]"; background: [color]; position: fixed; left: 0; bottom: 0; color: #ffffff; width: 100%; padding: 0; text-align: left; text-indent: 5px; font-weight: 600; text-transform: uppercase; z-index: 29999; font-size: 15px; height: 22px; line-height: 22px; pointer-events: none; } which looks like this rather than the default sidebar. It is of course also fixed so it always visible when you scroll. 3
adrian Posted February 14, 2017 Author Posted February 14, 2017 Another minor (but hopefully useful addition) - you can now use keyboard shortcuts to move between items in the console panel history stack. Back: CTRL+CMD+↑ Forward: CTRL+CMD+↓ The up and down arrows are to mimic unix based terminal history shortcuts. Unfortunately I had to add the CTRL+CMD in there as well because it's hard to find a combination that isn't already used for something else, either by the browser or ACE editor. Anyway, hope you will find it useful for speedy switching back and forward between snippets of code you have recently run. 2
szabesz Posted February 14, 2017 Posted February 14, 2017 1 hour ago, adrian said: Back: CTRL+CMD+↑ Forward: CTRL+CMD+↓ Thank you! I've been missing it 1
Macrura Posted February 14, 2017 Posted February 14, 2017 just popping by to say that Tracy made it possible for me to convert an old site where i was using direct output, to a delayed output model, which i needed to be able to handle the new requirements of the site; in particular, the template path feature was crucial – i was able to simply duplicate each template one at a time, rename to -dev, and work on the conversion until it was ready... Also the new styling looks great! 3
adrian Posted February 14, 2017 Author Posted February 14, 2017 1 minute ago, Macrura said: in particular, the template path feature was crucial Thanks for the feedback @Macrura - I have often wondered how much use the template path (and template editor) panels were getting. Glad to hear that it helped you out
Macrura Posted February 14, 2017 Posted February 14, 2017 yeah, when i first started the conversion, i was basically scratching my head about how hard/complex it would be to change from direct to delayed; At some point along the way i remembered the tracy template path, and after that it just went really fast.. now that site's code has been completely refactored and it's so much cleaner! 1
valan Posted February 17, 2017 Posted February 17, 2017 Module has been installed successfully, but any module setting change/save results in "Error: Unrecognized path" with redirect to https://.../admin/module/bookmarks/ What's wrong? PW 2.8.35, PHP 7
adrian Posted February 17, 2017 Author Posted February 17, 2017 Hi @valan - any chance I can get a login for the site to take a look?
netcarver Posted February 23, 2017 Posted February 23, 2017 Hi @adrian Perhaps slightly off topic but... I'd like to report that I had a recent differential backup that was growing rather fast, and it turned out to be tracy files in the session directory of the site. I've since excluded the offending session directory from the backup (shouldn't have been there in the first place) but it might be worth noting that the total size of all the tracy sessions files had grown into the 10s of GB. I wonder if there is any practical way Tracy could be made to cull its old session files? Best wishes, Steve 1
Recommended Posts