Woo Product Forms Issues After Domain Change

By: Toni Novak | Asked: 11/16/2023
ForumsCategory: General questionsWoo Product Forms Issues After Domain Change
Toni Novak asked 5 months ago

I developed a site on a temp domain running WooCommerce with Formidable Pro and the WooCommerce add-on installed. There are forms attached to my products that were required to be filled out before being able to go to the cart. You could not bypass filling them out before moving to the cart page.

After changing the domain name to launch the site you can now bypass filling out the forms and click the button to go to the cart page on those products without filling out any of the fields.

When I changed the domain, I used the Woo tools to clear out all the transients, user sessions, etc., caches, then went back into each product to update it so that they were available on the site again because the product pages were returning an error and not found. I've set up a staging site and deactivated all the plugins as support requested but the issue persists.

Even Formidable support can’t figure out why the forms are not required anymore. Has anyone else experienced anything like this and if so, how did you fix it?

Attachments
Rob LeVineRob LeVine replied 5 months ago

Have you tried a plugin such as Better Search and Replace to see if there's a lingering bad URL in there? https://wordpress.org/plugins/better-search-replace/

Victor Font replied 5 months ago

There's not a lot of information to go on here, other than you changed domains. How did you change domains?

Did you migrate the site to the new domain by importing the temp site into a production WordPress instance or did you actually change the domain name and not migrate WordPress?

If you migrated the site, how did you do it? Did you use a migration tool? Or, just copy the database?

If you simply changed the domain name, did you use a tool like Better Search and Replace Pro to update the entire database to change the domain name wherever it is stored. There literally can be thousands of references to the previous domain name in a WordPress database. Normally, migration tools take care of this.

How were you preventing the forms from being bypassed before? Is there custom code involved?

If you are using custom code, is it written in a transportable format? See reference: https://formidable-masterminds.com/writing-transportable-code-keys-vs-ids/

Did you forget to migrate any code?

"product pages were returning an error and not found" sounds like a permalink issue, but you didn't say how you fixed it.

How did you setup a staging site?

Are all server-side components up-to-date? PHP Version?

Are there any references to the temp domain in the site's htaccess or wp-config.php?

Toni Novak replied 5 months ago

My host is Siteground, so the site was built on a temp URL they provide, then when ready, you use their tool to change the primary domain. Once that was done I used the Elementor find/replace URL tool to make sure they were all changed in the page editor and I used the Siteground find/replace tool which does a complete replacement in the DB of all instances. I then went to the Permalinks and saved those settings twice.

Even after all that, the product pages were returning an error - page not found - so that's why I did all the cleanup with the Woo tools and went into each product and clicked the update button to ensure the new URL was saved in the DB. That allowed the pages to resolve correctly again.

The forms are attached to each product and displayed underneath and they have required fields that, before the name change, you could not click the Proceed to Payment button without the form giving errors that the required fields were not completed and you could not move on until they were. Now, you can add a product, click the Proceed to Payment button, and you go directly to the cart.

I think that possibly running one or more of the Woo tools caused this issue and wiped out some settings for the forms plugin, but I can't be certain. I used the staging site tool on the host to create an exact copy of the live site and have tried disabling all plugins except for Elementor, Formidable, and Crocoblock to help diagnose the issue. I also deleted the Formidable WooCommerce add-on and reinstalled it, then reattached the forms to each product. That didn't work either. I'm at a loss and I can't start over with all this because the site has been launched and we now have orders.

PHP version is 7.4.3 and everything is up-to-date with no references to the temp domain in either htaccess or wp-config.

If anyone can shed light on this, I would GREATLY appreciate it.

Victor Font replied 5 months ago

I'm familiar with SiteGround hosting with new accounts and it sounds like you took the right steps. You should know that the end of life date for PHP 7.4 was November 28, 2022. It's no longer a supported version of PHP. You should upgrade the site to 8.0 at the very least.

Other than needing a PHP upgrade, it may time for you to enable WordPress debug, examine the server's PHP error logs, and check the browser console for jQuery errors. If you can't figure it out, you may have to hire someone to look at the site.

Toni Novak replied 5 months ago

Thanks, I am on the Siteground Ultrafast managed PHP version and they have not upgraded any of my sites to 8 yet. I thought it was strange but since it's their version I'm assuming it's safe to leave it as is and they will update when they are ready.

I have Formidable support working on the issue but it's been a week so far and I'm being proactive. I did post the console and javascript errors to the ticket for them hoping those help.

Thank you for your advice, it is truly appreciated.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right