Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1013178

    I have a page that has a table and a code block.

    When I use the Page Content element on another page to nest page 1 into page 2… The code block doesn’t work. I just get: [avia_codeblock_placeholder uid=”0″]

    #1013244

    Hey ahouglum,

    Please open up enfold/config-templatebuilder/avia-shortcodes/codeblock.php (you can use the wordpress code editor – Appearance > Editor) and delete the entire code in the file. Then copy the code from here: https://pastebin.com/raw/6UgNAdLx into the file and save it. This should fix the issue. The next theme update will contain the fix.

    Best regards,
    Peter

    #1013839

    This didn’t work. On the page where the page is included we still don’t have the codeblock processed rather we see

    [avia_codeblock_placeholder uid=”0″]

    Again, to replicate this error:

    1. Make a page with a codeblock that has some javascript or css in it – call it “Page 1”
    2. Make a page (“Page 2”) that used the “Page Content Element” to include Page 1 into Page 2

    You will see the shortcode of the codeblock and the code block isn’t processed.

    #1014671

    Hi,

    Thank you for reporting this. I will have a look into it asap and will come back when we have a solution.

    Best regards,
    Günter

    #1017146

    Hi,

    In file enfold/config-templatebuilder/avia-shortcodes/codeblock.php line 258:

    
    add_filter('avia_builder_precompile', array($this, 'code_block_extraction'), 1, 1);
    

    Replace this line with:

    
    add_filter('avia_builder_precompile', array($this, 'code_block_extraction'), 10, 1);
    

    This should fix the problem. I added this fix for the next update.

    Best regards,
    Günter

    #1018523

    Great, this from Günter works! One question, how can i get his into the functions.php so that it doesn’t get overrided if the theme gets updated? What do i have to exactly put into there?

    Thanks for helping me out!

    #1018959

    Hi,

    Glad we could help you.

    The fix is already merged for the next update 4.5. So you need not do anything when you update to this version.

    Adding that fix to the functions.php is not possible. If you have a child theme you can copy the modified file to the child theme shortcodes folder.

    If you need further assistance feel free to open a new topic – I will close this one for now.

    Enjoy the theme and have a nice day.

    Best regards,
    Günter

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Code Block not working with Page Content’ is closed to new replies.