Forum Replies Created

Viewing 15 replies - 1 through 15 (of 32 total)
  • Thread Starter dasfgh

    (@dasfgh)

    UPDATE: I found out that this added path thing has no influence on the videos and their playability. Actually, this problem might have appeared long before my HTTP-to-HTTPS migration, it’s just I haven’t noticed earlier.

    So basically, the videos that once have been added to the library are playable, it’s just when you want to play them, you just get a black screen and the browser warns for unsafe scripts.

    When you want to play video or audio files hosted on my server, it plays them, but the browser switches from safe to unsafe.

    I already mentioned that I have changed all the http://www.youtube to https://www.youtube but this is not enough. I already changed all the mp4s and mp3s to https. I also changed all the custom video thumbs to https.

    The player loads normally via SSL, so this must be about the communication between the player and the files, regardless whether they are youtube or self-hosted.

    • This reply was modified 6 years, 2 months ago by dasfgh. Reason: i added a sentence
    Thread Starter dasfgh

    (@dasfgh)

    Thanks for the reply. I made a not so good visual representation of the problem and I uploaded it here: UPLOADED SCREENSHOT. Plz note that my WP is not in english so I had to edit the photo a bit not to confuse the viewers.

    The problem is not about a particular Youtube link, it can be any Youtube video.

    Let’s say that the URL is: http://www.youtube.com/watch?v=XY

    In the past, when I would import a Youtube URL to the Media Library, the video would join the library and get it’s own post ID (for example: 123456). Then I would add the video to a post or a page with a JWPlayer shortcode. But many other players work like this, too.

    Example:
    [jwplayer mediaid="123456"]

    If I decided to edit the video’s title, description or thumbnail, I would go to http://www.mysite.com/wp/wp-admin/post.php?post=123456&action=edit
    You can edit some things there, but unfortunately, not the Youtube URL.

    After moving from HTTP to HTTPS, I searched & replaced: http://www.youtube.com TO https://www.youtube.com in my database. But now WP Media Library adds it’s own path to all the Youtube URLs.

    The Media Library doesn’t show: https://www.youtube.com/watch?v=XY
    But it shows: https://www.mysite.com/uploads/https://www.youtube.com/watch?v=XY

    The WP Media Library “thinks” that the Youtube URL is a video file in my uploads folder (flv, mp4 or something).

    If I go now to the database (wp_postmeta) and if I find the Youtube post (ID: 123456), it says, wp_attached_file: https://www.youtube.com/watch?v=XY

    So it’s fine in the database. But the Media Library “thinks” that the Youtube URL is a file hosted on my server and it automatically adds the uploads folder path to it.

    In the database, in _wp_attached_file, I see this: the Youtube URL is properly entered in a white field. Next to the field, it says meta value and longtext. Next to longtext there is a drop-down menu, where you can see: AES DECRYPT, BIN, CHAR etc., but nothing is selected, it shows white. I dunno how helpful this is, but that’s what I see. Thanks.

    Thread Starter dasfgh

    (@dasfgh)

    Thank you once again.

    In the end I decided to enter the missing OGP data manually, cause it was not all lost, only in some posts. Why this happened, I dunno, but anyway.

    I decided not to install any plugins, I was worried not to mess things more, and I also don’t want to “burden” the website.

    Then I added this line to httaccess in the root to retreive the missing FB shares:

    RewriteCond %{HTTP_USER_AGENT} !facebookexternalhit/[0-9])

    Before that I’ve already added 301 HTTP-to-HTTPS redirect. I solved the non-secure images and videos issue by searching and replacing within the wp posts content only (I don’t touch anything else).

    I also manually added a HTTP link to the OGP settings of each post (og url), and then I posted all links in the FB Batch Invalidator. It’s seems that I got the share count back.

    So, all the problems are solved, except this one: https://ww.wp.xz.cn/support/topic/fixing-insecure-external-urls-in-media-library/
    but that’s a separate topic. Thanks.

    Thread Starter dasfgh

    (@dasfgh)

    Tor-Bjorn Fjellner, thank you. Yes, it is an old and neglected website with old plugins etc.

    Fortunately, I was able to bring back the OGP data for most of the posts, but some is lost (for unbeknowst reasons) and now I’m entering it again manually.

    As you said, I’ll try to export all that data (e.g. by going in MySQL and choosing export only of the OGP fields in post meta or smth like that, I’m not an expert, but I’ll try).

    Now I’m afraid to install a new OGP plugin (not to lose what I already have).

    Moving to HTTPS messes up everything (the FB shares, too, but that’s another topic, so I’ll discuss it separately).

    Also searching and replacing http://yoursite.com to https://yoursite.com might break some things, but I will discuss that separately, too.

    I hope that they will invent an automatic solution for such migrations. This is not good and it can ruin my (almost) 10 years of hard work.

    Thread Starter dasfgh

    (@dasfgh)

    UPDATE: I changed back https to http in the database (search and replace) to see what will happen and the OGP data appeared again. The solution to this must be simple and I will work on it. If someone has a helpful advice, thanks in advance

    Thread Starter dasfgh

    (@dasfgh)

    You are right, but as I said I prefer WP and I didn’t mean to advertise Drupal here, please don’t get me wrong. But sometimes in life we need to work on different platforms and I think that it would be useful to learn how to copy things from one to another. To do this I have to gather advices on both WP and Drupal.

    Also, some of the things that I asked can be applied in WP (e.g. how to stop mobile.css from loading; overriding the default css; or how to create captions like on the picture that I linked etc.)

    • This reply was modified 8 years, 2 months ago by dasfgh.
    Thread Starter dasfgh

    (@dasfgh)

    It seems that I solved the problem by enabling the HD button, thank you for suggesting that.

    If a HD file is not available, it plays the HQ version (looks to me like it’s 360p mp4), which is ok.

    I dont understand how come everything was working fine without that HD button for months before these problems started, but anyway.

    I also tested JW6. While it looks faster and better, it did not help me.

    After upgrading, I watched few videos and it seemed that the problem is gone, but it happened again.

    I guess something is wrong in the communication between JW and Youtube and it should be solved.

    Thats why I reverted back to JW5. All it’s settings were kept.

    Offtopic: JW6 messed with my subtitled videos, cause they use the JW5 captions plugin (for those who may consider upgrading)

    Thread Starter dasfgh

    (@dasfgh)

    Thanks, I know how to enable the HD button, but i dont need it. 360p is fine and it worked well until recently.

    The requested video is not allowed to be played in embedded players.

    Strange, it plays on my pc. Maybe its the Youtube rules, cause we’re in different countries.

    I embeded my own non-copyrighted youtube video in this post on my site. It must play in an embeded player.

    Please play it in full screen. It will be lo-fi until around 17 sec. when the HQ will start. The change will be quite visible / audible.

    I tested other videos, the same happens with them!

    I need to get rid of this “switching”. I dont understand why the HQ is loaded with delay. This is definetly not normal.

    Maybe its about the communication between JW Player and Youtube, I don’t know.

    Thread Starter dasfgh

    (@dasfgh)

    Update to my previous post (it may be helpful): I noticed that the switch from LQ to HQ occurs after around 18 sec. since the start of the video.

    Thread Starter dasfgh

    (@dasfgh)

    This is my site.

    Note the music video on the right. It was working fine until recently. All the videos on the site worked properly. But if I play it now, it will load a low fi version.

    Play the video, turn on full screen and you’ll notice the lo-fi picture. The sound will also be lo-fi.

    Once you hit “play”, take a close look at the buffer bar. The lo-fi video will start to play, but after a while you’ll notice that the HQ version will start to load. I don’t know why is this happening.

    So if you skip forward, it’ll start to play the HQ version. It like:
    – the player cannot access the HQ file and it starts to play the LQ file
    – Then after few seconds it connects to the HQ and it switches to HQ in the midst of the song.

    My JW Player version: 5.9.2156 (as shown when you right click the video)

    JW Player plugin version: 2.1.2 (as shown in the plugins list of my WordPress)

    I don’t see any “quality menu”. I suppose I must upgrade to JW6 to have that. I don’t want to upgrade because I’m afraid I will loose some options that I have now in my current version. That’s what I read in Migrating from JW5 to JW6. And why to upgrade, everything was perfect

    Thread Starter dasfgh

    (@dasfgh)

    Thank you very much for your help and for the links. I concentrated on gtmetrix, it’s a very useful tool.

    I tried to solve these issues with the W3 Total Cache plugin but it didn’t work well. Maybe its not compatible with my WP version. Many reported that the plugin is broken.

    I tried everything, 777 of .htaccess and the folders and so on, it didn’t help. Now I wonder if I returned them to their previous values properly. .htaccess was 644 and folders are 755 by default, correct?

    Now I’ll have to do everything without the plugin. Gmetrix offers some advices how to do it, but there are things that confuse me. For example:

    Gmetrix reports that Gzip compression is not enabled for my site and advices me to add a code in my .htaccess (see here), but there’s already such code in my .htaccess
    Here it is:

    # HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
    <IfModule filter_module>
    FilterDeclare   COMPRESS
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/html
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/css
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/plain
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/x-component
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/javascript
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/json
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xhtml+xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/rss+xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/atom+xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/vnd.ms-fontobject
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/svg+xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/x-icon
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/x-font-ttf
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $font/opentype
    FilterChain     COMPRESS
    FilterProtocol  COMPRESS  DEFLATE change=yes;byteranges=no
    </IfModule>
    
    <IfModule !mod_filter.c>
    # Legacy versions of Apache
    AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
    AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
    AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
    </IfModule>

    There is also a section about the browser cache in my .htaccess, which says:

    # Media: images, video, audio
    #   ExpiresByType image/gif                 "access plus 1 month"
    #   ExpiresByType image/png                 "access plus 1 month"
    #   ExpiresByType image/jpg                 "access plus 1 month"
    #   ExpiresByType image/jpeg                "access plus 1 month"
    #   ExpiresByType video/ogg                 "access plus 1 month"
    #   ExpiresByType audio/ogg                 "access plus 1 month"
    #   ExpiresByType video/mp4                 "access plus 1 month"
    #   ExpiresByType video/webm                "access plus 1 month"

    but Gmetrix reports that “The following cacheable resources have a short freshness lifetime.”

    Also it advices me to load java asynchronously. Would it be sufficient just to replace <script> with <script async> in the header ? And will older browsers properly understand this?

    Thank you for your help.

    Thread Starter dasfgh

    (@dasfgh)

    i published a new post with a video file attached in it and the enclosure custom field appeared again. the plugin didn’t prevent it.
    I deleted the custom field, it didn’t help. Finally, I turned off pinging under the post and the video file disappeared from the feeds

    Thread Starter dasfgh

    (@dasfgh)

    I found it. I deleted the “enclosure” custom fields below the post and I leave it without saving the changes and it goes away.

    If you save, wordpress will detect the attached media again and will bring back the “enclosure” custom field automatically.

    I also added the no more enclosures plugin:
    http://ww.wp.xz.cn/extend/plugins/no-more-enclosures/

    I hope it will prevent the creation of enclosures in the future, as it is said on it’s page

    Thread Starter dasfgh

    (@dasfgh)

    the problem is obviously the custom field automatic enclosure. i try to remove it manually but it comes back by itself. I found a code which maybe can solve the problem, I just don’t know where to put it (it should be in functions.php but where exactly?)

    function delete_enclosure(){
    return '';
    }
    add_filter( 'get_enclosed', 'delete_enclosure' );
    add_filter( 'rss_enclosure', 'delete_enclosure' );
    add_filter( 'atom_enclosure', 'delete_enclosure' );
    Thread Starter dasfgh

    (@dasfgh)

    the code is from my site i just made changes to it, to describe the situation better (like: mydomain.com and so on), cause my first description of the problem was not very clear.

    I think that the problem is in this line:

    addthis:title="The title of the post <img src="http://MYDOMAIN.COM/UPLOADS/updated.gif" />
    or maybe in this one:
    addthis:description="THIS IS A STORY ABOUT BLABLA. CHECK IT OUT">

    Addthis is obviously installed, just how to control it? If I can put custom fields for addthis (just whats the right syntax?) then I will be able to remove the image from it’s addthis:title and maybe the code won’t break. Maybe addthis is confused by the html. How to kill it? Now I see the custom fields in the drop-down menu under my visual editor, there’s no mention of addthis, but maybe i can add values manually

Viewing 15 replies - 1 through 15 (of 32 total)