hamarkhis
Forum Replies Created
-
Hello,
I wanted to let you know that with the v3 update of your block, the way Gutenberg handles theme-loaded styles has changed. This caused a latent issue related to style loading from my theme. I found that one important .css file was not loaded anymore.
I was able to identify and resolve this on my end, but it might be useful to take this into account in future updates to prevent other users from encountering the same problem, so that the plugin can be more robust.Thank you for your work on the plugin!
Thanks for your response. Using only this :
function restore_theme_editor_styles() : void {
add_theme_support('editor-styles');
add_editor_style('style.css');
}works for restoring some lost styles, but not all of them.
So I made a strict copy of my site to a staging environment to try to understand what can be wrong, ans surprisingly, the styles are not lost in the staging environment. So I really don’t understand what’s going up.
My provider has been contacted, all caches are disabled, transcients too… I have no explanation for now.Hello,
I noticed that after activating your plugin, the theme’s styles in the Gutenberg editor are lost. To resolve this issue, I had to add the following code to my theme:
function restore_theme_editor_styles() : void {
add_theme_support('editor-styles');
add_editor_style('style.css');
global $wp_styles;
if ( isset($wp_styles->registered['accept-stripe-payments-editor-style']) ) {
wp_dequeue_style('accept-stripe-payments-editor-style');
}
}add_action('after_setup_theme', 'restore_theme_editor_styles' );This ensures that the theme styles are correctly loaded in Gutenberg and prevents the plugin from overriding them. Without this addition, the editor loses all theme styling when the plugin is active, and the styles remain broken even when the plugin is disabled.
It seems the plugin’s editor CSS is currently overriding the theme’s styles, and implementing a solution like this would help maintain compatibility with themes.
Could you please update the plugin so that it doesn’t override theme styles in the Gutenberg editor? Implementing a solution would help ensure compatibility with themes without requiring custom code.
Thank you!
Issue solved.
Usingwp_reset_postdata();before calling
get_the_ID();and it’s working.
Nevertheless, I don’t have to call the function wp_reset_postdata by myself in WordPress coding standards.
So the developers have forgotten elsewhere to add this line somewhere in the JetPack 12.9 plugin, because it’s doing something wrong.Hope you will update JetPack plugin so solve this little issue.
Origin of the issue : the function
get_the_ID()does not return the good post id when JetPack 12.9 is installed.
So JetPack 12.9 is doing something wrong in WordPress loop, messing up some things.
Returning back to 12.7.1.
Still investigating.
Some blocks I am using have the goal of generating dynamic content from very specific pages, based on some simple code like this :
add_filter('the_content', function($content) { $specific_post_dynamic_id = 1234; if (get_the_ID() !== $specific_post_dynamic_id) { return $content; } $metas = get_post_meta( get_the_ID(), ‘protected_for’, true ); $dynamic_content = ..... return $dynamic_content; }, 10, 1);This is working great with JetPack 12.7.1. Updating to JetPack 12.9 causes the function
get_post_meta( get_the_ID(), ‘protected_for’, true )to return
NULLThen my metas are not valid and the dynamic content fails.
Hello, thanks for your replies.
I updated the plugin from 12.7.1 to 12.9.
The issue is still there.
To answer your questions, the specific key is created by myself to do some specific actions on the site.
So I am now trying to reproduce the bug on a staging site.
I will keep you informed.
Forum: Plugins
In reply to: [Accept Stripe Payments] Error on Load signature PageHello and thanks for reaching.
I am not running any cache plugin.
With the customer I noticed that the issue comes only when he’s using his iPhone in order to initiate the payment. With a standard notebook, it has finally been accepted.
Forum: Plugins
In reply to: [Accept Stripe Payments] Error on Load signature PageAny help is appreciated.
Forum: Plugins
In reply to: [Accept Stripe Payments] Disabling Captcha Admin MessageHello mra13,
I don’t understand what you’re talking about.
This post is about a permanent message in the admin dashboard.
The rating of the plugin could be a debate in a separate post.
Forum: Plugins
In reply to: [Code Snippets] Please add support for php8 null safe operator ?->Hello, with ?-> operator I can avoid some useless tests on null and your plugin could have a better PHP8 support.
See that code which can cause errors on execution.
See PHP8 code, not compatible with your plugin.
See PHP7 code, compatible with your plugin with additional check, safe.
Thanks
Forum: Plugins
In reply to: [Accept Stripe Payments] Some payments are refusedThat has been done. Thanks.
Forum: Plugins
In reply to: [Accept Stripe Payments] Some payments are refusedHello, I’m not sure if the debug mode is activated.
The debug log file has always been enabled, like this, but I not sure if I have to do another action of change some parameter somewhere to enable * debug mode * .
But this debug file has never been useful, it does not show what has happened.
Forum: Plugins
In reply to: [Simple Mathjax] A minor bugExcellent, thanks.
I close this ticket.
Forum: Plugins
In reply to: [Accept Stripe Payments] Issue when closing the popupHey, thanks.
Plugin updated.
Results are a little bit strange, after refresh and one click on close : the popup is closing, then poping again, and closing.
I did not expect that, but finally this popup is closed 🙂