Hi,
Finally I can post questions here on the forum. ContactForm7 is a very important plug-in for me since it is installed in at least 12 sites that I need to migrate from WP to ClassicPress.
However each time it gives a 500 error or whitescreen of death. After disabling all plugins, I discovered that it is CF7 that is preventing me to migrate.
Please help. Is there a way to keep using cf7 after migrating and if so: how?
Take a backup of the contact-form-7 folder of your website. Download the above zip file, extract it to a local drive and then replace all files in the contact-form-7 folder with the files just downloaded. This will downgrade your CF7 installation to version 5.1.9 which should work perfectly well with ClassicPress.
Hi and thank you for your help. That did the trick. However, on many of the sites the theme is also the problem. After resolving this CF7 hurdle, it now seems that the theme can’t handle ClassicPress.
It’s the Prostyler Theme from Yunus and Michael Formby. And they haven’t updated their 3.5 thousand members yet with a solution in the form of an update. So like many of us, I am still in problems with many of these sites that don’t function in both Classic Press and WP 5.6.
I’m preparing a fork (which I gonna call CF 8, because of its history, which I am WELL aware of, having been around when there still was a CF 2 and 3 ).
Currently testing which versions above 5.1.9 are ACTUALLY still compatible with CP - testing with CP 1.2.
I have 5.2.2 on a CP site all seems to work ok. i.e. I get a message if someone uses the form and form creation works as well.
Although I do have this message on the backend Contact page
“Contact Form 7 5.2.2 requires WordPress 5.3 or higher. Please update WordPress first.”
I think the workaround is to just comment out the line in contact-form-7/load.php which includes the block editor component, which seems to be around since CF 7 5.3 (includes/block-editor/block-editor.php).
I agree, i’ve successfully tested this by manually installing CF 7 v5.2.2.
To get rid of the message, you just have to change the constant WPCF7_REQUIRED_WP_VERSION to 4.9 in the main plugin loading file, ie. contact-form-7/wp-contact-form-7.php.
@fwolf would you like to make this a CP research project?
We’d give it a home in the ClassicPress Research GitHub repo and give it a new name such as “Classic Contact Form”, alongside Classic Commerce and Classic SEO.
I’d already discussed forking CF7 with James before you mentioned this so it is certainly on our radar.
Sure, lets do that
I’ve already started working on the code, called it Contact Form 8 (but we could go with Classic Form or so as well), did a few tests and did the described changes to make it work with CP again.
Can you let me have the URL to your GitHub repo please. And, can you give me (@timbocode) full admin rights to that repo so that I can transfer it to research.
EDIT
I’ve created the following repo, so it’s all good to go. To confirm what I’ve said elsewhere, I’d like version 1 to be little more than refactoring and I’ve created a few issues to get started.
As a CP research project, you can help in any way you’re able to. The code will need refactoring for one thing and that’s the area I think we need to focus on first.
What I’d like to see for version 1 is little more than a “re-badged” version of CF7 5.1.9 (plus recent security patch) so it should, in theory, be a relatively painless job.
We can then look at improving / removing / adding in later versions.
Perfect … guess I do a fork to my account, then incorporate my (simple) adaptions and then add a pull request with the changes from my fork?
I’ve just called it CF 8, while retaining all pre-existing version numbers … but could also just call it Classic Contact Form 7 for now.
The CF8 relable thingy is, because CF 7 really came to be like this - in the early history of WP there were several (rather successful) contact form plugins with the fancy titles “Contact Form”, “Contact Form 2”, “Contact Form 3” and so on. Each one taking the best bits or whatever their author(s) considered to be useful and incorporating it into the new plugin. At some point, CF 7 was the only one that remained … hence my idea calling it CF 8 later on. Could do it similar to ClassicPress, ie. internally keeping the version numbers of CF 7 5.3.x, and enhancing it with own version strings / numbers and functions / methods for potentially supporting CF 7 / CF 8 add-ons.
Maybe when starting to do actual changes, eg. adding a less complicated way of parsing the CF 7 short tags / patterns.
Cause that is the main PITA for beginners but also professional users - you always have to stick to the patterns and try multiple times, rearranging things, when the field you wanted to add clearly does not work like it should.
I am aware of the efforts of establishing a secondary short code system just for CF 7, eg. using double square brackets (a la[[my_tag]]), but it could easily be just a less strict shortcode pattern or just a bit more logical one (eg. class:"class-name1 class-name2" instead of having to wonder whether class:my-cllass classname2 is actually gonna work or not) and so on …
And people that were there early days will know about the backstory to the name and our way of “honouring” it will please the community because it’s a way of paying back to the devs who where before.
And it can be CF8 version x.x.x (the 7 wasn’t a version number in CF7, so why should the 8 be?).
No, its straight forward from 5.3.2 - which works flawlessly in CP 1.2, but only with the before-mentioned modifactions. This ensures a) latest security issues fixed (the one that broke it for CP 1.2 + WP 4.9.x) and b) as much as compatible to the main branch as possible.