Viewing 30 posts - 1 through 30 (of 35 total)
  • Author
    Posts
  • #1074957

    Order of solution events
    1- RSS content was missing were posts used ALB – you fixed it.
    2- The Events Calendar would not render ALB shortcode button – you fixed it.
    3- The solution for #2 broke your solution for #1.

    Details
    For ticket https://kriesi.at/support/topic/avia-layout-builder-not-working-in-the-events-calendar/ you provided a solution to fix shortcodes not rendering when using The Events Calendar.

    However, a previous fix you provided for ticket https://kriesi.at/support/topic/rss-missing-content-after-title-if-using-alb-in-a-post/ was then overwritten where you omitted a line of code replaced in that solution. Thus all custom post type RSS feeds where no longer displaying main body content again.

    Once I replaced this line of code in post https://kriesi.at/support/topic/rss-missing-content-after-title-if-using-alb-in-a-post/#post-1063670 / #Gunter

    if( defined( 'REST_REQUEST' ) && REST_REQUEST && ( $post instanceof WP_Post ) )
    With this line of code, all RSS worked well again.

    if( $post instanceof WP_Post )

    Please include that code replacement in your github file download here https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_4_5_3/shortcode-template.class.php so others benefit as well.

    HOWEVER, this FIX causes the ALB shortcode button to disappear again in the Events Calendar as seen here https://wels.net/event/simply-marriage-canton/ which you just provided a solution for.

    [av_button label='Register' link='manually,https://gf.wels.net/simply-marriage-mar-29-31-2019/' link_target='_blank' size='large' position='left' label_display='' icon_select='no' icon='ue800' font='entypo-fontello' color='theme-color' custom_bg='#444444' custom_font='#ffffff' av_uid='' admin_preview_bg='']

    Summary
    So – there is a conflict between the two solutions. Please provide happiness for both RSS where posts use ALB and for The Event Calendar where ALB shortcode is also used.

    • This topic was modified 1 year, 4 months ago by  welswebmaster.
    #1076123

    Adding MORE to this. Same issue with other content types (WP Download Manager posts do not recognize ALB shortcodes).

    #1076765

    Hi,

    Have you consider contact the plugin developers?

    Best regards,
    Basilis

    #1076819

    Yes. I have 3 open ALB shortcode issues where all were working prior to the last Enfold update and now across several web sites I have an issue where custom post types no longer render Enfold ALB shortcode.
    Ref; https://kriesi.at/support/topic/video-alb-shortcode-for-vimeo-displays-preview-only/

    #1078712

    Hi,

    Sorry for the problems you have.

    There is a bug with shortcodes in 4.5.4 that will be fixed in 4.5.5 which is very close to release.
    I did not follow the whole thread but kindly wait for the release and then check again if your problem is fixed.

    Thank you for your patience.

    Best regards,
    Günter

    #1080889
    This reply has been marked as private.
    #1082774
    This reply has been marked as private.
    #1082882

    Hi,

    I have asked Guenter to look into the ticket again.

    Best regards,
    Basilis

    #1083136

    Hi!

    Sorry for the late reply – but I’ve been tagged for this today.

    As far as I understand your last reply, the problem is occuring with feeds not processing the ALB content.

    I will have a look into it ASAP.

    Cheers!
    Günter

    #1083540

    Hi
    I am also eager to get this resolved since my alb generated posts don’t work in my mailchimp campaigns any more.

    Cheers

    #1083627
    This reply has been marked as private.
    #1083711

    Hi,

    Enfold 4.5.5

    In file enfold\config-templatebuilder\avia-template-builder\php\shortcode-template.class.php line 343:

    
    if( ! is_admin() && ! Avia_Builder()->wp_head_done && ( ! ( defined( 'REST_REQUEST' ) && true === REST_REQUEST ) ) )
    

    Please replace with:

    
    if( ! is_admin() && ! Avia_Builder()->wp_head_done && ( ! ( defined( 'REST_REQUEST' ) && true === REST_REQUEST ) ) && ! is_feed() && ! is_comment_feed() )
    

    This should fix the problem with the feeds.

    Best regards,
    Günter

    #1083751

    Hey Gunter,
    So far so good! Hooray! I can see main body content in the feed which is great!

    Now I’m just waiting on the mobile app developer to refresh his code to be sure it works there as well. Then I’ll close out this ticket.

    I replaced your code in the Enfold folder, but am wondering if it should reside in the Enfold Child folder instead. What do you think? Or, will this be pushed out in the next Enfold version update?

    Thanks for your efforts.

    #1083877

    Günter
    Wels.app still unable to load ALB main body content. Example is Through My Bible.
    Bothe web version and mobile behave the same. I’ve de/re-activated the wp graphql plugin and emptied server cache and still the same.
    Something still isn’t right. Please help

    It is the same as before. The GraphQL query returns the \n\n\n\n\n\n\n\n
    See query and output here: https://wels.net/wp-content/uploads/2019/03/graphqlOutput.jpg

    This displays

    <h6 style="color: #339900; text-transform: uppercase;" align="center"><img style="padding-bottom: 10px;" src="https://wels.net/wp-content/uploads/2014/04/Audio-Icon.png" alt="" width="48" /><br />
    Through My Bible – March 28</h6>
    <p>Bible reading based on Matthew 19:1-22 (NIV84)<br />

    This doesn’t display

    <!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->
    <audio class="wp-audio-shortcode" id="audio-9632-1" preload="none" style="width: 100%;" controls="controls"><source type="audio/mpeg" src="https://wels2.blob.core.windows.net/through-my-bible/02-0328db.mp3?_=1" /><a href="https://wels2.blob.core.windows.net/through-my-bible/02-0328db.mp3">https://wels2.blob.core.windows.net/through-my-bible/02-0328db.mp3</a></audio><br />
    <em>See series:</em> <a href="http://www.wels.net/serving-you/bible/">Through My Bible</a></p>
    </div>
    <h4>Matthew 19</h4>
    <h5>Divorce</h5>
    <p><sup id="en-NIV-23762">1</sup>When Jesus had finished saying these things, he left Galilee and went into the region of Judea to the other side of the Jordan. <sup id="en-NIV-23763">2</sup>Large crowds followed him, and he healed them there.</p>
    <p><sup id="en-NIV-23764">3</sup>Some Pharisees came to him to test him. They asked, “Is it lawful for a man to divorce his wife for any and every reason?”</p>
    <p><sup id="en-NIV-23765">4</sup>“Haven’t you read,” he replied, “that at the beginning the Creator ‘made them male and female,’<sup>[<a title="See footnote a" href="#fen-NIV-23765a">a</a>]</sup> <sup id="en-NIV-23766">5</sup>and said, ‘For this reason a man will leave his father and mother and be united to his wife, and the two will become one flesh’<sup>[<a title="See footnote b" href="#fen-NIV-23766b">b</a>]</sup>? <sup id="en-NIV-23767">6</sup>So they are no longer two, but one. Therefore what God has joined together, let man not separate.”</p>
    <p><sup id="en-NIV-23768">7</sup>“Why then,” they asked, “did Moses command that a man give his wife a certificate of divorce and send her away?”</p>
    <p><sup id="en-NIV-23769">8</sup>Jesus replied, “Moses permitted you to divorce your wives because your hearts were hard. But it was not this way from the beginning. <sup id="en-NIV-23770">9</sup>I tell you that anyone who divorces his wife, except for marital unfaithfulness, and marries another woman commits adultery.”</p>
    <p><sup id="en-NIV-23771">10</sup>The disciples said to him, “If this is the situation between a husband and wife, it is better not to marry.”</p>
    <p><sup id="en-NIV-23772">11</sup>Jesus replied, “Not everyone can accept this word, but only those to whom it has been given. <sup id="en-NIV-23773">12</sup>For some are eunuchs because they were born that way; others were made that way by men; and others have renounced marriage<sup>[<a title="See footnote c" href="#fen-NIV-23773c">c</a>]</sup>because of the kingdom of heaven. The one who can accept this should accept it.”</p>
    <h5>The Little Children and Jesus</h5>
    <p><sup id="en-NIV-23774">13</sup>Then little children were brought to Jesus for him to place his hands on them and pray for them. But the disciples rebuked those who brought them.</p>
    <p><sup id="en-NIV-23775">14</sup>Jesus said, “Let the little children come to me, and do not hinder them, for the kingdom of heaven belongs to such as these.” <sup id="en-NIV-23776">15</sup>When he had placed his hands on them, he went on from there.</p>
    <h5>The Rich Young Man</h5>
    <p><sup id="en-NIV-23777">16</sup>Now a man came up to Jesus and asked, “Teacher, what good thing must I do to get eternal life?”</p>
    <p><sup id="en-NIV-23778">17</sup>“Why do you ask me about what is good?” Jesus replied. “There is only One who is good. If you want to enter life, obey the commandments.”</p>
    <p><sup id="en-NIV-23779">18</sup>“Which ones?” the man inquired.</p>
    <p>Jesus replied, ” ‘Do not murder, do not commit adultery, do not steal, do not give false testimony, <sup id="en-NIV-23780">19</sup>honor your father and mother,’<sup>[<a title="See footnote d" href="#fen-NIV-23780d">d</a>]</sup> and ‘love your neighbor as yourself.’<sup>[<a title="See footnote e" href="#fen-NIV-23780e">e</a>]</sup>”</p>
    <p><sup id="en-NIV-23781">20</sup>“All these I have kept,” the young man said. “What do I still lack?”</p>
    <p><sup id="en-NIV-23782">21</sup>Jesus answered, “If you want to be perfect, go, sell your possessions and give to the poor, and you will have treasure in heaven. Then come, follow me.”</p>
    <p><sup id="en-NIV-23783">22</sup>When the young man heard this, he went away sad, because he had great wealth.</p>
    </div></section>
    <div style='height:10px' class='hr hr-invisible  '><span class='hr-inner ' ><span class='hr-inner-style'></span></span></div>
    <section class="av_textblock_section "  itemscope="itemscope" itemtype="https://schema.org/CreativeWork" ><div class='avia_textblock  '   itemprop="text" ><p><strong>Footnotes:</strong></p>
    <ol type="a">
    <li id="fen-NIV-23765a"><a title="Go to Matthew 19:4" href="#en-NIV-23765">Matthew 19:4</a> Gen. 1:27</li>
    <li id="fen-NIV-23766b"><a title="Go to Matthew 19:5" href="#en-NIV-23766">Matthew 19:5</a> Gen. 2:24</li>
    <li id="fen-NIV-23773c"><a title="Go to Matthew 19:12" href="#en-NIV-23773">Matthew 19:12</a> Or have made themselves eunuchs</li>
    <li id="fen-NIV-23780d"><a title="Go to Matthew 19:19" href="#en-NIV-23780">Matthew 19:19</a> Exodus 20:1216; Deut. 5:16-20</li>
    <li id="fen-NIV-23780e"><a title="Go to Matthew 19:19" href="#en-NIV-23780">Matthew 19:19</a> Lev. 19:18</li>
    </ol>
    </div></section>
    <div  class='hr hr-default  '><span class='hr-inner ' ><span class='hr-inner-style'></span></span></div>
    <section class="av_textblock_section "  itemscope="itemscope" itemtype="https://schema.org/CreativeWork" ><div class='avia_textblock  '   itemprop="text" ><p><em>Scripture taken from the HOLY BIBLE, NEW INTERNATIONAL VERSION®. NIV®. Copyright©1973, 1978, 1984 by International Bible Society. Used by permission of Zondervan. All rights reserved.</em></p>
    
    </div></section>
    <div style='height:50px' class='hr hr-invisible  '><span class='hr-inner ' ><span class='hr-inner-style'></span></span></div>
    <div class='av-social-sharing-box  '><div class='av-share-box'><h5 class='av-share-link-description av-no-toc'>Share this entry</h5><ul class='av-share-box-list noLightbox'><li class='av-share-link av-social-link-facebook' ><a target='_blank' href='https://www.facebook.com/sharer.php?u=https://wels.net/bible3/02-0328db/&t=Through%20My%20Bible%20Yr%202%20%E2%80%93%20March%2028' aria-hidden='true' data-av_icon='' data-av_iconfont='entypo-fontello' title='' data-avia-related-tooltip='Share on Facebook'><span class='avia_hidden_link_text'>Share on Facebook</span></a></li><li class='av-share-link av-social-link-twitter' ><a target='_blank' href='https://twitter.com/share?text=Through%20My%20Bible%20Yr%202%20%E2%80%93%20March%2028&url=https://wels.net/?p=9632' aria-hidden='true' data-av_icon='' data-av_iconfont='entypo-fontello' title='' data-avia-related-tooltip='Share on Twitter'><span class='avia_hidden_link_text'>Share on Twitter</span></a></li><li class='av-share-link av-social-link-gplus' ><a target='_blank' href='https://plus.google.com/share?url=https://wels.net/bible3/02-0328db/' aria-hidden='true' data-av_icon='' data-av_iconfont='entypo-fontello' title='' data-avia-related-tooltip='Share on Google+'><span class='avia_hidden_link_text'>Share on Google+</span></a></li><li class='av-share-link av-social-link-mail' ><a  href='mailto:?subject=Through%20My%20Bible%20Yr%202%20%E2%80%93%20March%2028&body=https://wels.net/bible3/02-0328db/' aria-hidden='true' data-av_icon='' data-av_iconfont='entypo-fontello' title='' data-avia-related-tooltip='Share by Mail'><span class='avia_hidden_link_text'>Share by Mail</span></a></li></ul></div></div>
    ]]></content:encoded>
    										</item>
    		
    	</channel>
    </rss>
    • This reply was modified 1 year, 3 months ago by  welswebmaster. Reason: Added code
    • This reply was modified 1 year, 3 months ago by  welswebmaster. Reason: edit code
    • This reply was modified 1 year, 3 months ago by  welswebmaster.
    • This reply was modified 1 year, 3 months ago by  welswebmaster.
    #1084602
    This reply has been marked as private.
    #1085463

    Hi,

    Sorry for the late reply – but I had influenza the last days and could not work.

    Can you check with the GraphQL developpers how we can identify their query in WP backend (like we can for a feed or REST API call)?

    Then we can add a filter for that.

    As a temporary fix if you do not use a plugin (like All In one SEO) that calls the shortcodes in header you can try to replace:

    
    if( ! is_admin() && ! Avia_Builder()->wp_head_done && ( ! ( defined( 'REST_REQUEST' ) && true === REST_REQUEST ) ) && ! is_feed() && ! is_comment_feed() )
    

    with

    
    if( false )
    

    Best regards,
    Günter

    #1085596

    Gunter,
    Hope you are feeling better! Thanks for the quick fix. That did the trick. Now for a long term solution. Perhaps this is what may help. If I’m not giving you the info you need, the next step would be to contact the GraphQL plugin author here:
    Plugin: https://github.com/dfmedia/wp-graphql
    Authors: https://github.com/orgs/dfmedia/people

    INFO I CAN PROVIDE TO YOU


    Code to define content types for GraphQL:

    /**
     * function to define content types for GraphQL for use on wels.app mobile app. One for each post type.
     */
    
    add_filter( 'register_post_type_args', function( $args, $post_type ) {
    
    	if ( 'bible3' === $post_type ) {
    		$args['show_in_graphql'] = true;
    		$args['graphql_single_name'] = 'Bible3';
    		$args['graphql_plural_name'] = 'Bible3s';
    	}
    
    	return $args;
    
    }, 10, 2 );
    

    https://docs.wpgraphql.com/getting-started/custom-fields-and-meta

    The feed we are using is: https://wels.net/category/bible3/feed/

    The query looks like this:

    {
      Bible3s(first: 1) {
        edges {
          node {
            title
            Bible3Id
            dateGmt
            content
            link
            excerpt
            featuredImage {
              guid
            }
          }
        }
      }
    }
    
    #1086007

    Hi,

    Thanks for the info.

    To find a final solution: Could you try to use the following line and check if this works:

    
    if( ! is_admin() && ! Avia_Builder()->wp_head_done && ( ! ( defined( 'REST_REQUEST' ) && true === REST_REQUEST ) ) && ! is_feed() && ! is_comment_feed() && ( ! ( defined( 'GRAPHQL_REQUEST' ) && true === GRAPHQL_REQUEST ) ) )
    

    Best regards,
    Günter

    #1086076

    Bingo! That worked Günter. Thank you. Is this something you will provide in the next Enfold update or is should I place a copy of the file in my Enfold child theme?

    I appreciate all of your efforts, Günter.

    #1086107

    Hi,

    Thanks for the feedback.

    I added a filter for your problem (and some more improvements) for the next update.

    Meanwhile:

    Please replace enfold\config-templatebuilder\avia-template-builder\php\shortcode-template.class.php with

    https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_4_5_5/AIO_SEO/shortcode-template.class.php

    enfold\config-templatebuilder\avia-template-builder\php\template-builder.class.php with
    https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_4_5_5/AIO_SEO/template-builder.class.php

    In functions.php (child theme or parent theme) add the following code:

    https://github.com/KriesiMedia/enfold-library/blob/master/actions%20and%20filters/Request%20Handling/avf_shortcode_no_header_request.php

    After the next update make sure that filter avf_shortcode_no_header_request is included in enfold\config-templatebuilder\avia-template-builder\php\shortcode-template.class.php – then you need not do any further steps.

    Please make a backup of the files for a fallback.

    Best regards,
    Günter

    #1093667

    Günter,
    Hello. I’m ready to apply the 4.5.6 Enfold update. However, I’m confused as to what you said “After the next update make sure that filter avf_shortcode_no_header_request is included in enfold\config-templatebuilder\avia-template-builder\php\shortcode-template.class.php – then you need not do any further steps.”

    Can you clarify that for me? What steps must I take?
    In kindness,
    j

    #1093699

    Hi,

    I was not sure if Kriesi merges the pull request for that (sometimes he skips some pulls). But the fix is part of 4.5.6.

    So you should be fine to update.
    But keep a backup of your current version in case you need a fallback.

    And make sure you have the code in functions.php (child theme or parent theme):

    https://github.com/KriesiMedia/enfold-library/blob/master/actions%20and%20filters/Request%20Handling/avf_shortcode_no_header_request.php

    Best regards,
    Günter

    #1094000

    Günter,
    I updated and placed the code you provided in Enfold Child functions.php with bad results where the graphql query returned NO results. Next, I tried adding it instead in the parent fuctions.php with same poor result. I restored my site back.
    When just updating Enfold – the graphql query returns all but the main content body. Could you look again at the code you provided to be sure that is what we need?
    Thanks,
    j

    #1094035

    Hi,

    Strange, the code should work.

    In file enfold\config-templatebuilder\avia-template-builder\php\shortcode-template.class.php line 384

    
    if( ! is_admin() && ! Avia_Builder()->wp_head_done && ! $no_header_request )
    

    can you try to replace it with

    
    if( false )
    

    and check if this returns a result ?

    Best regards,
    Günter

    #1094062

    Günter,
    I tried your suggestion on our staging server to replace with if( false) and it worked well.
    j

    #1094324

    Hi,

    Next step please replace if( false ) with the original content:

    
    if( ! is_admin() && ! Avia_Builder()->wp_head_done && ! $no_header_request )
    

    Remove any changes you made to functions.php of parent theme and child theme.

    In functions.php of your child theme add:

    
    function custom_shortcode_no_header_request( $no_header_request, $class, $atts, $content, $shortcodename, $fake )
    {
    	if( ( defined( 'GRAPHQL_REQUEST' ) && true === GRAPHQL_REQUEST ) )
    	{
    		$no_header_request = true;
    	}
    	
    	return true;  
    }
    add_filter( 'avf_shortcode_no_header_request', 'custom_shortcode_no_header_request', 10, 6 );
    

    Clear server and browser cache and check.
    If it works then the filter is called.

    Then replace this code with:

    
    function custom_shortcode_no_header_request( $no_header_request, $class, $atts, $content, $shortcodename, $fake )
    {
    	if( ( defined( 'GRAPHQL_REQUEST' ) && true === GRAPHQL_REQUEST ) )
    	{
    		$no_header_request = true;
    	}
    	
    	return $no_header_request;
    }
    add_filter( 'avf_shortcode_no_header_request', 'custom_shortcode_no_header_request', 10, 6 );
    

    Clear server and browser cache and check.

    Best regards,
    Günter

    • This reply was modified 1 year, 2 months ago by  Günter. Reason: error in php code
    #1094405

    Günter,
    I tried as you suggested (still in place) and it returns a blank result for the GraphQL query.
    The site doesn’t come up either now. Instead it gives this error:
    Fatal error: Cannot use $this as parameter in /nas/content/staging/wels/wp-content/themes/enfold-child/functions.php on line 6

    Shouldn’t that statement start with an “add filter” type line? Only guessing, I’m not on your level.

    #1094416

    Hi,

    Could you give me access to your staging site so I can check the files and add the filter?

    The file enfold-child/functions.php seems to be broken – because the code I provided above has no $this.

    Best regards,
    Günter

    #1094418
    This reply has been marked as private.
    #1094550
    This reply has been marked as private.
Viewing 30 posts - 1 through 30 (of 35 total)

You must be logged in to reply to this topic.