The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Missing argument in...
 
Notifications
Clear all

[Solved] Missing argument in _getWPComments causes wrong comments in combiation with redis plugins

24 Posts
6 Users
3 Reactions
5,466 Views
 BenK
(@benk)
Posts: 4
Active Member
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
 
[#1584]

Hello,

since the major update an wpDiscuz 7.x there is an error within the method _getWPComments of the file /wp-content/plugins/wpdiscuz/class.WpdiscuzCore.php

In case of non paging comments the array $this->commentsArgs haven't an argument offset like in version 5.3.5.

This missing argument is relavant for the creation of the redis key within WordPress core method get_comments within WordPress core class class-wp-comment-query.php:

$_args = wp_array_slice_assoc( $this->query_vars, array_keys( $this->query_var_defaults ) );
unset( $_args['fields'] );
$key = md5( serialize( $_args ) );
$last_changed = wp_cache_get_last_changed( 'comment' );
$cache_key = "get_comments:$key:$last_changed";
$cache_value = wp_cache_get( $cache_key, 'comment' );

See also:
https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-comment-query.php#L429

If your WordPress uses a redis plugin like Redis Object Cache and you will click on the "Load more comments" Button, the same initial comments will be loaded.

Many enterprise bussiness sites based on WordPress are using caching, so please fix this issues.

Best regards,
Ben


 
Posted : 22/01/2021 3:01 pm
Asti
 Asti
(@asti)
Posts: 8267
Illustrious Member 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
 

@benk,

We'll take this into consideration for future updates. 


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 25/01/2021 12:03 pm
(@bekind)
Posts: 6
Active Member
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 @asti - I am having the exact same issue and we are too invested in wpdiscuz as well as redis so we cannot afford to remove either. My developers modified the file pointed by @benk to get "Load More" to work correctly. But that is obviously incorrect.

Can you please share when the solution to this issue is expeced? The way we use wpdisuz makes redis important as we get sudden traffic + comment spikes and redis cache helps us manage our infrastructure.

Regards


 
Posted : 22/02/2021 3:02 am
(@bekind)
Posts: 6
Active Member
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 @asti - Any update on this. We accidentally broke wp comments during Wordpress Upgrade due to this issue. It's kind of critical for sites that heavily use wp comments. Kindly let me know when we can expect a fix here.


 
Posted : 14/04/2021 4:35 am
Asti
 Asti
(@asti)
Posts: 8267
Illustrious Member 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
 

@bekind,

We've added the wpdiscuz_filter_args hook. You can use the hook and make the caches you like. More info here: https://wpdiscuz.com/docs/codex/filters/wpdiscuz_filter_args/


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 17/04/2021 1:28 pm
(@willybob)
Posts: 22
Eminent Member
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
 

I'm intetrested in this solution as I have exactly the same issue.

But I still don't get how those hooks would solve the problem...


 
Posted : 19/04/2021 10:13 pm
(@bekind)
Posts: 6
Active Member
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 @willybob,

What they are recommending is that we add the pagination parameter in the argument using the hook. The fundamental issue here is that Wordpress core is expecting a parameter "offset" as pointing by OP. But WpDiscuz doesnt have that parameter.

So essentially, one needs to figure out what parameter is used by Wpdiscuz for AJAX pagination and then map that parameter to offset parameter. If we filter the argument that way then the core would be able to create a unique key per page and the solution would behave as expected.

I havent had time to work on this else I would have shared the solution but I do understand what is the issue hence sharing my thoughts. If you happen to make progress, please share so all of us can use the solution. If I get to it before you 🙂 then I would share.

Regards 


 
Posted : 19/04/2021 10:18 pm
(@willybob)
Posts: 22
Eminent Member
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
 

I will, do not hesitate to share any progress too. 


 
Posted : 19/04/2021 10:34 pm
 kal
(@kal)
Posts: 13
Active Member
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
 

Is there any solution for this problem?


 
Posted : 22/09/2021 3:33 pm
(@aohagan)
Posts: 15
Eminent Member
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
 

I'm also interested in the solution to this issue.

Gotta say that I'm surprised that after it being flagged over 14 months ago that the solution has not been added to a plugin update.


 
Posted : 26/03/2022 5:23 am
Asti
 Asti
(@asti)
Posts: 8267
Illustrious Member 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
 

@aohagan,

The changes were already included in the wpDiscuz v7.3.10 - 13.01.2022. Please read the changelog here: https://wordpress.org/plugins/wpdiscuz/#developers


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 26/03/2022 4:14 pm
 kal
(@kal)
Posts: 13
Active Member
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 It never worked. Even with the latest version it doesn't work either. If you have more than 50 comments, load the first 20-30 indefinitely. That's why I turned off "Lazy load comments on scrolling"


 
Posted : 26/03/2022 4:19 pm
Asti
 Asti
(@asti)
Posts: 8267
Illustrious Member 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
 

@kal,

Please create a dev/staging copy of your website in some sub-domain, make sure the problem exists and send admin details to us. You can use Duplicator to create that site.

You can send it to info[at]gvectors.com email address.


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 26/03/2022 5:37 pm
(@aohagan)
Posts: 15
Eminent Member
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 I've sent you details as outlined here.
Further to @kal's comment, we see it happen on any comment count that requires a 2nd "load more" trigger - the first "load more" is fine, any subsequent request simply returns the same payload as the first response


 
Posted : 26/03/2022 7:15 pm
kal reacted
 kal
(@kal)
Posts: 13
Active Member
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
 

@aohagan Yes, it is exactly the same with us. And it's been like that for a year. There is no version so far to fix this problem


 
Posted : 26/03/2022 7:27 pm
Page 1 / 2