Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter joexmith

    (@albrivero)

    Thanks for the suggestions. I tried checking Insert only in the loop and setting Filter to 1 but it didn’t work.

    I found that there’s indeed a plugin processing post content. It’s called Canvas (https://ww.wp.xz.cn/plugins/canvas/) and it’s a block-based page builder that came with the theme.

    When I deactivate the plugin to test, the ad codes are inserted correctly and no error message is shown. But the theme is using that plugin extensively so turning it off is not an option.

    I’ll try to get in touch with the developers (https://codesupply.co/) to get some support or try to find a workaround.

    Thanks for your help.

    Thread Starter joexmith

    (@albrivero)

    Yes, you are right, block 5 is called 8 times and the counters work fine. But that’s the thing, it should only be called 4 times, the number of insertions of the shortcode in the post.

    The way it used to work before is the following:
    1.- I call the block manually inside the post editor adding the shortcode [adinserter name=”InArticle Display Ad”] 4 times.
    2.- The header shows 4 ad placement definitions(googletag.defineSlot) with counters going from 1 to 4.
    3.- The body shows 4 ad insertions (googletag.display) with counters (div id) going from 1 to 4.
    4.- Everything works fine.

    Now it works like this:
    1.- I call the block manually inside the post editor adding the shortcode [adinserter name=”InArticle Display Ad”] 4 times.
    2.-The header shows 8 ad placement definitions (googletag.defineSlot) with counters going from 1 to 8.
    3.- The body shows 4 ad insertions (googletag.display) with counters (div id) going from 5 to 8.
    4.- Error message shows:”googletag.defineSlot was called without a matching googletag.display call.”

    The ads are defined 8 times although they are only called 4 times via the shortcode. Also, the ids visible on the page go from 5 to 8 instead of 1 to 4.

    Something somehow is calling the block twice the times it should be, therefore duplicating the ad insertions (and messing with the googletag.display codes)

    • This reply was modified 3 years, 6 months ago by joexmith.
Viewing 2 replies - 1 through 2 (of 2 total)