Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1022986

    I have added a Code Block on the homepage here immediately under the “Welcome to the Henley Herald…” headline in the main text, right above the company logos. It is set to ‘Add codeblock to content’

    Please look at the live code using Developer Tools and you will see HTML code:
    <section class="avia_codeblock_section avia_code_block_0" etc etc
    so the Code Block is being added.
    Next HTML line is:
    <div class="avia_codeblock " itemprop="text"> </div>
    but the shortcode, added to the Code Block element,
    [the_ad id="13590"]
    has been stripped out by ALB.

    As a test, if I ‘Escape HTML Code’ then the shortcode is displayed on screen as a line of text – [the_ad id=”13590″] – as you would expect.

    Why is the shortcode being stripped out? And how do I stop this happening?

    #1023191

    Hey zimbo,

    I’m not sure, it might because of the double quotes. Please try this instead:

    [the_ad id='13590']

    Best regards,
    Rikard

    #1023323

    Hi,

    Still doesn’t work with single quotes. I also removed any quotes, i.e. [the_ad id=13590], and it all still gets stripped out.

    (NB. The shortcode inserts an ‘ad’, in this case a company logo. Shortcodes work on posts. I’ve added the shortcode as the first line of text under the main photo on this post, http://dev.henleyherald.com/2017/07/06/lorries-causing-more-problems-on-henley-bridge/, and you can see the image/ad inserted. So I think this problem is to do with ALB.)

    I tried a few things. There’s a PHP version to insert the ad. I don’t think Code Block supports PHP but I wanted to see the outcome.
    Code block altered to
    <?php the_ad(13590); ?>
    renders as HTML:

    <div class="avia_codeblock " itemprop="text"> 
    <!--?php the_ad(13590); ?--> 
    </div>

    and no image/ad displayed.

    If I revert to the shortcode and change the square brackets to round e.g. (the_ad id=”13590″), then that is displayed as text on screen.
    HTML:

    <div class="avia_codeblock " itemprop="text"> 
    (the_ad id="13590") 
    </div>

    Given the shortcode is being stripped out whether with single, double or no quotes on square brackets, but is not stripped out with round brackets, whichever code module processes Code Block is finding the square bracket and stripping out everything between the open and closing square brackets.

    Can you stop this happening?

    #1024254

    Hi,
    I took a look at your page and see where the shortcode should have been, I also tried the shortcode in my localhost, and the shortcode was not stripped out. I then tried other shortcodes, that were installed on my localhost, and they worked correctly
    2018-10-19-201732

    Have you tried disabling your plugins? If that resolves the issue, reactivate each one individually until you find the cause.
    Also, do you have any custom javascript installed in your functions.php, please try removing it temporary to see if that is causing a conflict.

    If this doesn’t help, please include a admin login in the private content area so we can take a closer look.

    Best regards,
    Mike

    #1025046

    I found the problem and all is working now.

    Thanks for your suggestions, they helped me track down the issue (and it wasn’t ALB). Please close this.

    #1025113

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Plugin shortcode being stripped by ALB’ is closed to new replies.