Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #1420257

    Hello,

    I found a bug with Enfold’s inline anchor text popup functionality for Vimeo videos. Enfold STRIPS the last segment of the Vimeo URL which causes a 404 error.

    In the sample below, Enfold will strip ‘1234abcde’ from the URL:
    <a href="https://vimeo.com/1111111111/1234abcde?iframe=true" class="lightbox">Watch Now</a>
    This: https://vimeo.com/1111111111/1234abcde?iframe=true
    Becomes this in the popup iframe source: //player.vimeo.com/video/1111111111?iframe=true
    Causing a 404 error.

    For embedded Vimeo videos (non-popup), Enfold NORMALLY converts the last segment to a URL parameter (?h=), which works:
    This: https://vimeo.com/1111111111/1234abcde
    Becomes this: https://player.vimeo.com/video/1111111111?h=1234abcde&etc...

    LINK Samples in the private content below.

    Please advise.

    Thanks!
    Andy

    • This topic was modified 1 year, 2 months ago by betaphase.
    #1420263

    Hey betaphase,

    Thank you for the inquiry.

    We are not able to check the first link because it requires htaccess authentication. Please provide the info in the private field.

    Best regards,
    Ismael

    #1420274

    It’s there :-) Top line in private content ^^

    #1420365

    Hi,

    Thank you for the info.

    We tried to access the video directly, but the file or video doesn’t exist. Is the URL correct? Please check the private field.

    Best regards,
    Ismael

    #1420609

    Correct – I have it set in Vimeo to only play from our domain. It won’t play directly through the vimeo link. If you view the same exact link in our LIVE Videos page (link in private content below) it works as expected because it’s on our domain.

    • This reply was modified 1 year, 2 months ago by betaphase.
    #1420655

    Hi,

    Sorry for the confusion. Looks like the lightbox script cannot handle custom vimeo URL and returns the following pattern.

    src: '//player.vimeo.com/video/%id%'
    

    We may need to modify the /enfold/js/avia-snippet-lightbox.js file so that the theme can return the correct URL to the lightbox. Please provide the S/FTP details in the private field so that we debug the issue further.

    Best regards,
    Ismael

    #1420664

    Thanks, Ismael. Info in private content below. I am providing an updated test page as well.

    • This reply was modified 1 year, 2 months ago by betaphase.
    #1420674

    Hi,

    Thank you for the update.

    We already modified the /enfold/js/avia-snippet-lightbox.js file but for some reason the script is not updating in the front end. Would you mind checking if the video is now loading correctly within the lightbox?

    This is the modified file: https://pastebin.com/CM5V6iP1

    Best regards,
    Ismael

    #1420711

    OK thanks, I’ll check it out, but it may be a few hours before I’ll get to it. Please stand by!

    #1420725

    Hello Ismael,
    It looks like the changes had no effect. Notes in the private content box below.
    Thanks,
    Andy

    #1420736

    Hi,

    Thank you for following up.

    The modified file is still not loading. The changes are done around line 53, but it is not reflected in the file above.

    vimeo: {
        index: 'vimeo.com/',
        id: function(url) {
    
            // fetch the id
            // https://kriesi.at/support/topic/vimeo-popup-inline-text-anchor-link-does-not-work/
            var m = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})\/(\w{6,11})[?]?.*/), id, params;
            if( !m || !m[5] )
            {
                return null;
            }
    
            var id2 = !m[6] ? "" : "/" + m[6];
            id = m[5];
    
            //fetch params
            params = url.split('?');
            params = params[1];
    
            return id + id2 + '?' + params;
        },
        src: '//player.vimeo.com/video/%id%'
    }
    

    Best regards,
    Ismael

    #1420776

    Hi Ismael,
    It’s loading for me. When I check the script tag’s link (in private content below) I see the line you referencing and it looks identical to what I see in the source except for your // remark above it, but the actual regex match appears to be identical.

    1) yours from above, 2) served on page, 3) downloaded by me via Filezilla to review directly:
    1: var m = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})\/(\w{6,11})[?]?.*/), id, params;
    2: var m = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})\/(\w{6,11})[?]?.*/), id, params;
    3: var m = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})\/(\w{6,11})[?]?.*/), id, params;

    Am I missing something?

    • This reply was modified 1 year, 2 months ago by betaphase.
    #1420808

    Hi,

    Thank you for the update.

    It still loads the old version of the file on our end even when we check the site on incognito mode. Please check the screenshot below.

    Did you test the page again? The regex match should now return 7 results instead of 6 including the second ID in the URL.

    Best regards,
    Ismael

    #1420816

    ***Please move the image link to private***
    I’m seeing your modified code in the Sources tab. And no, it still doesn’t work. Screenshot in private content.

    I added console.log(m) to the source and this is the result:
    [‘https://vimeo.com/771743115/e732122dc0?iframe=true&#8217;, ‘https://&#8217;, undefined, undefined, undefined, ‘771743115’, ‘e732122dc0’, index: 0, input: ‘https://vimeo.com/771743115/e732122dc0?iframe=true&#8217;, groups: undefined]
    0: “https://vimeo.com/771743115/e732122dc0?iframe=true&#8221;
    1: “https://&#8221;
    2: undefined
    3: undefined
    4: undefined
    5: “771743115”
    6: “e732122dc0”
    groups: undefined
    index: 0
    input: “https://vimeo.com/771743115/e732122dc0?iframe=true&#8221;
    length: 7

    Also, I added console.log(id + id2 + ‘?’ + params) just after “params = params[1];” and it’s returning the same exact URL parameter (nothing changed).

    • This reply was modified 1 year, 2 months ago by betaphase.
    • This reply was modified 1 year, 2 months ago by betaphase.
    #1420850

    Hi,

    We’ve modified the code a bit to adjust the URL pattern. Unfortunately, we couldn’t test the changes because the updated file doesn’t get loaded on our end even if we open the page on a different browser. Please try to test the page again on your end.

    if( m[6] ) {
          id = id + '?' + params + "&h=" + m[6];
     }
    

    Best regards,
    Ismael

    #1420868

    Hi Ismael,
    It’s working now*, but you have a non-conditional ? in the code, which means any existing URL parameter such as autoplay=1 gets dumped. Was that intentional?
    Thanks,
    Andy

    *I used a random cache-busting URL param and then a hard reload to get the updated script to load.

    #1421234

    Hi,

    Thank you for the info.

    which means any existing URL parameter such as autoplay=1 gets dumped. Was that intentional?

    The script retrieves the existing query parameters and append it to the transformed URL. Have you tried adding the autoplay parameter manually?

    <a class="lightbox external mfp-iframe lightbox-added" href="https://vimeo.com/*****/*****?iframe=true&autoplay=1" rel="nofollow">Watch Now</a>
    

    Best regards,
    Ismael

    #1421246

    Hi Ismael,
    OK great – it’s not currently working but that’s not on you. I need to adjust my site header permissions policy to get it to work.
    Ismael, thank you so much for seeing this through. Your support is second to none! Will this be included in an upcoming update? I want to be sure the changes don’t get overridden.
    Thanks again,
    Andy

    #1421599

    Hi,

    Glad to know that the changes are working. We will forward this thread to our channel in order to test the changes further. We will probably include it in the next patch. For now, please keep a backup of the modified file.

    Thank you for your patience.

    Best regards,
    Ismael

    #1421613

    Awesome, thank you Ismael. Will do.

    #1421758

    Hi,
    Glad Ismael could help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 21 posts - 1 through 21 (of 21 total)
  • The topic ‘Vimeo Popup: inline text anchor link does not work’ is closed to new replies.