Abuja Digital Studio · Est. 2018
Start a Project
DocsOCodeInsertTroubleshooting
Troubleshooting

Troubleshooting

OCodeInsertorravo.com/docs/ocodeinsert/troubleshooting

Troubleshooting

"Snippet broke my site" - how to recover

Append ?oci_safe=1 to any front-end URL to disable injection for that request and continue navigating the site. To turn it off site-wide, open OCodeInsert -> Settings and flip Safe Mode on, then fix the offending snippet.

If the admin itself is also broken (unlikely; OCodeInsert never injects there), edit the oci_settings option directly in the database and set safe_mode to 1.

Before/After Content snippets don't appear

Those locations hook into the_content and only fire on singular templates (is_singular()). If your theme renders posts through a custom loop that bypasses the_content, OCodeInsert's footer JS fallback should still inject into the article body. If your theme has no <article> element, the fallback can't find a target; switch to Head or Footer instead.

Snippet runs twice on the same page

Likely caused by a theme calling the_content() twice (a common pattern in custom builders). Move the snippet to Head or Footer to fire once via wp_head/wp_footer instead.

Errors show in the log but the snippet seems fine

The error log records anything OCodeInsert catches during render. Common causes: a JS snippet that mismatched script tags (Type was set to HTML and the user pasted bare <script> tags causing nested tags). Switch Type to JavaScript and remove the outer <script> wrapper; OCodeInsert wraps it for you.

Targeting won't match my URL

Rules match against the request path, not the full URL. Drop https://example.com/ from the rule and lead with a slash: /blog/, not https://example.com/blog/.

Troubleshooting · OCodeInsert Docs | Orravo