archetyped / simple-lightbox-extensions

Feedback & Support for Simple Lightbox Extensions
https://archetyped.com/tools/simple-lightbox/
2 stars 3 forks source link

[Video / Issue]: Video not loaded #42

Closed Mark-Xapno closed 5 years ago

Mark-Xapno commented 8 years ago

Issue:

SLB Video Handler was working fine, but stopped at some point. Now, when the video link is clicked, the page darkens and the 'working' icon spins, and nothing further happens. SLB still works for image galleries, however, but not videos.

When I discovered that the video no longer loaded, I updated SLB, which required a WP update, and eventually updated everything, as you can see. I rolled back the post itself to a revision when I knew it worked. I have temporarily switched to a stock theme, and have removed all plugins except SLB and SLB Video Handler. I will leave it this way for a time, and hopefully you can have a look at it and tell me if you see the problem. Thanks

The link is n the last paragraph: 'Click here to see it happen.'

Details

archetyped commented 8 years ago

Hi, it looks like access to WordPress' admin-ajax.php may be blocked, which is stopping SLB from loading the video. This is usually the result of a server configuration issue, though some plugins can may also block access.

In cases where things spontaneously stop working, the cause is often due to a change your site's hosting company may have made to the server, so I would recommend contacting your host to see if they've restricted access to certain directories/files via configuration or a firewall.

Here's a guide on some other things you can look into to unblock access to WordPress' admin-ajax.php: http://docs.easydigitaldownloads.com/article/201-admin-ajax-blocked

Let me know once you've heard back from your site's host and have tested the above steps to unblock access to admin-ajax.php. Note that you may have to follow up with a host a couple times as they sometimes don't dig too deep the first time around.

Mark-Xapno commented 8 years ago

Thanks. My hosting company did send a notice of some sort of server upgrade a few weeks ago. I didn't see any issues at the time, so I forgot about it. I will pursue this and report back in a few days.

Mark-Xapno commented 8 years ago

I spoke to my host's tech support for 45 minutes today, and though the effort seemed sincere, the problem remains unsolved. He assured me that all ajax calls are being handled properly, specifically including admin-ajax.php. He claimed to reset permissions sitewide, and I checked and saw that admin-ajax.php is set to 705. He also tried a newer version of php. He brought up the page in question, and curiously, said the request for the youtube video occasionally opened in a new tab, but usually behaved as I described in my initial issue report- stalled with the icon spinning. I didn't have the technical knowledge to challenge the tech, or to be especially helpful, either. He said that the server seems not to be the problem, but that if I could come up with a likely place to investigate from the plugin developer, he'd be happy to pursue it. I read the first two paragraphs of your answer to him, but he didn't really jump on the idea of the file being 'blocked'. He seemed to equate that with permissions. He looked at the htaccess file, but didn't have much to say about it. Compared to the example in the link you provided, mine is lengthy. I'll paste it at the end of this post; perhaps you'll see a problem.

It's a shame, because the plugin had been working so well.
Thanks very much for your help.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

# BEGIN wtwp_cache
<IfModule mod_mime.c>

    # Text
    AddType text/css .css
    AddType application/x-javascript .js
    AddType text/html .html .htm
    AddType text/richtext .rtf .rtx
    AddType text/plain .txt
    AddType text/xml .xml

    # Image
    AddType image/gif .gif
    AddType image/x-icon .ico
    AddType image/jpeg .jpg .jpeg .jpe
    AddType image/png .png
    AddType image/svg+xml .svg .svgz

    # Video
    AddType video/asf .asf .asx .wax .wmv .wmx
    AddType video/avi .avi
    AddType video/quicktime .mov .qt
    AddType video/mp4 .mp4 .m4v
    AddType video/mpeg .mpeg .mpg .mpe

    # PDF
    AddType application/pdf .pdf

    # Flash
    AddType application/x-shockwave-flash .swf

    # Font
    AddType application/x-font-ttf .ttf .ttc
    AddType application/vnd.ms-fontobject .eot
    AddType application/x-font-otf .otf

    # Audio
    AddType audio/mpeg .mp3 .m4a
    AddType audio/ogg .ogg
    AddType audio/wav .wav
    AddType audio/wma .wma

    # Zip/Tar
    AddType application/x-tar .tar
    AddType application/x-gzip .gz .gzip
    AddType application/zip .zip
</IfModule>

<IfModule mod_expires.c>
    ExpiresActive On

    # Text
    ExpiresByType text/css A31536000
    ExpiresByType application/x-javascript A31536000
    ExpiresByType text/html A3600
    ExpiresByType text/richtext A3600
    ExpiresByType text/plain A3600
    ExpiresByType text/xml A3600

    # Image
    ExpiresByType image/gif A31536000
    ExpiresByType image/x-icon A31536000
    ExpiresByType image/jpeg A31536000
    ExpiresByType image/png A31536000
    ExpiresByType image/svg+xml A31536000

    # Video
    ExpiresByType video/asf A31536000
    ExpiresByType video/avi A31536000
    ExpiresByType video/quicktime A31536000
    ExpiresByType video/mp4 A31536000
    ExpiresByType video/mpeg A31536000

    # PDF
    ExpiresByType application/pdf A31536000

    # Flash
    ExpiresByType application/x-shockwave-flash A31536000

    # Font
    ExpiresByType application/x-font-ttf A31536000
    ExpiresByType application/vnd.ms-fontobject A31536000
    ExpiresByType application/x-font-otf A31536000

    # Audio
    ExpiresByType audio/mpeg A31536000
    ExpiresByType audio/ogg A31536000
    ExpiresByType audio/wav A31536000
    ExpiresByType audio/wma A31536000

    # Zip/Tar
    ExpiresByType application/x-tar A31536000
    ExpiresByType application/x-gzip A31536000
    ExpiresByType application/zip A31536000
</IfModule>
<FilesMatch "\.(?i:css|js|htm|html|rtf|rtx|txt|xml|gif|ico|jpg|jpeg|jpe|png|svg|svgz|asf|asx|wax|wmv|wmx|avi|mov|qt|mp4|m4v|mpeg|mpg|mpe|pdf|swf|ttf|ttc|eot|otf|mp3|m4a|ogg|wav|wma|tar|gz|gzip|zip)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
        Header unset ETag
    </IfModule>
</FilesMatch>
<FilesMatch "\.(?i:css|js|gif|ico|jpg|jpeg|jpe|png|pdf|swf|ttf|ttc|eot|otf)$">
    <IfModule mod_headers.c>
        Header unset Set-Cookie
    </IfModule>
</FilesMatch>
# END wtwp_cache
# BEGIN wtwp_security
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^wp-admin/includes/ - [F,L]
    RewriteRule !^wp-includes/ - [S=3]
    RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
    RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
    RewriteRule ^wp-includes/theme-compat/ - [F,L]
</IfModule>
<Files "wp-config.php">
    Order allow,deny
    Deny from all
</Files>
Options -Indexes
# END wtwp_security
archetyped commented 8 years ago

Did you happen install/update any plugins before admin-ajax.php stopped working? While other plugins may have been deactivated, there are a fair number of rules in your .htaccess file that appear to have been set and left over by other plugins.

Here are some steps you can take to determine if these leftover rules are affecting access to admin-ajax.php:

  1. Ensure that all plugins are deactivated (aside from SLB and the video add-on)
  2. Backup your existing .htaccess file to your computer
  3. Delete the .htaccess file from your server (e.g. via FTP)
  4. In your site's Admin, go to Settings → Permalinks and click the "Save Changes" button to generate a new .htaccess file for your site.
  5. Refresh the file listing of your site's root directory in your FTP program to confirm that a new .htaccess file has been generated.
  6. Clear your browser's cache
  7. Open the page with the video link
  8. Click the video link

If the video is loaded in the lightbox, then the extra rules in the .htaccess file added by other plugins were the cause. Reactivate the theme and plugins, testing the page each time you activate a theme or plugin. When SLB stops working, the last plugin you activated is the source of the conflict.

Also, note that WordPress' documentation recommends permissions to be set to 644 for most files.

Mark-Xapno commented 8 years ago

This sounded hopeful, but the problem persists. I still only have the 2 plugins active, and I'm still using the stock 2013 theme. As directed, I replaced htaccess, and checked to see that it now consists of about 10 lines of code. I cleared the cache, and even brought up the page on another browser on a different machine that had never visited the page in question. In all cases, the behavior is unchanged- spinning icon. The new htaccess was generated with 644, and I tried 705 just for the sake of trying something. I did a quick, random check of the site's permissions, and the handful of files and folders I checked are indeed set to 705. Is this a something I should correct? Would doing a 'Updates'/'Reinstall now' do the job? Also, before first I contacted you, I deactivated/re-activated the SLB plugins with no change in behavior. Any other ideas? Thanks.

archetyped commented 8 years ago

I would recommend setting file permissions as recommended by WordPress (see previous reply for link) as other permissions may cause issues depending on your specific server configuration.

Note that this includes setting your site's other folders/files to the correct permissions (i.e. not just admin-ajax.php) is it may be that access to files that admin-ajax.php uses is being blocked, causing an error.

I've tested your video link on multiple sites/servers and it was displayed in the lightbox properly. The issue appears to be related to your site's server configuration. You can confirm this by testing the link and video add-on on another host to see if it displays properly there. Unfortunately, as there are so many different potential server configurations out there, it's a matter of working down the list and eliminating possible causes until the one affecting your particular setup is identified.

Please let me know what you find and I will see what can be done from there if admin-ajax.php still is not responding properly.

archetyped commented 5 years ago

This ticket has been closed due to inactivity.