WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] [closed] The requested content cannot be loaded (22 posts)

  1. pierrickste
    Member
    Posted 1 year ago #

    Hei,

    I got this error message appearing sometimes when clicking on an image "The requested content cannot be loaded. Please try again later". This started about two weeks ago and I have no clue about how it came and how to fix it. It tried the solution posted on this thread:

    http://wordpress.org/support/topic/plugin-easy-fancybox-the-requested-content-cannot-be-loaded?replies=4

    When opening the picture in a new tab I got this message:
    "We cannot complete this request, remote data was invalid".

    I'd really appreciate any help.

    Thanks

    Pierrick

    http://wordpress.org/extend/plugins/easy-fancybox/

  2. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    Hi pierrickste, can you share a URL of a live example of the issue?

  3. pierrickste
    Member
    Posted 1 year ago #

    Hi,
    here's the URL : http://pierrickstevant.com/places/places-color/

    Actually now as I replaced the pictures with the broken link, the problem is not showing anymore since a few days. I have done that in the past but the problem always came up again.

    When opening the broken image in a new tab, I noticed the jetpack icon on the tab displaying the error message. So my problem may not be related to the easy fancybox plugin.
    I updated the jetpack recently so it may have fixed it.

    Thanks

  4. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Pierrick,

    I see you are using the Photon module. Whenever you encounter these weird 'broken' image URLs, please deactivate this module first and check again to make sure there is no issue with the images in the WordPress.com CDN.

    Other tips: I notice there are three instances of fancybox.js mentioned in the source code. The one from your theme is returning a 404 page so on the script level, there is no problem anymore but it still means your site is loading twice (even three times including the removed stylesheet still being included) for each request. Then there is one from some other gallery plugin and then the one from my plugin. Other scripts like jQuery Easing are also loaded multiple times.

    This is also a likely cause for weird behavior or strange errors.

    Anyway, great images! :)

  5. pierrickste
    Member
    Posted 1 year ago #

    Hi,
    Thanks for feedback. How can I deactivate the fancybox.js so that there is only one that loads?

    Beyond the fact that this can cause problem as you mentioned I guess it also slows down the site.

    Thanks.

    Pierrick

  6. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    To remove FancyBox form your theme, you will need to modify (probably) either header.php or functions.php.

    If you are not comfortable with modifying theme files, then you should probably not be trying it. Or at least make a good backup of all theme files before you do...

  7. pierrickste
    Member
    Posted 1 year ago #

    Hei,
    Thanks for the tips, I removed the following in header.php:
    wp_enqueue_style("fancybox_css", get_stylesheet_directory_uri()."/js/fancybox/jquery.fancybox.css",

    I looks a little smoother to load the site.

    Thanks a lot.

    Pierrick

  8. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, that helps. There is a similar call starting with wp_enqueue_script that is responsible for the inclusion of the script file. If you can find that one in either header.php or functions.php you will be able to fix that call too.

    And then there is the plugin Gallery Plugin that loads both the same stylesheet and the script file as well. Is there a reason to run this plugin together with Easy FancyBox? If you can do without it, then it will be better to switch it off. If not, is there an option in that plugin to NOT include FancyBox?

  9. pierrickste
    Member
    Posted 1 year ago #

    I found the call that I deleted: wp_enqueue_script("fancybox_js", get_stylesheet_directory_uri()."/js/fancybox/jquery.fancybox.pack.js", false, $pp_theme_version);

    but while navigating on the site, there is a strange white screen that shows up before loading the new page. Do you know where it come from and how to get rid of it?

    Otherwise I deactivated the gallery plugin.I just forgot about it :-)
    Thanks

  10. pierrickste
    Member
    Posted 1 year ago #

    I wrote the wp_enqueue_script back as page don't load quite smooth. Do you think I could just deactivate it instead of delete this line of code.

    If this is possible could you please indicate the way to do. My php skills is still limited :-).

    Thanks

  11. pierrickste
    Member
    Posted 1 year ago #

    Hi,

    Sorry again. I deleted this wp_enqueue_script back now as I was experiencing weird things on the site today. I don't see the white screen for now.

    The most strange and annoying is that today I can't see the fullscreen image from my homepage (http://pierrickstevant.com/) and can't get it back over this black screen.

    Any ideas on how I can fix my problem?

    Thanks.

    Pierrick

  12. pierrickste
    Member
    Posted 1 year ago #

    I found out that I had to reactivate the gallery plugin for the homepage. I havn't found the option to deactivate the fancybox for that one.

    I'll have to check the code for that.

  13. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Pierrick, do you use that Gallery plugin for the homepage full-screen images? You might want to contact the developer if there is an option to not include the FancyBox script and stylesheet. But I think he/she would have to code that for a next version...

    I took a quick look at the source code of that plugin and if you add this to your themes functions.php (just put before the closing ?> tag if there is one, otherwise just at the end) you should be able to remove the remaining double script and stylesheet files:

    function un_gllr_wp_head() {
    		wp_dequeue_style( 'gllrFancyboxStylesheet' );
    		wp_dequeue_script( 'gllrFancyboxMousewheelJs' );
    		wp_dequeue_script( 'gllrFancyboxJs' );
    }
    add_action( 'wp_enqueue_scripts', 'un_gllr_wp_head', 12 );
  14. pierrickste
    Member
    Posted 1 year ago #

    Hi,

    Thanks for your help. I tried the code but unfortunately the homepage fullscreen image doesn't show anymore with it. This image is the only one that uses the fancybox but I havn't found any other way to avoid it.

    Do you think this is possible? It seem that deactivating fancybox makes the full-screen image invisible.

    Thanks a lot

    Pierrick

  15. chbakol
    Member
    Posted 1 year ago #

    I have been using the Easy FancyBox within WordPress for a while and it seems to be v. good. I have just done some jpg slideshows and I would like to ask the following.

    1. On transition from a jpg to another, the jpg fades out and so does the close button on the top corner and the title. The White frame box stays white and then the new jpg together with the close button on the top corner and the title fades in. This White box seems a bit annoying. Is there any way to get it in the fade-in, fade out process?

    2. When a jpg from the slideshow appears, the arrows on the left and right side of the picture for forwards/backwards do NOT appear. When the mouse is moved on the left or right side of the picture, they do appear. Can it be set so that the arrows are always visible? I have looked at the settings, but I can’t see the option. I can have them ON (i.e. initially off and with the hover on) or OFF all together, but not ON all the time.

    Thanks

  16. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    @Pierrick, I do not see how the fancybox script is related to the home page full screen background image. FancyBox is not made for that purpose but maybe the scripts we were trying to remove are customized in some way... So if you need these scripts on the home page while still excluding them on other pages where you need the ones from Easy FancyBox, then this might work:

    function un_gllr_wp_head() {
    	if(is_home()) {
    		wp_dequeue_style( 'gllrFancyboxStylesheet' );
    		wp_dequeue_script( 'gllrFancyboxMousewheelJs' );
    		wp_dequeue_script( 'gllrFancyboxJs' );
    	}
    }
    add_action( 'wp_enqueue_scripts', 'un_gllr_wp_head', 12 );
  17. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    @chbakol your best way around this seems to be some custom style rules. One to make the background of the fancybox frame transparent instead of white, and one to make the arrow images always show instead of only on mouse hover. Start here https://groups.google.com/forum/#!topic/fancybox/H9dhc0mx6II

  18. pierrickste
    Member
    Posted 1 year ago #

    Wow, that worked like a charm!!
    Pages are opening very quickly now while displaying homepage image, thanks a lot RavanH!

    Pierrick

  19. chbakol
    Member
    Posted 1 year ago #

    RavanH thanks for the help.
    The arrows on the left and right side of the picture are OK now with the fix JFK has suggested, but the suggestion the make the white box transparent is not that attractive as I quite like the white border.

  20. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    @chbakol, if you use #fancybox-outer{background:transparent} you loose the border? I cannot reproduce that. What if you add another rule like #fancybox-content{border: 10px solid #fff} maybe?

  21. teddymagic
    Member
    Posted 4 months ago #

    Hi,everybody.I am new with wordpress.I have a problem with NextGen Gallery.I am trying to get a gallery.The images upload is ok,but after upload,they are shown on the page as broken files.It says 'The requested content cannot be loaded. Please try again later.'
    Here is the link to the gallery.
    http://www.svatbenaagenciamagic.com/?page_id=10
    I appreciate your help.
    Teodora

  22. esmi
    Forum Moderator
    Posted 4 months ago #

    @teddymagic: If you require assistance then, as per the Forum Welcome, please post your own topic instead of tagging onto someone else's topic.

    This topic references an old version of WordPress.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic