adrian Posted July 24, 2020 Author Share Posted July 24, 2020 @Peter Knight - just do a modules refresh and it will fix it. Link to comment Share on other sites More sharing options...
Peter Knight Posted July 24, 2020 Share Posted July 24, 2020 @adrian I can't access the admin either. Should have mentioned. Link to comment Share on other sites More sharing options...
adrian Posted July 24, 2020 Author Share Posted July 24, 2020 @Peter Knight - the issue is that since you last upgraded, I added a .php extension to the .module file and ProcessWire doesn't like this because its caching system is remembering the old version. I have seen this many times and it's never prevented access to the admin, so never worried about it too much. You could remove the TracyDebugger folder from site/modules and see if that lets the admin load. You could clear the site/assets/cache/FileCompiler folder. You could remove the TracyDebugger entry from the modules DB table. One or all of those should / might work ? Link to comment Share on other sites More sharing options...
Macrura Posted July 24, 2020 Share Posted July 24, 2020 I started getting this error with the latest version: PHP Warning: in_array() expects parameter 2 to be array, string given in .../TracyDebugger/TracyDebugger.module.php:1078 Link to comment Share on other sites More sharing options...
adrian Posted July 24, 2020 Author Share Posted July 24, 2020 Hey @Macrura - looks like you've upgraded from a very old version. Please just save the module settings page and it will be gone. 3 Link to comment Share on other sites More sharing options...
Macrura Posted July 24, 2020 Share Posted July 24, 2020 cool - thanks - did it and it worked. Sorry for the 'false alarm'... Link to comment Share on other sites More sharing options...
rick Posted July 25, 2020 Share Posted July 25, 2020 Howdy @adrian, I created two custom image fields, both type integer. This image field has two images while the other field is empty. I do not get this error when running stand alone adminer. I have deleted and recreated this field with the same results. Any ideas why this error only shows for this custom field and not the other? Thanks for your help! Link to comment Share on other sites More sharing options...
adrian Posted July 25, 2020 Author Share Posted July 25, 2020 Hi @rick - based on the error, it looks like your setup doesn't have the mb_strlen available and I am using the AdminerJsonPreview plugin in Tracy's Adminer setup. If you install mbstring for php it will be fine. Something like this, depending on your flavor of linux: sudo apt install php7.x-mbstring 1 Link to comment Share on other sites More sharing options...
rick Posted July 26, 2020 Share Posted July 26, 2020 Thanks @adrian, that was indeed the issue. 1 Link to comment Share on other sites More sharing options...
gebeer Posted August 26, 2020 Share Posted August 26, 2020 Hello, on one of my installs the editor window in the Console in the backend doesn't show up and I get this error in the JS debug console: Uncaught SyntaxError: invalid escape sequence evalScripts .../admin/module/edit?name=TracyDebugger&collapse_info=1&_tracy_bar=js&v=2.5.9&XDEBUG_SESSION_STOP=1:514 forEach .../admin/module/edit?name=TracyDebugger&collapse_info=1&_tracy_bar=js&v=2.5.9&XDEBUG_SESSION_STOP=1:665 evalScripts .../admin/module/edit?name=TracyDebugger&collapse_info=1&_tracy_bar=js&v=2.5.9&XDEBUG_SESSION_STOP=1:508 init .../admin/module/edit?name=TracyDebugger&collapse_info=1&_tracy_bar=js&v=2.5.9&XDEBUG_SESSION_STOP=1:35 displayTimeout .../admin/module/edit?name=TracyDebugger&collapse_info=1&_tracy_bar=js&v=2.5.9&XDEBUG_SESSION_STOP=1:302 setTimeout handler*initTabs/</< .../admin/module/edit?name=TracyDebugger&collapse_info=1&_tracy_bar=js&v=2.5.9&XDEBUG_SESSION_STOP=1:297 initTabs .../admin/module/edit?name=TracyDebugger&collapse_info=1&_tracy_bar=js&v=2.5.9&XDEBUG_SESSION_STOP=1:291 forEach .../admin/module/edit?name=TracyDebugger&collapse_info=1&_tracy_bar=js&v=2.5.9&XDEBUG_SESSION_STOP=1:665 initTabs .../admin/module/edit?name=TracyDebugger&collapse_info=1&_tracy_bar=js&v=2.5.9&XDEBUG_SESSION_STOP=1:264 init .../admin/module/edit?name=TracyDebugger&collapse_info=1&_tracy_bar=js&v=2.5.9&XDEBUG_SESSION_STOP=1:254 init .../admin/module/edit?name=TracyDebugger&collapse_info=1&_tracy_bar=js&v=2.5.9&XDEBUG_SESSION_STOP=1:388 <anonymous> .../admin/module/edit?name=TracyDebugger&collapse_info=1:284 edit:1:155320 This has been going on for some time. Also persists after upgrade to v4.21.20. Refreshed modules, cleared all cookies and local storage related to TD to no avail. Console looks like this and div#tracyConsoleEditor is empty: Any help on how I can back the console editor would be much appreciated. Link to comment Share on other sites More sharing options...
adrian Posted August 26, 2020 Author Share Posted August 26, 2020 Hi @gebeer - I am not really sure, but my initial hunch is that somehow the last entered code is corrupt. Could you try deleting any browser LocalStorage entries for the site. You can go through and just delete the ones that refer to Tracy if you'd prefer. Link to comment Share on other sites More sharing options...
gebeer Posted August 27, 2020 Share Posted August 27, 2020 13 hours ago, adrian said: Hi @gebeer - I am not really sure, but my initial hunch is that somehow the last entered code is corrupt. Could you try deleting any browser LocalStorage entries for the site. You can go through and just delete the ones that refer to Tracy if you'd prefer. Thanks for that hint. I already had deleted cookies and local storage. Didn't help. Problem persists across browsers, also in private mode. So it doesn't seem to be related to local storage. Link to comment Share on other sites More sharing options...
adrian Posted August 27, 2020 Author Share Posted August 27, 2020 Hi @gebeer - sorry that didn't help. Looking through the module code there are only a couple of places where "/admin/module/edit?name=TracyDebugger" appears. One is in the PW Info panel, so could you please disable that and see if it fixes things. The other is in the main module file, so could you try removing this block of code: https://github.com/adrianbj/TracyDebugger/blob/c499ad75ffce7ce473dfd32ef994339a27d61b83/TracyDebugger.module.php#L1124-L1135 Link to comment Share on other sites More sharing options...
gebeer Posted August 29, 2020 Share Posted August 29, 2020 On 8/27/2020 at 9:00 PM, adrian said: Hi @gebeer - sorry that didn't help. Looking through the module code there are only a couple of places where "/admin/module/edit?name=TracyDebugger" appears. One is in the PW Info panel, so could you please disable that and see if it fixes things. The other is in the main module file, so could you try removing this block of code: https://github.com/adrianbj/TracyDebugger/blob/c499ad75ffce7ce473dfd32ef994339a27d61b83/TracyDebugger.module.php#L1124-L1135 I tried both but it didn't help. Also I uninstalled and removed the module, deleted all cookies, local storage and session storage and then reinstalled. Problem persists. Can't see what the invalid escape sequence could possibly be. On my local dev install of the website, I don't have that problem. I'll try to find the cause for this behaviour and will let you know here. Thanks again. 1 Link to comment Share on other sites More sharing options...
dab Posted September 3, 2020 Share Posted September 3, 2020 Has anyone come across this error? Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/********/public_html/site/assets/cache/FileCompiler/site/modules/TracyDebugger/includes/PwApiData.php on line 516 PW 3.0.148, Tracy Debugger 4.21.20, PHP 7.2. line 516 is private function phpdoc_params(ReflectionMethod $method) : array { Have tried a reinstall & cleared complied files from > Modules. No errors on other sites on same server with same setup. Link to comment Share on other sites More sharing options...
adrian Posted September 3, 2020 Author Share Posted September 3, 2020 @dab - are you sure you're actually running PHP 7.2? That error is coming from a return type declaration (https://www.php.net/manual/en/functions.returning-values.php#functions.returning-values.type-declaration) which was available since PHP 7. That said, I didn't mean to exclude < 7 and I don't need the declaration, so the new version just committed should work for you. 1 Link to comment Share on other sites More sharing options...
dab Posted September 3, 2020 Share Posted September 3, 2020 @adrianThanks for the speedy reply. Most odd, WHM/Cpanel was reporting PHP 7.2, but I double checked with a "phpinfo" file & it showed PHP5.6! I reset the PHP version to PHP 7.2.32 & it's cleared the error. Apologies for the incorrect info & thanks for the fix for <7 (& for such a great module)! 1 Link to comment Share on other sites More sharing options...
adrian Posted September 3, 2020 Author Share Posted September 3, 2020 Just now, dab said: I double checked with a "phpinfo" file Don't forget that Tracy has a PHPInfo panel that you can use ? 2 Link to comment Share on other sites More sharing options...
AndZyk Posted September 7, 2020 Share Posted September 7, 2020 Just noticed that every fatal error message starts different: I don't make errors, so that was new to me. ? Nice feature. ? Link to comment Share on other sites More sharing options...
psy Posted September 8, 2020 Share Posted September 8, 2020 Trying to upgrade TD to the latest version and I get this: Fatal Error: Uncaught WireException: No download URL specified in wire/modules/Process/ProcessModule/ProcessModule.module:1072 Happens both on the Modules->New and Settings->Upgrades with the upgrade module. I could upload the zip but that's not the issue. Reason for upgrade was another error message: Fatal error: Uncaught Exception: Serialization of 'Closure' is not allowed in [no active file]:0 Stack trace: #0 {main} thrown in [no active file] on line 0 which auto-magically began appearing. I'm not serializing any data and the error disappears when I turn off TD. Any ideas on what's happening here? Link to comment Share on other sites More sharing options...
adrian Posted September 13, 2020 Author Share Posted September 13, 2020 @psy - I am not certain at this stage, but see this comment and the two before it: https://processwire.com/talk/topic/12208-tracy-debugger/page/76/?tab=comments#comment-178165 Seems like it wasn't due to Tracy in that case - any chance it might actually be something else for you too? 1 Link to comment Share on other sites More sharing options...
adrian Posted September 14, 2020 Author Share Posted September 14, 2020 On 9/7/2020 at 2:59 AM, AndZyk said: Just noticed that every fatal error message starts different: That's not actually Tracy - that is the PW core: https://github.com/processwire/processwire/blob/b429de71e33066f611b0bf6e2cc3782b7e5dafa3/wire/core/WireShutdown.php#L281-L286 1 Link to comment Share on other sites More sharing options...
AndZyk Posted September 15, 2020 Share Posted September 15, 2020 Ah, thank you. I wondered where those phrases come from. ? Link to comment Share on other sites More sharing options...
teppo Posted September 15, 2020 Share Posted September 15, 2020 Hey @adrian! Just wondering: what's your take on extending current panel collection with custom tools on a case-by-case basis? Sorry if this has been discussed already, there's so much stuff in this thread that I can't keep up anymore ? I just had a quick look and it seems that adding new panels is currently not possible without directly modifying the module file(s) and dropping the class file to the panels directory. I was wondering if you'd be open to adding some way of "injecting" custom panels from outside the module? My initial idea was something along the lines of allowing custom options to be pushed into the allPanels array by passing it to hookable methods at certain points and adding support for array values so that custom panel options could contain both name and path. (I didn't actually try this. It's possible that hooks won't work due to load order and all that, so another option would be the Tracy module reading them from config settings; not quite as elegant or robust, but pretty much guaranteed to work.) Anyway, just throwing in ideas. I'm working on some Wireframe related dev tools, and was thinking that it'd be neat to have them available in the admin — and what better way to do that than to introduce them to Tracy... ? 2 Link to comment Share on other sites More sharing options...
adrian Posted September 15, 2020 Author Share Posted September 15, 2020 Hi @teppo - I'd love to make it easier to support custom panels. It's interesting about the $allPanels array - it really wouldn't be necessary except for the title vs the name, eg "phpInfo" to "PHP Info". In most cases it would be easy to programmatically convert the case, except for those with acronyms (PHP, API, etc). I think you are probably correct that hooks might be problematic because Tracy is always loaded before all other modules. Perhaps module authors who want to add new Tracy panels could simply provide me with the path and panel class name and I can have Tracy check the location if the module is installed. Perhaps as simple as adding a new $externalPanels array that is added to as needed? This array could be merged into the $allPanels array which would probably need to be made multidimensional to support separate title and path properties so that https://github.com/adrianbj/TracyDebugger/blob/cc1c17e50487580f5c1e3485411d7c9a766b0a4f/TracyDebugger.module.php#L1526 would know what path to use to load these external panels. Anyway, I'll have a play around and see what I think will work best and send you a test version to work with. 2 Link to comment Share on other sites More sharing options...
Recommended Posts