Jump to content

Error: Undefined index path


jploch
 Share

Recommended Posts

When running tracy in my local development environment (node + laravel valet), I get the following error on my frontend:

Notice: Undefined index: path in /Users/jploch/Sites/pgrid-dev/dist/site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module.php on line 2784

This happens with the master as well as the dev version of PW.

Link to comment
Share on other sites

  • 2 weeks later...

Hi @jploch - sorry for the late response - I was on vacation.

Can you please point me to the line on the Github repo. I feel like it might actually be: https://github.com/adrianbj/TracyDebugger/blob/6f62b8e2c03e1520615ea654e79f4e44b61f9f20/TracyDebugger.module.php#L2847 but that isn't the line number from your error.

Also can you please do a dump of parse_url($_SERVER['REQUEST_URI']); so I can see what is returned?

  • Like 1
Link to comment
Share on other sites

@adrian no worries. Thanks for taking a look. I made some changes already to my local enviroment (updating php and valet) and the error above seems to have changed. Strangely it was only happening once in a while, and not on all the pages. But for some of my local websites I still get errors on the frontend and tracy is not loading (only on some pages):

TypeError: strpos() expects parameter 1 to be string, bool given in /Users/jploch/Sites/pgrid-website/dist/site/modules/TracyDebugger/tracy-2.9.x/src/Tracy/Bar/assets/loader.phtml:14 Stack trace: #0 /Users/jploch/Sites/pgrid-website/dist/site/modules/TracyDebugger/tracy-2.9.x/src/Tracy/Bar/assets/loader.phtml(14): strpos(false, '?') #1 /Users/jploch/Sites/pgrid-website/dist/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.9.x/src/Tracy/Bar/Bar.php(109): require('/Users/jploch/S...') #2 /Users/jploch/Sites/pgrid-website/dist/site/modules/TracyDebugger/tracy-2.9.x/src/Tracy/Debugger/DevelopmentStrategy.php(139): Tracy\Bar->render(Object(Tracy\DeferredContent)) #3 /Users/jploch/Sites/pgrid-website/dist/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.9.x/src/Tracy/Debugger/Debugger.php(321): Tracy\DevelopmentStrategy->renderBar() #4 [internal function]: Tracy\Debugger::shutdownHandler() #5 {main} (stored in /Users/jploch/Sites/pgrid-website/dist/site/assets/logs/tracy/exception--2023-03-19--14-23--52479f289e.html)

 

9 hours ago, adrian said:

Also can you please do a dump of parse_url($_SERVER['REQUEST_URI']); so I can see what is returned?

I did a "var_dump(parse_url($_SERVER['REQUEST_URI']));" on those pages on the frontend, it returns this:

array(1) {
  ["path"]=>
  string(0) ""
}

array(1) {
  ["path"]=>
  string(0) ""
}

On the pages that work (same installation and setup), I get this response for the var_dump:

array(1) { ["path"]=> string(4) "ice/" } array(1) { ["path"]=> string(4) "ice/" }

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...