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

Setup for SPA not working #479

Closed
ivanyv opened this issue Jan 9, 2021 · 3 comments · Fixed by #517
Closed

Setup for SPA not working #479

ivanyv opened this issue Jan 9, 2021 · 3 comments · Fixed by #517

Comments

@ivanyv
Copy link
Contributor

ivanyv commented Jan 9, 2021

I ran into some issues\ trying to install the profiler on a Vue app. First, I had to modify the script tag from the example in the README, as it was missing two required data attributes (data-hidden-custom-fields data-html-container="body").

Then I was getting this error in the console: POST http://localhost:3000/mini-profiler-resources/results 404 (Not Found). Which I traced to using "wrong" data-id / data-ids values.

I ended up with this:

<script type="text/javascript" id="mini-profiler"
        src="/mini-profiler-resources/includes.js?v=10da952c710f6abd9f1bd50fe50ed714"
        data-css-url="/mini-profiler-resources/includes.css?v=10da952c710f6abd9f1bd50fe50ed714"
        data-version="10da952c710f6abd9f1bd50fe50ed714" data-path="/mini-profiler-resources/"
        data-horizontal-position="left" data-vertical-position="top"
        data-ids=""
        data-trivial="false" data-children="false" data-max-traces="20" data-controls="false"
        data-total-sql-count="false" data-authorized="true" data-toggle-shortcut="alt+p" data-start-hidden="false"
        data-collapse-results="true" data-html-container="body" data-hidden-custom-fields></script>

I could create a PR for updating the docs if that helps (and above looks right).

@eweitz
Copy link

eweitz commented Oct 26, 2021

@ivanyv, many thanks! I encountered the same problems, and your solution worked for me. Such a PR would help.

(I'm using React and Rails.)

@katelovescode
Copy link
Contributor

Lifesaver! Was just running into this issue and adding the custom data tags!!! Thank you so much.

SamSaffron pushed a commit that referenced this issue Jan 31, 2022
* Fixes documentation with updated script tag built by ivanyv

* Adds conditional to page transition for clarity
@OmarAboulMakarem
Copy link

i hae the same problem and the problem is indeed in the data-ids, but keeping it without value doesnt work, it only works when i get the id from the rails admin script, but it keeps changing, anyone know how to dynamically get the data-ids

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

Successfully merging a pull request may close this issue.

4 participants