Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dumper::toHtml() in snippet - Uncaught TypeError: dest is null #482

Closed
BigOHenry opened this issue Apr 28, 2021 · 2 comments
Closed

Dumper::toHtml() in snippet - Uncaught TypeError: dest is null #482

BigOHenry opened this issue Apr 28, 2021 · 2 comments

Comments

@BigOHenry
Copy link

BigOHenry commented Apr 28, 2021

Version:
PHP 8.0
TRACY 2.8

Bug Description

When using \Tracy\Dumper::toHtml($array) in snippet you cannot open 2nd level in array. There is an error in console Uncaught TypeError: dest is null

Steps To Reproduce

  1. Latte code
    <div n:snippet="show_data">
        {if $show_data}
            {\Tracy\Dumper::toHtml(['test' => ['x' => ['y' => ['z' => 'test']]]])|noescape}
        {/if}
    </div>
  1. After redraw a snippet it render this:
    obrazek

  2. If you click on arrow to expand 'x' key, there is an error in console log Uncaught TypeError: dest is null at this code:
    obrazek

If the same code is used out of the snippet, it works:
obrazek

If using much bigger array with more depth even first level cannot be opend. Same error.

Thank you!

@dg
Copy link
Member

dg commented Apr 28, 2021

As workaround you can turn off JS for dumping:

Tracy\Dumper::toHtml($var, [Tracy\Dumper::LAZY => false])

@BigOHenry
Copy link
Author

Thank you, workaround works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants