Harm10
Forum Replies Created
-
No reply of official support in 10 months! Bad support!
Forum: Plugins
In reply to: [Yoast SEO] wpseo_breadcrumb huge in size and exhausting memoryI have reported on GitHub. Here
Forum: Plugins
In reply to: [Yoast SEO] wpseo_breadcrumb huge in size and exhausting memoryI am used to reporting problems on GitHub (I have an account) but in this case this seems a bit extra work? Why should I create a totally new post (and having to explain everything anew) while you can just forward this all to development? Other plug-in support does that too. So why this difference?
Forum: Plugins
In reply to: [Yoast SEO] wpseo_breadcrumb huge in size and exhausting memoryOn version 15.9 I need to protect my sites for this storage problem by using the code published (too large).
On 15.9 wpseo_breadcrumb shortcode exists and on my test site and the size is 914533 (Home page).
On 15.7 the shortcode does not exist at all so cannot pose a problem.Still I am wondering what is in it? A breadcrumb is supposed to be small especially on the Home page! Do the WP blocks (I have a lot of them on my Home page of my test site) “blow” up the content?
Is there a part of the content of the breadcrumb that you want to see/analyze? If so please specify the best way to code that in PHP.
Forum: Plugins
In reply to: [Yoast SEO] wpseo_breadcrumb huge in size and exhausting memory1 C
2
I am maintaining several sites that never had storage problems. Since recent updates (no changes in the home pages concerned whatsoever) this problem has occurred.3
I am using debug code that is displayed in the page source (hidden but clickable to open) that is only added when I have logged in.
Code for that is:ob_start(); // Start output buffering global $shortcode_tags; R_Debug::dump_remark($shortcode_tags); $shortcodes = ob_get_clean(); $dcode .= '<div id="remark_debug_shortcodes" class="remark_debug_list" style="display: none">Shortcodes:'.$shortcodes.'</div>';
dump_remark code:
static function dump_remark($dumparray) { $output = ''; $dumpcnt = count($dumparray); $output .= 'Array count ' . $dumpcnt . '<br/>'; foreach ($dumparray as $key => $value) { if (is_array($value)) { $serialized_data = serialize($value); $size = strlen($serialized_data); $output .= $key . ' is an array!<br/>'; if ($size > 10000) { $output .= 'array size is too large! ' . $size . '<br/>'; } else { $output .= print_r( $value, true ); } } else { $output .= "{$key} => {$value} <br/>"; } } echo '<pre>' . $output . '</pre>'; }
So I am not changing anything only displaying.
4 See code above.
5 This array is huge. So how would I be able to show it’s content? That why I asked for a sample PHP code.
6 All involved sites are small. Only tens of URLs.
I could give you an URL but I do not want to publish that here.
- This reply was modified 1 month, 1 week ago by Harm10.
Forum: Plugins
In reply to: [Yoast SEO] wpseo_breadcrumb huge in size and exhausting memoryAll my plugins and themes are up-to-date.
I have changed the way of displaying the content of global shortcode_tags as I described above. I now looked at different pages and on different sites and in all cases the size of wpseo_breadcrumb is over 100.000. Sometimes not much (so probably the storage exhaustion would not happen for that particular page) but on my test site’s home page (not publicly accessible and created with block approach in stead of static lay-out) the size is huge!
Apparently what is in that shortcode is created based on the page you are on?I do not understand your question about a code example. I am only looping through the global array of wordpress named $shortcode_tags. Nothing more. Due to the enormous size of this particular shortcode the storage problems occur. If I skip this shortcode from display entirely no problems occur anywhere.
As far as I am aware I am not using wpseo_breadcrumb shortcode anywhere. At least I have not added it somewhere. I do not even know the functionality of this shortcode!
What is it supposed to do?I would like to add that this problem is there since recent updates. So either the last WordPress update is the culprit or maybe the last Yoast update? If you want me to I can rollback any of those 2 on my test site and see what the size will be? I cannot look into the array itself as it gives me this memory exhaustion and my site breaks.
If you want me to display part of this array please supply me with a PHP code for it.I have changed the status of this report as it was set as Resolved and clearly this is not the case……….
Forum: Plugins
In reply to: [Five Star Restaurant Reviews] Show More button has no event?Closing….
Forum: Plugins
In reply to: [Five Star Restaurant Reviews] Show More button has no event?Do you want this report to remain Open until the next release?
I assume this report can be closed?
Forum: Plugins
In reply to: [Five Star Restaurant Reviews] Show More button has no event?I know PHP notices do not break the code but they aren’t there for nothing!
Can you inform when you expect them to be fixed in an update?Forum: Plugins
In reply to: [Five Star Restaurant Reviews] Show More button has no event?As I am not using those plugins but am using the normal plugin isn’t it kind of strange that I need to set those values using a hook? The values are normally there so can be picked up or not? Why do you ask this of your users? Or is this a temporary fix?
Forum: Plugins
In reply to: [Five Star Restaurant Reviews] Show More button has no event?Forgive my ignorance…… But what is (or are) Five Star Business Profile and Schema plugin?
I am using the free version of Five Star Restaurant Reviews and not those mentioned above?I just found that is_admin() is set to true by WP itself when doing AJAX. This seems to be a (undesired) side effect of the AJAX part in WP.
See Is admin and AJAX.
I changed the code toif ( is_admin() && ! wp_doing_ajax() ) { return $meta; }
and then it works OK even when I click the AJAX action button.I looked at your code and that is of no use to me! I want to discern whether an admin is on the admin pages doing something or looking at the web pages. A lot of times hooks are also fired when you are on the admin pages.
If you can confirm that this hook is NEVER fired on the admin side then I can remove this protection (although I still think you should not interfere with the value of a STANDARD function of WordPress).