Tagged: inline anchor, popup, video, vimeo
-
AuthorPosts
-
September 25, 2023 at 12:19 pm #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.
September 25, 2023 at 1:03 pm #1420263Hey 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,
IsmaelSeptember 25, 2023 at 1:58 pm #1420274It’s there :-) Top line in private content ^^
September 26, 2023 at 6:33 am #1420365Hi,
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,
IsmaelSeptember 26, 2023 at 10:04 pm #1420609Correct – 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.
September 27, 2023 at 5:44 am #1420655Hi,
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,
IsmaelSeptember 27, 2023 at 8:51 am #1420664Thanks, 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.
September 27, 2023 at 10:03 am #1420674Hi,
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,
IsmaelSeptember 27, 2023 at 4:36 pm #1420711OK thanks, I’ll check it out, but it may be a few hours before I’ll get to it. Please stand by!
September 27, 2023 at 7:22 pm #1420725Hello Ismael,
It looks like the changes had no effect. Notes in the private content box below.
Thanks,
AndySeptember 28, 2023 at 4:33 am #1420736Hi,
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,
IsmaelSeptember 28, 2023 at 9:34 am #1420776Hi 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.
September 28, 2023 at 2:28 pm #1420808Hi,
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,
IsmaelSeptember 28, 2023 at 3:06 pm #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’, ‘https://’, undefined, undefined, undefined, ‘771743115’, ‘e732122dc0’, index: 0, input: ‘https://vimeo.com/771743115/e732122dc0?iframe=true’, groups: undefined]
0: “https://vimeo.com/771743115/e732122dc0?iframe=true”
1: “https://”
2: undefined
3: undefined
4: undefined
5: “771743115”
6: “e732122dc0”
groups: undefined
index: 0
input: “https://vimeo.com/771743115/e732122dc0?iframe=true”
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).September 29, 2023 at 3:12 am #1420850Hi,
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,
IsmaelSeptember 29, 2023 at 8:42 am #1420868Hi 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.
October 3, 2023 at 6:15 am #1421234Hi,
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,
IsmaelOctober 3, 2023 at 8:25 am #1421246Hi 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,
AndyOctober 6, 2023 at 10:35 am #1421599Hi,
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,
IsmaelOctober 6, 2023 at 11:16 am #1421613Awesome, thank you Ismael. Will do.
October 7, 2023 at 5:21 pm #1421758Hi,
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 -
AuthorPosts
- The topic ‘Vimeo Popup: inline text anchor link does not work’ is closed to new replies.