Karen Attfield
Forum Replies Created
-
Adding a quick follow-up with an improvement to that snippet I shared earlier, avoiding the need for the strict pattern check:
add_filter( 'grunion_contact_form_field_html', function( $rendered_field, $field_label, $id ) {
if ( $field_label === 'Website' ) {
$rendered_field = preg_replace(
'/pattern="([^"]*)"/',
'pattern="https:\/\/example\.com\/.*"',
$rendered_field
);
}
return $rendered_field;
}, 10, 3 );Hi there,
Adding the pattern attribute looks like it would be a good enhancement to the
field-urlfield! I’ve submitted an enhancement request with this suggestion: https://github.com/Automattic/jetpack/issues/42205However, you may also have some options available to you if you are comfortable experimenting with some code snippets on your site. I’d recommend a functionality plugin such as what we suggest here:
https://jetpack.com/support/adding-code-snippets/
While we don’t officially provide customization support, if you have some experience of hooking into filters you may have some level of success by hooking into the
grunion_contact_form_field_htmlfilter to modify the HTML, specifically thepatternvalue:https://developer.jetpack.com/hooks/grunion_contact_form_field_html/
I have come up with a fairly rudimentary example you may be able to experiment with. Bear in mind with this though that the pattern used at our end could change rendering this non-functional. Also, the validation is also only on the front-end here (there is further validation done after the form is submitted, but presuming the inputted URL would otherwise normally pass standard URL validation that should be fine), and assumes the field label is ‘Website’:
add_filter( 'grunion_contact_form_field_html', function( $rendered_field, $field_label, $id ) {
if ( $field_label === 'Website' ) {
$rendered_field = str_replace(
'pattern="(?:(?:[Hh][Tt][Tt][Pp][Ss]?|[Ff][Tt][Pp]):\/\/)?(?:\S+(?::\S*)?@|\d{1,3}(?:\.\d{1,3}){3}|(?:(?:[a-zA-Z\d\u00a1-\uffff]+-?)*[a-zA-Z\d\u00a1-\uffff]+)(?:\.(?:[a-zA-Z\d\u00a1-\uffff]+-?)*[a-zA-Z\d\u00a1-\uffff]+)*(?:\.[a-zA-Z\u00a1-\uffff]{2,6}))(?::\d+)?(?:[^\s]*)?"',
'pattern="https:\/\/example.com\/.*?"',
$rendered_field
);
}
return $rendered_field;
}, 10, 3 );As we don’t generally provide customization support though (our scope of support for reference: https://jetpack.com/support/scope-of-support/), we wouldn’t be able to continue debugging that specific snippet if there are any issues, but hopefully it allows you to experiment with different changes to your form.
As for other attributes, the approach could be similar, but depending on the attribute it may also be something we can request be added within Jetpack itself. If there is anything in particular you would like to see added to any of the Jetpack contact form fields, do let us know.
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Too many spawn-sync requestsIn terms of Related Posts, yes without Sync that feature wouldn’t work unfortunately.
As for the issue itself though, I was able to take a closer look at why Jetpack was syncing so many
update_optioncalls, and on looking more closely at what was being synced it appears as though the issue on your site is related to one of two plugins: Geo Mashup, and Swift SMTP (formerly Welcome Email Editor). The list of plugins on your site appears to be changing continuously – not in terms of which plugins are active on the site, but the order of those two plugins in particular. Because their order in the list changes, this is seen as a change in the active plugins list, triggering sync.It’s not clear why those two plugins are changing order in the list, but it seems that settings within one of those plugins is likely affecting the plugin’s active status in some way.
What I’d suggest, if this would work on your site, is to try deactivating one and then the other of those two plugins, to see what impact this has on the sync calls in your logs. This should help narrow down which of the two plugins is making these changes.
From there, it might be worth looking at specific settings for each plugin to see if there is anything you can see that might result in continuously updating options, if possible.
Either way, do let us know what you find, as we’re also quite curious to know what is causing this option to be updating so often.
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Too many spawn-sync requestsHi there,
Those span-sync calls will be coming from Jetpack Sync. For example, when a post is created or updated Jetpack Sync will send this action to WordPress.com so that the information we have on our servers will be aligned with what is on your site.
Looking at the sync activity for the site mentioned in the logs you’ve shared, I do see that virtually all recent sync activity is related to one action, which is
update_optioncalls specifically for theactive_pluginsoptions.Are you aware of any processes running on your site that would result in a high level of activity, specifically related to the list of active plugins on your site?
Other options do include completely disabling Jetpack Sync on your site, though that would mean that functionality that relies on sync would not work, for example Search, Related Posts and more. There is more information on what Sync does here:
If we can determine what activity might be resulting in those calls though, that might not be needed. Do let us know if you have any more information about possible activity on the site that could result on those
update_optioncalls.Hi there @edvanture,
Could you please share some more information about which file you are editing? For example, invoice templates within Jetpack CRM include the invoice-pdf.html template, portal-invoice.html template and the statement-pdf.html template. You’ve mentioned the theme-editor.html – if you’re referring to the theme editor for the site itself could you please let us know exactly how you are changing the layout of the invoice in that file?
Any information you can share about changes you are making or what files you are using will help us identify what the issue may be. Thank you!
Hi @lestado,
We’d love to investigate this further – could you provide some more context about when this issue happens? If I create a new contact and manually edit the name, the newly edited name change saves properly and I can see it showing correctly on the Contacts -> View All page.
If you are editing the contact name via the CRM Contact Edit page, in which locations is the name showing up incorrectly?
Hi @watz2000
With the X-Frame-Options issue you are seeing, when a site has X-Frame-Options: DENY in its HTTP headers, browsers will refuse to load it inside iframes. That currently breaks our local Critical CSS generator – we’re currently working on better error reporting to help with this issue.
However
X-Frame-Options SAMEORIGINworks fine with Jetpack Boost. Are you aware of any settings on your site’s server that will affect HTTP headers? It looks like this may be something your host could help with though – I came across this link which does explain HTTP headers and how to change them in a little more detail: https://www.geeksforgeeks.org/http-headers-x-frame-options/I hope that helps somewhat, but if you have further questions do let us know.
Hi @adeone
Enabling the ‘Defer Non-Essential JavaScript’ shouldn’t move page elements further down the page – I wonder if what may be happening here is that the forms are considered to be using non essential JavaScript, but the way the page loads means that the form scripts need to run at a specific time in order to appear where intended.
However before we look into whether that it an issue, I do notice that your site appears to use Cloudflare, so as a first step could you please try pausing Cloudflare to see if that makes any difference here?
I’d also recommend deactivating any other plugins that could possibly be conflicting with Boost – caching plugins for example – and toggling on the ‘Defer Non-Essential JavaScript’ option again.
Lastly, could you share more about the forms that are being pushed down to the footer – are they created by a specific plugin or via the theme? If not via the theme, what happens if you temporarily switch to a default theme such as Twenty Twenty?
Forum: Plugins
In reply to: [Jetpack VaultPress] PSA: Not tested in 3 major releases?We have stopped new development for VaultPress since our plan is to migrate all current customers to Jetpack Backup. We’re only doing security updates at the moment as needed.
We have also discontinued all plans that include VaultPress in favour of our new plans featuring the Jetpack Backup system.
We’d be happy to help migrate you to Jetpack Backup on your existing plan if you would be interested in trying it out. Feel free to reach out to us via the Jetpack contact page and we’ll be able to help a lot more quickly via a support ticket over there. Thank you!
- This reply was modified 4 years, 5 months ago by Karen Attfield. Reason: Link formatting
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Randomly disconnectsHi @jodzeee
Thanks for sharing your URL, and the screenshot there. That second connection option is there because it is possible to have your site connected to Jetpack, but with a site-only connection. If you connect your WordPress.com account, more Jetpack features are available (features that require user authentication).
In terms of the Jetpack connection on your site, unfortunately it isn’t possible to get notifications when Jetpack is disconnected on your site though this is a feature that may be considered in the future. I do notice that there are quite a lot of active plugins on the site (visible via the Jetpack connection itself), so it is possible that another plugin could be interfering with the connection at times (more likely a security plugin in that case), as Mehdi mentioned. But the best bet here would be to reach out to your host to ask for server error logs from around the times that you notice Jetpack is disconnected. If there is something happening at a hosting level, the logs may pick that up.
Do let us know what you find here and we’ll be happy to troubleshoot further if possible as well.
Hi @ions2020
I am sorry to hear that, but can understand that you need an image CDN solution that may be easier to troubleshoot.
If you do want to continue troubleshooting we are still happy to help. One more thing I can share that could be useful is some links to try to demonstrate what we are seeing. I can see that the image links on your site are currently showing as broken again, even though it seems that Jetpack my be disconnected (this could be related to caching on your site). Looking at the current site logo, the URL we are trying to use for the image is https://i2.wp.com/artionacademy.com/wp-content/uploads/2021/01/HandLogo_white-4.png. Instead of seeing an image at that link, I see the following error message: ‘We cannot complete this request, remote data could not be fetched’.
When viewing the original image link – https://artionacademy.com/wp-content/uploads/2021/01/HandLogo_white-4.png – I see a message saying ‘Forbidden. You don’t have permission to access this resource.’. This is the 403 error that we’ve pointed out earlier. This is happening on a URL that isn’t using Jetpack’s image CDN at all, which indicates there is something else on a hosting or site level that is blocking access to images (perhaps not visible to everyone, but there is a block in place).
You mentioned that the issue only came up when you uninstalled Jetpack and re-installed it but isn’t a problem on your other site – out of curiosity is there any difference in plugins between the two sites?
Forum: Reviews
In reply to: [Jetpack Boost - Website Speed, Performance and Critical CSS] No joyThank you!
It looks like there are quite a few plugins active on your site (that is only visible from our end via the Jetpack connection). It is possible that there may be a conflict between Boost’s Critical CSS generation and one or more of them. Ordinarily we’d suggest disabling all plugins but Boost and try running the Critical CSS generation again. Instead, it may be better to try deactivating specific plugins (any that add scripts to the site such as the Header Footer plugin, or may affect site styling such as Elementor add-ons and lastly any caching plugins). After deactivating them, could you please try toggling the ‘Optimize CSS Loading’ option off then on again, and clicking the ‘Regenerate’ link?
Do let us know if there is any difference here.
Hi @danpw
Thank you for the detailed steps to test this out!
I tested this out using those steps, however in my initial testing the ‘match all conditions’ checkbox didn’t enable itself at the end. In order for us to try to replicate this, could you please share a few more details about your site if possible? If you are happy to share your site URL here that would be helpful, however if you want it to remain private, you can also contact us via this contact form. If you choose to reach out directly, please include a link to this thread.
Also, are you seeing errors in the JavaScript console when testing this out? You can use this guide to share any JavaScript errors that might be occurring if needed:
https://wordpress.com/support/browser-issues/advanced-browser-troubleshooting/#java-script-errors
You also mentioned that you tested with a default theme and no other plugins except for Jetpack and Classic Editor which is really helpful (thank you) – do you also notice the issue if testing on different browsers?
Hi @ions2020
We’re still seeing those ‘403 forbidden’ error messages from our end, when Jetpack attempts to communicate with the
xmlrpc.phpfile on your site.From our end we’re unable to see if there is a particular IP address experiencing issues, however what may help here is finding out if there are any other security measures in place at the hosting end (not necessarily specific to Jetpack but just general security features). Do let us know if your host has any information about this.
Forum: Reviews
In reply to: [Jetpack Boost - Website Speed, Performance and Critical CSS] No joyThat error shouldn’t be persisting and we’d be happy to help troubleshoot. To help with that, are you happy to share your site URL here? If not, could you share a list of any currently active plugins on your site?