soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
314 stars 29 forks source link

Duplicate Shortcode Execution / Curl Requests #2664

Closed MilesS closed 2 years ago

MilesS commented 2 years ago

Description

We have a custom plugin that makes multiple API call via curl to Salesforce. Without Oxygen Builder everything works fine.

With Oxygen Builder all API requests are doubled; the system calls Salesforce twice with the same request milliseconds after each other.

We have tested on multiple themes, and it looks like Oxygen Builder is causing the conflict.

Question

When debugging, we can only find the one call; we don't code being executed twice when using Query Monitor. It is as though Oxygen Builder is running everything twice. Once before we can catch it in a debug, a second time after.

Does Oxygen Builder load WordPress twice?

Without Oxygen Builder

Salesforce reports one API call; which is wanted.

With Oxygen Builder

Salesforce reports two simultaneous API calls, sending the same request.

KittenCodes commented 2 years ago

@MilesS Does this happen in the builder or on the front-end of the site (or both)?

MilesS commented 2 years ago

@KittenCodes we don't execute the shortcode in the builder; so it doesn't conflict with the builder.

This is all happening on the front-end.

The other strange item is that it happens even out-side of shortcodes. For example we have a few add_actions that fire on the init level. Those also duplicate when oxygen builder is enabled. This too happens on the frontend.

KittenCodes commented 2 years ago

@MilesS Thanks for the update.

Is the shortcode within Oxygen and within the WordPress editor, or just in Oxygen?

MilesS commented 2 years ago

@KittenCodes within just Oxygen

I have tested also on a blank Oxygen canvas; to see if it is oxygen template; it also behalves this way in the frontend on the blank default Oxygen.

KittenCodes commented 2 years ago

Thanks @MilesS.

Please could you open a support ticket so that we can take a look at this for you? You can open a ticket here: https://oxygenbuilder.com/support.