tdmalone
Forum Replies Created
-
You can’t use really Contact Form 7 with Simply Static.
But, you could look at a third-party service such as Google Forms or Wufoo, where all of the server side processing is done by the third party.
Forum: Plugins
In reply to: [Simply Static - The WordPress Static Site Generator] appending php codeThis is a limitation you’ll hit with static sites in general – nothing can be dynamic, because then it wouldn’t be static ??
I had a quick look at the post Robin made – if what her plugin collects is output as inline JS on the page (as it probably would be with wp_localize_script), it should work fine with Simply Static, although with the proviso that the code that is output would be the options at site generation time, and obviously wouldn’t be dynamic after that.
In general you wouldn’t be able to re-add dynamic functionality relying on WordPress with one PHP file, as you’d need the entire WordPress framework present to process it (so then, there’d be no point going static at all). Adding some custom code for some simple dynamic functionality would be fine, but you’d then also lose the benefit of being able to use super-fast static hosting options like AWS’ S3.
So it would kind of depend on your situation… having said all of that, it might even just be a missing script that you need to include in Simply Static’s settings! Are there any console errors – perhaps 404s on looking for scripts that Robin’s plugin uses? If not you might need to look at re-implementing the functionality in a purely frontend way, JS only.
These are generated in the
handle_30x_redirect()
function inincludes/tasks/class-ss-fetch-urls-task.php
.I’m not sure exactly what your question is, but does looking at that function answer it?
A couple of other findings in case they help others:
– You _must_ use absolute URLs if you’re using sitemaps (with Yoast at least). If you’re using relative URLs, Google will complain that the links in the sitemaps are invalid.
– Simply Static will still follow all the links to the other sitemaps, so you only need to include https://example.com/sitemap.xml in your Additional URLs setting.
– I’m currently working around the 301 redirect issue by just manually ‘moving’ sitemap_index.xml to sitemap.xml before I sync to my host.Actually, on further digging, this is the way Simply Static works ??
The redirect is created in
includes/tasks/class-ss-fetch-urls-task.php
in thehandle_30x_redirect()
function. As part of this, a redirect page is created similar to the above.This (sort of) works for HTML files, but doesn’t work for XML files.
The reason is only sort of works for HTML files is that the server will still send a 200 OK response, which is not really a 301/302 redirect.
Of course we could write a custom script to pick up this template and do custom logic to create a 30x instead, but I wonder if there’s anything else Simply Static can do to help here. Maybe a filter to modify this behaviour – or at least to change the template without needing to edit the plugin’s views directly?
Just thinking out loud here, not sure yet what the best solution is or whether it even should be part of Simply Static.
Due to the mixed results I had with inotify, I settled on using a local git repository in the destination directory. Then, I have a cronned script that runs
git status
every 5 minutes. If it finds changes, it commits them and then does all the remote syncing stuff.Forum: Plugins
In reply to: [Simply Static - The WordPress Static Site Generator] cant generateAre there any errors in your PHP error logs?
Forum: Plugins
In reply to: [CF7 Invisible reCAPTCHA] How can I test if this works?If you want to force the user to be validated, to see if it works, you can open Chrome Dev Tools, ensure the Console is displayed (press Esc if it’s not), click the Network Conditions tab, and then set your User Agent to ‘Googlebot/2.1’. This will force a recaptcha validation to be shown so you can prove you’re actually not Googlebot ??
Do you have the uploads directory added as an extra folder in the Simply Static settings?
Dynamic features won’t work. W3 Total Cache does, to an extent – the page cache is useless as static is faster anyway ?? but the minification is still super helpful.
Contact Form 7 – you’ll need to ensure that its JavaScript can still access your WP install, so you may need some repointing of its URL (I haven’t tried this).
WooCommerce registration (and login) will not work.
And I’m not sure about Multisite!
+1
Currently I am using inotify to watch when the destination directory changes, but I’m having mixed results with that
Forum: Plugins
In reply to: [Radio Buttons for Taxonomies] Add changelog for v1.8.0Oops, my apologies, I just found it at https://en-au.www.ads-software.com/plugins/radio-buttons-for-taxonomies/#developers.
It’s not showing up in the WP plugin update interface though – maybe there’s somewhere else it needs to be submitted to go there?
Forum: Plugins
In reply to: [Seamless Sticky Custom Post Types] Is this plugin dead?Hi catmaniax,
This plugin still appears to function, although I haven’t checked for security vulnerabilities. Were there particular vulnerabilities you have found in the code?
Forum: Plugins
In reply to: [Delete Thumbnails] Parse error: syntax error, unexpected $end??
Forum: Plugins
In reply to: [WangGuard] Alternatives going forward with or without WanguardAsk @jconti about whether he’d contemplate releasing Wangguard as open source or otherwise co-operate with the community
The plugin is open source – see the license.txt inside it ?? (Having said that, even if it wasn’t, one could argue that it inherits the GPL from WordPress anyway). So, anyone can pick it up, fork it, and get it up and running again… if they’re willing to.
Having said that, I’m not across the server component and this may be what you were referring to.