• Resolved tyler0001

    (@tyler0001)


    It’s a little unclear to me how to get the JS errors working.

    I’ve added both to my wp-config.php:

    WP_SENTRY_DSN
    WP_SENTRY_PUBLIC_DSN

    I’ve added the same DSN value to both. The PHP errors are working after using the test button in the plugin. However, the browser box is not checked. Only the PHP errors are working. I’m also not seeing any network requests to Sentry on my site. Clicking the box doesn’t seem to do anything either.

    Thanks for your help!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter tyler0001

    (@tyler0001)

    This Github issue is my exact question!
    https://github.com/stayallive/wp-sentry/issues/25

    From that post, it seems like they are both supposed to be the same value – the non-deprecated DSN (without the secret).

    ex. https://<uuid>@sentry.io/<numbers&gt;

    I have both defined in my wp-config.php and the JS errors are unfortunately not working (button is not checked).

    Plugin Author stayallive

    (@stayallive)

    Hi @tyler0001,

    If you have defined you DSN like this in your wp-config.php:

    define( 'WP_SENTRY_DSN', 'https://[email protected]/1234' );
    define( 'WP_SENTRY_PUBLIC_DSN', 'https://[email protected]/1234' );

    You should be good, they should indeed both the same (if you want PHP & JS errors in the same project) and without the secret key so the non-deprecated version.

    I have tested it on my end and with those defines in the wp-config.php both boxes are ticked, do you have any other modifications and/or hooks registered that might have something to do with Sentry?

    As a side note: the test button does not test the JS integration, only the PHP integration.

    • This reply was modified 5 years, 1 month ago by stayallive. Reason: Formatting
    • This reply was modified 5 years, 1 month ago by Jan Dembowski.
    Thread Starter tyler0001

    (@tyler0001)

    Thanks for the quick reply. I have it configured as described but no luck. I’m running WP Version 5.3.2 and the latest version of the plugin. The only other plugins I could imagine might cause an issue are WP Rocket or Wordfence. Nothing Sentry related in my codebase.

    I’m not seeing anything Sentry related in the page markup. It’s odd that PHP works but not the JS. I’ll keep investigating and report back if I can identify the issue.

    Plugin Author stayallive

    (@stayallive)

    Yeah there shouldn’t be any reason why it won’t enable unless the define is not there in the wp-config.php file or it’s mispelled / cached by the php process or something.

    Please do let me know if you find what causes it, very curious now!

    Thread Starter tyler0001

    (@tyler0001)

    OMG :facepalm:

    I came across this older post which provided the solution: https://www.ads-software.com/support/topic/install-verification/

    The wp-config.php changes should be inserted BEFORE this line:
    /* That's all, stop editing! Happy blogging. */

    Interesting that the PHP definition worked but not the JS. At any rate.. this is resolved! Thanks again for the quick response.

    Plugin Author stayallive

    (@stayallive)

    Doh. Haha, it happens to the best of us ??

    Glad you figured it out and indeed interesting the PHP one did work.

    Happy you got it working!

    If there is anything else you are running into please do open up a new topic!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘DSN and PUBLIC_DSN the same?’ is closed to new replies.