• Resolved seccyeth

    (@seccyeth)


    Hi,
    I’ve had L&L running properly on my website for some time now. I use L&L template with Elementor, in Elementor templates, to dynamically implement correct shortcode on pages (with ACF).
    Today, some of my L&L template stopped showing on the frontend. The strange thing is that they show and work well when I’m editing the page with Elementor, but not on the frontend.
    Some other L&L Template of my website are still working, both in Elementor Editor and on the frontend.
    So I have no idea why some L&L template stopped working (on the frontend only), and some other not. What’s especially strange is that those work while editing.

    Here are a few things I checked :
    – I tried linking to the L&L template by using another block than L&L template, for example the HTML block with L&L template dynamically linked. The result was the same as described above
    – I tried regenerating data in Elementor
    – I tried switching to Twenty-twenty one

    Also, here is an example of shortcode that is not currently showing on the frontend (but that did before, and that is still showing while editing with Elementor) :

    <Loop acf_relationship=lien_cours_classe_zoom> 
    <a href="{Field acf_url=lien_google_doc}">
    <div class="googledocbtn">
    <i class="fas fa-align-justify"></i>
    <p>Vers Google Doc</p>  
    </div>
    </a>
    </Loop>
    • This topic was modified 2 years, 6 months ago by seccyeth.
    • This topic was modified 2 years, 6 months ago by seccyeth.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    Thank you for reporting the issue – we’re looking into it. The detailed description is helpful, especially the code snippet.

    That’s weird that it works in the Elementor editor, but not on the frontend – and that some other templates are working. I’m guessing it’s related to a plugin update, either of Elementor, L&L, or both.

    OK, I’ll get back to you when we figure it out.

    Thread Starter seccyeth

    (@seccyeth)

    Hi Eliot,

    Thank you for yoour answer and for investigating the issue. As do some further testing today, as the issue appeared in a specific environment : course pages in Masterstudy. I’m going to determine if this matters in the appearance of the issue, as the other working snippets are on normal type of page.

    • if the same snippet work when implemented on normal page, then we’ll know it’s a masterstudy/L&L issue
    • if the issue appears also on a normal page with the same snippet, then it’s probably a problem with my snippet and Elementor
    • As for reproducing the issue, here is the idea behind the snippet, just in case :
      a link to a google doc is in an ACF field on some other page (the page is an e-room plugin page, for zoom reunions, but I don’t think it matters), with relevant info about the course. This snippet is in an Elementor template. Upon creating a course for a user, I just select, with an ACF relationship field, the page with the link, so that it feeds all relevant info about the user’s course directly in the Elementor template page.

      Here is another example of snippet with similar use that doesn’t work currently:

      <Loop acf_relationship=lien_cours_classe_zoom> 
          <Shortcode>
        <Field acf_textarea=shortcode_classe_zoom />
            </Shortcode>
        </Loop>

      Also, I’m including my system info, in case it helps:

      == Server Environment ==
      	Operating System: Linux
      	Software: Apache
      	MySQL version: MariaDB Server v10.3.34
      	PHP Version: 7.4.29
      	PHP Memory Limit: 512M
      	PHP Max Input Vars: 250000
      	PHP Max Post Size: 512M
      	GD Installed: Yes
      	ZIP Installed: Yes
      	Write Permissions: All right
      	Elementor Library: Connected
      
      == WordPress Environment ==
      	Version: 5.9.3
      	Site URL: https://www.francetude.com
      	Home URL: https://www.francetude.com
      	WP Multisite: No
      	Max Upload Size: 512 Mo
      	Memory limit: 512M
      	Max Memory limit: 512M
      	Permalink Structure: /%postname%/
      	Language: fr-FR
      	Timezone: Europe/Paris
      	Admin Email: [email protected]
      	Debug Mode: Inactive
      
      == Theme ==
      	Name: Master Study Child
      	Version: 2.1.789
      	Author: StylemixThemes
      	Child Theme: Yes
      	Parent Theme Name: MasterStudy
      	Parent Theme Version: 4.5.0
      	Parent Theme Author: StylemixThemes

      One last thing: I strongly support your theory about Elementor’s big update being responsible of the issue, as this was, I believe, some major changes, and the only related event that happened between when my code was working and when it stopped doing so.

      Please keep me updated,

      Best regards,

      Adrien

    Thread Starter seccyeth

    (@seccyeth)

    Hi again,

    Some updates after testing. Is seems to be an issue related to Masterstudy’s way of mounting its’ course pages. I tried replicating the issue on a normal page, but everything worked just fine here: with the same snippets and same elementor template, the L&L templates were displayed just fine on the page.

    So the issue remains on the masterstudy’s lesson page. There hasn’t been any change from them lately, so I guess it’s a Masterstudy/Elementor/L&L combination issue.

    Actually, it is not every L&L template that doesn’t work in this case, but only the <Loop> part that get “erased” on the course page.
    For example, I tried to use this snippet on the course page:
    <div><p><b>Connaissez-vous ces notions ? </b> Elles sont nécessaires pour bien comprendre la règle.</p><div class="prer-container"><If loop acf_relationship=prerequis><Loop acf_relationship=prerequis><a href="{Field url}"><div class="prer_disp"><div class="prer_title"><Field title /></div><div class="prer_img_block"><Field class="prer_img" image /></div></div></a></Loop><Else /><div style="display:flex; align-items: center;"><i class="fas fa-check-square" style="color:#457992; font-size:30px;"></i><p style="font-style:italic; font-size:20px; color:#495057; padding-left:5px; margin-bottom:0px;">Pour le moment, il n'y a pas de prérequis pour cette le?on.</p></div></If></div></div>
    This works perfectly fine on other Custom Post Type pages that I have on the website. But on the course page, even though I created a relationship, it only displays the <Else> part. In the Elementor Editor, I can see the <If> part properly displayed.
    So in the nutshell, the core of the issue is with the <Loop> rendering of L&L on those specific type of page that Masterstudy uses for its lesson. I think their pages are mounted with Vue.js, but my knowledge being very limited, I have no idea what that means (sorry)..!

    Hope that helps. Please keep me updated ??

    Regards,

    Adrien

    • This reply was modified 2 years, 6 months ago by seccyeth.
    Plugin Author Tangible

    (@tangibleinc)

    Hi @seccyeth, my apologies for the delayed response here. Your testing seems to indicate two things.

    First, you mention that “it only displays the <Else> part. In the Elementor Editor, I can see the <If> part properly displayed.” The way L&L works is that if your If statement is true, the portion of your markup immediately following the opening <If ...> tag (i.e. before the <Else /> tag) should be displayed. If your If statement is false, the portion of your markup after the <Else /> tag should be displayed. The fact that the output of your L&L template is “the <Else> part” is expected if your conditional statement is false, which suggests that this isn’t an L&L issue but a syntax/logic issue.

    Second, the fact that some of the behaviour you’re noticing only seems to occur on Masterstudy pages suggests that their plugin might be affecting the default WP loop differently than any other custom post types. I wasn’t able to identify any issues with Masterstudy based on my limited testing with it, but the fact their post type works differently than any others you tested with makes this seem like an issue that would need to be taken up with their support. We can’t control how other plugins change the context of the default loop on their posts.

    I know you’ve already reached out on our forum for help regarding some other L&L markup troubleshooting, but I thought I’d note that our L&L community tends to be able to provide faster support over on our forum at discourse.tangible.one, so we recommend that people post their support requests there instead for faster responses.

    Best of luck with this!

    – Ben @ Team Tangible

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘L&L Template not showing with Elementor’ is closed to new replies.