0

I recently deleted a contact form plugin (HubSpot All-In-One Marketing) on a site and the contact forms stopped working.

Curiously, the forms work when the plugin is installed and INACTIVE, but they do NOT work when the inactive plugin is DELETED.

This means that the plugin being present is affecting the site even when it is inactive. How is this possible? How can a contact form work when a plugin is present and inactive, but not when the plugin is deleted? Can an inactive plugin load script files?

Note: The full form code snippets are being included in the page (not shortcodes or anything else referring to the plugin).

1
  • please edit your question to include the full form code snippets, as well as how they're included in your pages
    – Tom J Nowell
    May 19 at 12:51

2 Answers 2

1

Many hypotheses could be made, but the most probable ones are that the theme or a third plugin loads the script if a specific option saved in the database has a certain value. If the plugin is installed but not active that hypothetical option still exists in the database, on the contrary, when you delete the plugin, it will delete that option.

Another hypothesis is that you think the plugin is deactivated, but a third plugin filters the option "active_plugins" in a mu-plugin, and on the frontend that plugin is active, even if in the page of plugins you see it disabled.

Another hypothesis is the script is loaded by a caching plugin, and it was a coincidence that when you deleted the plugin the cache was also deleted.

You can do also other suppositions, but without having more details you can only guess.

1
  • That is extremely helpful. I was looking at the problem too simplistically and hadn't considered each of these scenarios. Thanks! May 24 at 12:54
0

The answer is already in your question:

Curiously, the forms work when the plugin is installed and INACTIVE, but they do NOT work when the inactive plugin is DELETED.

Note: The full form code snippets are being included in the page (not shortcodes or anything else referring to the plugin).

The plugin itself can't interfere with your site when it's deactivated, but that doesn't mean its files aren't accessible. If you're directly referencing JS and CSS files in the plugin from your code snippets then that bypasses activation/deactivation. None of the PHP will run however.

2
  • Thanks for the reply. The files themselves weren't being referenced directly in the snippets, but perhaps they were being called in an embedded function. May 19 at 12:29
  • note that without seeing these snippets or knowing how they were embedded the most I can do is speculate. Also keep in mind this isn't a reply it's an answer, if my answer did not solve your question please let me know why not so I can update it. If it did answer your question then you can use the large tick under the voting controls to mark it as the correct answer
    – Tom J Nowell
    May 19 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.