steve-pheriche
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] CSS “calc” functions are collapsed and so non-functionalFurther investigation, I’ve found the error in your plugin
Lines 547 and 550 of https://github.com/litespeedtech/lscache_wp/blob/master/lib/css-min/minifier.cls.php
// Remove spaces before the things that should not have spaces before them. $body = preg_replace('/ ([:=,)*\/;\n])/S', '$1', $body); // Remove the spaces after the things that should not have spaces after them. $body = preg_replace('/([:=,(*\/!;\n]) /S', '$1', $body);this will strip spaces around the asterisk character. “*”
that character needs spaces around it for calc()raised it on GH
https://github.com/litespeedtech/lscache_wp/issues/405- This reply was modified 4 years, 7 months ago by steve-pheriche.
Hi I wasn’t worrying, I was just pointing out an issue with the block width targeting. I thought it worth you guys raising the bug on GH.
As it happens I raised it and the bug has been resolved with PR: https://github.com/WordPress/gutenberg/pull/32454
And was fixed in Gutenberg v10.7.3
So the issue is closed.
Hi, OK. I’m aware that the Gutenberg Plugin is divergent.
I’m building a site which will launch shortly after WP5.8 . WP5.8 will have FSE, and the core and gutenberg teams are making big changes which is what we are seeing here. I’ll file a bug on Github Gutenberg regarding this issues but it’s put a cramp in my development cycle.Just as long as the Astra team are aware of the breaking changes for the July release.
Here’s the Git report, it seemingly affects all themes. Gutenberg remains a disaster.
https://github.com/WordPress/gutenberg/issues/32274- This reply was modified 5 years ago by steve-pheriche.
- This reply was modified 5 years ago by steve-pheriche.
I’ll set up a ticket a little later, but for now here’s some info: for testing I had deactivated all plugins but for the theme (Astra basic) and your plugin.
The account is connected in the plugin admin, but the response I got from the frontend was a JSON response from Square. (401)
{ "success": false, "message": { "message": "CORS request not allowed from this host. origin=https://pci-connect.squareupsandbox.com", "alreadyLocalized": true }, "debugInfo": "" }the full post vars for this tells me their API is rejecting the call
{"csp-report":{"blocked-uri":"eval","column-number":22,"document-uri":"https://pci-connect.squareupsandbox.com/v2/iframe?type=main&app_id=sandbox-##############################&host_name=##############################","line-number":27,"original-policy":"default-src 'none'; frame-src 'none'; connect-src 'self'; img-src 'self'; style-src 'unsafe-inline'; font-src 'self'; script-src 'unsafe-inline' https://js.squareupsandbox.com; report-uri https://squareup.com/1.0/as-reporter/csp/##############################","referrer":"##############################","source-file":"blob:https://pci-connect.squareupsandbox.com/##############################","violated-directive":"script-src"}}I had the same issue, the form does not render on the frontend.
plugin does nothing.I connected to the Live Square API , what worked fine “connected”
I flipped over to the Sandbox API and set the vars/ location etc.The WP site does nothing, the form does not render off the shortcode, theres no hint of a gutenberg block, and none of the supplied / linked docs are relevant to this version of the plugin.
All the plugin does is connect, then that’s it. There are no further clues
Hi, what I did today is a different horrible fork, but it would be a better place for you to put a filter.
Line 90 of class-templates-sdk.php on my development version now looks like this, and will probably stay this way.
if ( current_user_can( 'manage_options' ) ) { self::$instance = new Self(); self::$instance->init(); self::$instance->includes(); }Naturally that’s not idea for you guys, but I suggest some conditional there from your options-general.php?page=editor_plus#/general might be a good idea.
Otherwise everyone will be forking like I did!
thanks again
Hi, Thanks for the prompt response.
Yeah, I did have a look through the code and couldn’t see a hook or filter.
I’d considered the CSS route, it feels a bit “hacky” to have the library in memory but hidden.It might be good to provide a way for users to turn that feature off. I understand for small businesses with one person making their own site it’s probably good – but for web-devs supplying a concise editor to a client with 20 staff who have access to the Editor role … it’s a recipe for disaster!
I investigated forking to see if I can make the enqueue conditional on user role and an options page, or current_user_can().
For example: /plugins/editorplus/index.php (line 16)
require_once plugin_dir_path(__FILE__) . 'extendify-templates-sdk/class-templates-sdk.php';But for now I’ve done a rather brutal local fork by commenting out the require_once , but thanks again for your work here with this plugin and the quick response.
– Steve
Forum: Plugins
In reply to: [Atomic Blocks - Gutenberg Blocks Collection] Post grid featured images bugDid this fix get implemented?
I see no mention of it in the changelog for 2.0.1
Forum: Plugins
In reply to: [Atomic Blocks - Gutenberg Blocks Collection] Post grid featured images bugI’ve found the only solution is to rollback to Version 1.7.1
eventually I’ll need to migrate away from atomic blocks as this issue has been present for a while and is present in v2
Forum: Plugins
In reply to: [Gutenberg] White Screen on Post / PageHi, I am not anything to do with Gutenberg but …
this is very likely a clash between Gutenberg and the Apache ModSecurity ruleset provided by Atomicorp.
The most recent version of Gutenberg will trigger Atomicorps ModSecurity rules and they will 403 that polyfill.js file, causing Gutenberg to whitescreen.Atomicorp ruleset is detecting that file as an XSS attempt because of the JS insertion of an iFrame (is my guess based on my own ModSecurity logs)If you are on a Plesk server it’s very likely this ruleset is operational as these rules are the standard.
If you have access to your hosting VPS and feel comfortable editing the ruleset you can add a manual exception, the simplest method being to enter the ID of the rule that will get your Gutenberg operational at the cost of a lower security to XSS in general. I am unfamiliar with methods of making more elegant exceptions.I have reported this bug on the Gutenberg GitHub but I was ignored and my results flagged as a “help request”. So it will probably not get fixed.
https://github.com/WordPress/gutenberg/issues/10075- This reply was modified 7 years, 8 months ago by steve-pheriche.
What I’ve done is de-queue the CSS. My CSS file is named gdpr-cookie-fork.css and I put it the functions.php in a child theme for my client. Like this …
/*** overwrite the cookie law CSS **/ function cookie_GDPR_style_fixes(){ wp_dequeue_script('moove_gdpr_frontend'); wp_enqueue_style( 'moove_gdpr_frontend', get_stylesheet_directory_uri().'/gdpr-cookie-fork.css' ); } add_action('wp_enqueue_scripts', 'cookie_GDPR_style_fixes', 100);I have resolved my issue. I amended my function to
function pher_restrict_dashboard_to_admin() { if ( is_admin() && ! current_user_can( 'administrator' ) && !( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { wp_redirect(home_url('/member-portal/')); exit; } } add_action( 'admin_init', 'pher_restrict_dashboard_to_admin',1);and everything with your plugin works fine now. Sorry for the false alarm.
Hi there. This site is running
PHP Version 5.6.3, WP version 4.9.6the URL is currently a local dev server. I’m testing strategies for a client before committing.
I think I have found that the issue, a clash with another plugin. Unfortunately, it is clashing with a plugin I wrote myself – a front-end registration and login plugin.
the offending line in MY plugin (triggering the JSON error in yours) is this dashboard restriction and redirection for members. I’ll take a look at fixing my own error in this wonky looking action, but if you have any thoughts I’d welcome them.
function pher_restrict_dashboard_to_admin() { if ( !current_user_can( 'manage_options' ) && $_SERVER['PHP_SELF'] != '/wp-admin/admin-ajax.php' ) { wp_redirect(home_url('/member-portal/')); } } add_action( 'admin_init', 'pher_restrict_dashboard_to_admin', 1 );commenting out the //add_action in my plugin will allow your plugin to add scripts without any JSON errors
- This reply was modified 7 years, 11 months ago by steve-pheriche.
Forum: Plugins
In reply to: [Participants Database] Uploaded images dont seem to generate thumbs?Thanks xnau, that’s a handy looking function for all sorts of purposes.
Forum: Plugins
In reply to: [Participants Database] Uploaded images dont seem to generate thumbs?Thanks xnau, I just wanted to make sure that my understanding was correct. I wouldn’t like to make a whole thumbnail system only to find that I had accidentally de-activated your own one.
yes, I’ll probably write something for the list view template which checks the returned uploaded image URL, and if it finds there is a thumb version (participants-database/myimage-150×150.jpg) it will use that variant, and if it does not find a thumb it will generate one for next time. That’s my plan anyway.
thanks for the response.