adrian Posted November 20, 2017 Share Posted November 20, 2017 4 minutes ago, artaylor said: @strandoo Not sure if this would help, but I notice you are using the short form url on the second example (that does not work) of https://youtu.be/LBY12usmYAA, have you tried using the actual youtube url (which I cannot link to here because it embeds the video)? I haven't tested, but youtube.be should work: https://github.com/ryancramerdesign/TextformatterVideoEmbed/blob/7c8e4ddce22dc4970c17d0f63ce3d53679e7e3a8/TextformatterVideoEmbed.module#L163 Here's it working as expected:https://regex101.com/r/aEcLl2/1 1 Link to comment Share on other sites More sharing options...
artaylor Posted November 20, 2017 Share Posted November 20, 2017 @adrian You are likely correct. I did not do any real testing. However, as an interesting note, when I posted my previous message you can see the url to youtu.be as a url, however, the link to the video using youtube.com actually embedded the video. So, I have to assume that the forum is using the plugin and it did not show the shortened version. Link to comment Share on other sites More sharing options...
adrian Posted November 20, 2017 Share Posted November 20, 2017 Just now, artaylor said: So, I have to assume that the forum is using the plugin This forum is just an IPBoard forum - no PW code or use of this module. Good thought though Link to comment Share on other sites More sharing options...
strandoo Posted November 20, 2017 Share Posted November 20, 2017 @artaylor I've tried different URLs with similar results. I just tested the embed URL and that didn't work. And as @adrian pointed out, but short form does work (on the 'good' site). I checked other text formatters to make sure they didn't conflict. One thing I just thought of is that they are served from different hosting companies (StableHost vs HostingUK) so differing server configs could be in play... Link to comment Share on other sites More sharing options...
artaylor Posted November 20, 2017 Share Posted November 20, 2017 LOL. Well there you go. Assumption once again leading to mistakes... Link to comment Share on other sites More sharing options...
Robin S Posted November 20, 2017 Share Posted November 20, 2017 2 hours ago, strandoo said: The other only works if it's a Vimeo video; YouTube URLs slow the page loading then only displays the URL. The strange thing is though is that you have working embedded YouTube videos on that site here: http://www.burstoncrown.com/events/easy-thursdays/jess-morgan-and-kitty-macfarlane/ Perhaps the host is running mod_security or similar and that is being triggered by particular patterns in some video URLs? Link to comment Share on other sites More sharing options...
PWaddict Posted November 20, 2017 Share Posted November 20, 2017 @strandoo Add the following on top of your .htaccess file. Perhaps this will fix the problem. <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> 1 Link to comment Share on other sites More sharing options...
netcarver Posted November 20, 2017 Share Posted November 20, 2017 3 hours ago, strandoo said: Hi all. This has been driving me nuts: I've used this module previously and it worked perfectly. I've got it on 2 sites, but music-related. One works normally; I use the textformatter on the body text and videos display fine. The other only works if it's a Vimeo video; YouTube URLs slow the page loading then only displays the URL. I've tried a number of tests and different URLs and I can't figure this out. Both sites are not new and I'm pretty sure that it used to work where now it doesn't. Here are two samples (they are past gigs, so I can play around with them without messing up the live sites): Works: https://waveneyvalleyfolkcollective.co.uk/events/kirsty-merryn-jack-harris/ Doesn't Work: http://www.burstoncrown.com/events/sunday-sessions/falling-from-trees/ Any suggestions? I've seen something similar to this on a client site when this textformatter was added to a CKEditor'd textarea field. It turned out that I was pasting in links to the video, not just the plaintext of the video address and this was causing the formatter to fail to match and then embed it. If you look at the source of the page where the video doesn't work, look to see if the text you pasted is actually a link, and if so, simply break the link, save the page and revisit it on the front-end. I hope that is what's happening here - but there's no guarantee it is. Link to comment Share on other sites More sharing options...
matjazp Posted November 21, 2017 Share Posted November 21, 2017 I tried inserting this link and it works here. There is something that makes text formater to fail and then just plain text is rendered. As netcarver pointed, remove the link to video altogether, save the page and the insert it again. Also, the site sometimes takes a long time to load at all, but its unrelated I guess. Link to comment Share on other sites More sharing options...
strandoo Posted November 21, 2017 Share Posted November 21, 2017 10 hours ago, Robin S said: The strange thing is though is that you have working embedded YouTube videos on that site here: http://www.burstoncrown.com/events/easy-thursdays/jess-morgan-and-kitty-macfarlane/ Ah, I should have mentioned that. Since this is alive site, and that's an upcoming gig, I needed a workaround. I'm not using the module there, just a special field that inserts the YouTube URL in an iframe. I prefer the responsiveness of Ryan's module. @netcarver I've run into that problem in the past, so I've checked. All clean text. @PWaddict That sound promising. I've had problems with mod_security before. I'll try it out a bit later today. Last night I created a local version of the site and the videos loaded fine, leading me to think it's a hosting/php/config thing. Link to comment Share on other sites More sharing options...
PWaddict Posted November 21, 2017 Share Posted November 21, 2017 2 minutes ago, strandoo said: @PWaddict That sound promising. I've had problems with mod_security before. I'll try it out a bit later today. Last night I created a local version of the site and the videos loaded fine, leading me to think it's a hosting/php/config thing. Then I'm 99.9% sure that the mod_security is causing the problem. The suggested fix will do the job. Link to comment Share on other sites More sharing options...
strandoo Posted November 21, 2017 Share Posted November 21, 2017 So, as PWaddict predicted, turning off mod_security did the trick, but I couldn't do it with the htaccess rule. I tried that first, but it didn't do anything, so I disabled it in the Plesk control panel. (It's under 'Web Application Firewall..'; I've set it to 'detection only' rather than 'on' or 'off'. If anyone knows of a downside to this or if I can target something more directly, please let me know). But the video now appears as it should. Thanks all. 1 Link to comment Share on other sites More sharing options...
strandoo Posted December 2, 2017 Share Posted December 2, 2017 Update: a couple of days later, the problem returned. I contacted support for this account and after a bit of back and forth, I gave up. I took a look at the hosting Plesk cp and saw that mod_sec is turned off. The PHP version was 5.3 (I'm pretty sure I had it at 5.6) so I changed it back to 5.6. I'm basically back where I started. Maybe I'll move the account to my reseller hosting. Everything works fine there... Link to comment Share on other sites More sharing options...
flydev Posted December 5, 2017 Share Posted December 5, 2017 Originally requested by a client, I just wanted to share this fork of this module which now support Facebook video : https://github.com/flydev-fr/TextformatterVideoEmbed 4 1 Link to comment Share on other sites More sharing options...
SamC Posted December 5, 2017 Share Posted December 5, 2017 57 minutes ago, flydev said: Originally requested by a client, I just wanted to share this fork of this module which now support Facebook video : https://github.com/flydev-fr/TextformatterVideoEmbed Thanks for sharing, gotta try this. 1 Link to comment Share on other sites More sharing options...
mel47 Posted March 21, 2018 Share Posted March 21, 2018 Hi How do I center the video? If it's embed in <p>link<p>, it's display. But if we do <p style="text-align:center;">link</p>, the video doesn't display. I just have 2 formatters, this one and Hanna. Thanks Link to comment Share on other sites More sharing options...
mel47 Posted March 29, 2018 Share Posted March 29, 2018 Hello, Found a solution via css, but I don't know how to apply to it since this iframe have no id neither class. (I have others iframe which I doesn't want to center). So how I can apply an id or class to the video iframe? Thanks Link to comment Share on other sites More sharing options...
Robin S Posted March 29, 2018 Share Posted March 29, 2018 3 hours ago, mel47 said: I don't know how to apply to it since this iframe have no id neither class I prefer the responsive embed method... ...and this applies a class to a containing div element. 1 Link to comment Share on other sites More sharing options...
mel47 Posted March 31, 2018 Share Posted March 31, 2018 Thanks, but responsive tooks too much space in desktop version, even if it's was fine in mobile version. I found a way to specify some CSS rules. Thanks. Link to comment Share on other sites More sharing options...
PWaddict Posted April 4, 2018 Share Posted April 4, 2018 I've sent a PR to @ryan that adds support for lazyload plugins. Link to comment Share on other sites More sharing options...
tires Posted May 15, 2018 Share Posted May 15, 2018 Is there a way to use the youtube nocookie url like https://www.youtube-nocookie.com/embed/XYZ123 This would be a nice feature in times of the european GDPR ... 1 Link to comment Share on other sites More sharing options...
matjazp Posted May 16, 2018 Share Posted May 16, 2018 I'm in process of upgrading PW 2.5.4, PHP 5.6.8 and using TextformatterVideoEmbed version 109. When I upgrade this module to the latest version 111 I get Compile Error: Cannot make static method ConfigurableModule::getModuleConfigInputfields() non static in class TextformatterVideoEmbed (line 18 of \site\modules\TextformatterVideoEmbed\TextformatterVideoEmbed.module) Is it possible that this method is problematic? version 109: public static function getModuleConfigInputfields(array $data) { version 111: public function getModuleConfigInputfields(array $data) { 1 Link to comment Share on other sites More sharing options...
dragan Posted May 16, 2018 Share Posted May 16, 2018 Upgrading to which PW version? 2.x or 3.x? Link to comment Share on other sites More sharing options...
matjazp Posted May 16, 2018 Share Posted May 16, 2018 My plan is to go slow: 2.5.4 -> 2.7.3 -> 2.8.62 -> 3.0.102 But it fails on 2.5.4. The module itself states it's stable and working on 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0 I know the module v 111 works on PW 3 (various versions). Link to comment Share on other sites More sharing options...
dragan Posted May 16, 2018 Share Posted May 16, 2018 I have upgraded several old (~4 yrs) PW sites straight to the latest dev version. The more you wait with upgrading, the more you'll have to change. Sometimes it just means adding PW namespaces, or upgrading modules as well. Sadly, I have no clue why this function causes problems. I just came across Ryan's announcement of this function: https://processwire.com/blog/posts/new-module-configuration-options/ This was introduced for 2.5.5. Maybe @ryan can shed some light on this... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now