The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
AI Assistant
Cookie "wpdiscuz_no...
 
Notifications
Clear all

Bug [Solved] Cookie "wpdiscuz_nonce" Appears in All Pages

4 Posts
3 Users
1 Reactions
537 Views
Posts: 144
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@aerostar)
Estimable Member
Joined: 6 years ago
[#11304]

Howdy,

The cookie "wpdiscuz_nonce" appears in all of our pages. I have dequeued your plugin on all pages except posts, but it still appears. See below screenshot.

Please provide a fix and/or instructions to load noted cookie only on post-type pages or to remove it completely. 

Also, please advise where can I find a description of the above cookie. Your documentation provides nothing.

Thank you.

screenshot wpdiscuz nonce cookie

 


3 Replies
2 Replies
wpDiscuz Support
Moderator
(@wpdiscuz-support)
Joined: 7 months ago

Member
Posts: 3
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Hi @aerostar,

Thanks for bringing this up! The wpdiscuz_nonce cookie is a security token used by wpDiscuz to verify requests and prevent CSRF (Cross-Site Request Forgery) attacks on comment-related actions. It's generated to ensure that comment submissions and interactions are legitimate.

Regarding your issue with the cookie appearing on all pages despite dequeuing the plugin: the nonce generation might be happening at a higher priority hook level (like wp_head or init) before your dequeue takes effect. Here are an approache you can try:

Use a filter to disable nonce generation
Add this to your theme's functions.php or a custom plugin:

add_filter('wpdiscuz_enqueue_scripts', function() {
    if ( ! is_singular( 'post' ) ) {
        return false;
    }
    return true;
});

 


Reply
(@aerostar)
Joined: 6 years ago

Estimable Member
Posts: 144
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Hey @wpdiscuz-support,

Your proposed solution did not work. However, I now understand the behavior of your cookie. Case closed! 👍 

Thank you!


Reply
Asti
Posts: 8290
 Asti
Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@asti)
Illustrious Member
Joined: 8 years ago

Hi,

This logic will not be changed, as for the correct functioning of the wpDiscuz plugin it’s necessary to load wpdiscuz_nonce on all pages.


Reply