WordPress.org

Ready to get started?Download WordPress

Forums

  1. tascam424
    Member
    Posted 1 year ago #

    Hi there, i haven't followed the advised steps for error reporting, simply because i don't know if i actually have an error, so i just wanted to ask a few questions and attempt to solve myself.

    Basically i have NG & NextGen FB installed. I have Galleries organised inside albums and albums embedded in pages using shortcode like so [nggalbum id=1 template=minimalsm]
    I then use the sharing functions for images, built in to FooBox, which works fine.

    My problem exists with trying to share an album or gallery link
    http://ourniteout.com/box/
    http://ourniteout.com/box/gallery/box/6th-november-2011/

    Currently it shares my default image, which is 524 x 524. However if i deactivate the default image, it shares an image from the slider. The FB linter tells me that the Album image is too small and must be 200 x 200.

    It is totally impossible for me to re-create all my images to be 200 x 200 as it would actually mean they would need to be nearly 300px wide to have a minimum of 200 whilst maintaining aspect ratio. This would totally mess up my design. NOT YOUR PROBLEM THOUGH.

    So my question is this .. I can probably set a hidden featured image to get around the Album Page but the gallery page is created dynamically, so that won't be possible is there any way i can get it to read the large image link in the href like below ?

    <img title="IMG_6551" alt="IMG_6551" src="http://ourniteout.com//wp-content/gallery/Box/6th November 2011/thumbs/thumbs_IMG_6551.JPG" width="164" height="119">

    Lon winded question i know, but i just wanted to provide as much insight as possible.
    Thanks

    http://wordpress.org/extend/plugins/nextgen-facebook/

  2. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    NGFB *should* be picking up your Gallry pictures, but for some reason it's not... For example, on this page http://ourniteout.com/box/gallery/box/13th-august-2011/ the HTML for the gallery includes:

    <div id="ngg-image-1204" class="ngg-gallery-thumbnail-box"  >
    		<div class="ngg-gallery-thumbnail" >
    			<center><a href="http://ourniteout.com//wp-content/gallery/Box/13th August 2011/IMG_0080 _800x600_.JPG" title=" "  >
    								<img title="IMG_0080 _800x600_" alt="IMG_0080 _800x600_" src="http://ourniteout.com//wp-content/gallery/Box/13th August 2011/thumbs/thumbs_IMG_0080 _800x600_.JPG" width="164" height="109" />
    							</a></center>
    		</div>
    	</div>

    NGFB looks for a <div id="ngg-image-#"> tag, so it *should* be picking up those images...

    As a first step, could you add the following to your wp-config.php file?

    define('NGFB_DEBUG', true);

    After you've done that, I'll have a look at the source again and hopefully get more information on where the problem might be...

    Thanks,

    js.

  3. tascam424
    Member
    Posted 1 year ago #

    Thanks for your reply .. I have added the code. Greatly appreciate your help !

  4. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    It might be causing a problem - you'll have to remove it.

    js.

  5. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    I had already made a few changes to the debug output in the DEV version -- in the current PROD version, it seems the debug messages might be printed too early for PHP etc. Would you mind installing the DEV version from http://downloads.wordpress.org/plugin/nextgen-facebook.zip and re-enabling the NGFB_DEBUG constant again? :)

    Thanks,

    js.

  6. tascam424
    Member
    Posted 1 year ago #

    Sure thing .. That's it done now. Thanks again

  7. tascam424
    Member
    Posted 1 year ago #

    Looks like this is still killing certain parts of my site ..

  8. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    You can turn it off - I got the debug messages. Let me get back to you after I've had a chance to look at it.

    Thanks,

    js.

  9. tascam424
    Member
    Posted 1 year ago #

    No problem. I really appreciate your support !!

  10. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    I've made a few more changes, which should make the debug output more PHP friendly - and not break anything. ;-) I've also added extra debug messages to try and pin-point the problem. Would you mind installing the latest DEV version and turning on NGFB_DEBUG again?

    Thanks,

    js.

  11. tascam424
    Member
    Posted 1 year ago #

    No problem .. Same link ?

  12. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Same link. ;-)

    js.

  13. tascam424
    Member
    Posted 1 year ago #

    Done !! Unfortunately it's still breaking stuff .. but i'll leave it as is until you get a look !

  14. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Got it. You can turn it off. Thanks.

    Let me get back to you in a bit.

    js.

  15. tascam424
    Member
    Posted 1 year ago #

    No worries !

  16. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Looks like I need to add even more debug info. ;-) For some reason, the plugin skips straight to the default image. I need to figure out why... I'm wondering if it's a content rendering thing... Anyway, download and install the latest DEV version at http://downloads.wordpress.org/plugin/nextgen-facebook.zip, and turn on NGFB_DEBUG again.

    Thanks!

    js.

  17. tascam424
    Member
    Posted 1 year ago #

    No probs .. Done !

  18. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, you can turn it off again.

    Can you define the following in your wp-config.php and let me know if that fixes the problem?

    define( 'NGFB_CONTENT_PRIORITY', 200 );

    (you could also try 999 instead of 200)

    And if that doesn't fix it, you'll have to install the latest DEV version again and turn on DEBUG mode.

    I'm pretty sure something is messing up the content before NGFB can get to it - possibly another plugin.

    You could also try and disable other plugins, one by one, and see if NGFB eventually picks up an image from your content.

    Hm. Alternatively, you could also try setting NGFB_CONTENT_PRIORITY to 5...

    Anyway, let me know if/when you have the new DEV version online and NGFB_DEBUG turned on.

    Thanks,

    js.

  19. tascam424
    Member
    Posted 1 year ago #

    Ok, i tried defining NGFB_CONTENT_PRIORITY at 200, 999 & 5 .. unfortunately no change. It is currently defined at 5 ..

    The problem existed before i installed any other plugins, with exception to Gantry, which runs my theme, so i can't really deactivate it.

    I have lasted DEV version installed now and NGFB_DEBUG turned on.

    Thanks again for all your efforts.

  20. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, one more time. Download and install the DEV version, turn on NGFB_DEBUG, and you can remove the NGFB_CONTENT_PRIORITY setting.

    This is rather telling:

    get_all_images_og() : calling $this->get_content_images_og( 1, "thumbnail" )
    	get_content_images_og() : no [singlepic] shortcode found
    	get_content_images_og() : calling apply_content_filter()
    	apply_content_filter() : add_content() filter removed = 1
    	apply_content_filter() : calling apply_filters()
    	apply_content_filter() : add_content() filter re-added
    	get_content_images_og() : no <div id="ngg-image-#"> tag found
    	get_content_images_og() : no <img src=""> tag found

    It should AT LEAST find some <img src=""> tags, even if it rejects them for being too small. So, something is off with the content. This latest version prints the content in the debug section, so I can check the raw text.

    Thanks,

    js.

  21. tascam424
    Member
    Posted 1 year ago #

    No worries .. Installed and on ! ... Thanks

  22. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, found it. You can disable NGFB_DEBUG. Give me 5 mins.

    js.

  23. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    So, good news / bad news.

    First, the good news is I've found the problem. The bad news is that it's a (known) bug in NextGEN Gallery. :-/

    Here's some debug info:

    get_content_images_og() : post_content (unfiltered) = <h1>Box Nightclub Belfast</h1>
    [nggalbum id=3 template=minimalsm]
    get_content_images_og() : post_content (filtered) = <h1>Box Nightclub Belfast</h1>

    The first line shows the post content before WordPress's apply_filters( "the_content" ) is run on it. The second line shows the content afterwards. The nggalbum shortcode has been removed instead of being expanded into proper HTML code. :-/

    I actually knew of this problem before, but was only checking for the [album] shortcode, not the [nggalbum] shortcode (must have been added recently).

    The [nggallery] shortcode works just fine, it's only the [nggalbum] shortcode that doesn't work.

    I *might* be able to bypass the bug by calling some NextGEN Gallery functions directly, but I'll have to do a little digging around to get that to work (if I can).

    So, long story short, there's no quick solution - unless you can use [nggallery] shortcodes instead. :-/

    js.

  24. tascam424
    Member
    Posted 1 year ago #

    Hmmm .. To use the [nggallery] shortcode would create a huge amount of work, both now and ongoing. We represent currently around 30 Venues, with more coming on every week. We create an album for each venue and add the galleries to each album, which is nice and easy for all our photographers. Each Venue then has it's own page which calls it's respective [nggalbum].

    I may have to look at a different platform altogether !

    I greatly appreciate your hard work and efforts, and obviously the bug in NextGen is far beyond your control.

    Thanks again for your efforts !! Above & beyond !!

  25. tascam424
    Member
    Posted 1 year ago #

    I was just wondering if i could pick your knowledge on this problem, as i can't seem to find a suitable alternative.
    You had said that the problem is related to [nggalbum] shortcode.
    Basically i place the [nggalbum] shortcode on a WordPress page to show all galleries within that album. So obviously a problem will lie here.
    Like so http://ourniteout.com/bar-retro/
    But what about when you enter into a specific gallery, does the same problem exist even though we are effectively in a gallery ?
    Like so http://ourniteout.com/bar-retro/gallery/bar-retro/24th-december-2012/

    I'm not so worried about the Page with the [nggalbum] shortcode as i can set a featured image there, but i would really love to find a solution to show the first image in the gallery, as like the second link.

    I would be willing to pay for a solution, if one can be created.

    Thanks again for all your hard work !!

  26. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, found the solution. It took me a few hours...

    When NextGEN Gallery interprets the [nggalbum] shortcode, it sets the 'subalbum' and/or 'nggShowGallery' GLOBALS, and then later will exit prematurely if those same GLOBALS are set. Since shortcodes in the content are interpreted by NGFB to get the description text, videos, images, etc., and then finally by WP itself to display the content, only the first run of the filter was successful -- the shortcode was simply stripped on every run through the filter after that.

    So, the solution was to "unset" those GLOBALS after every run of WP's apply_filters() function. For example:

    $content = apply_filters( 'the_content', $content );
    unset( $GLOBALS['subalbum'] );
    unset( $GLOBALS['nggShowGallery'] );

    It's an easy fix, but a real pain in the ass to find the problem. ;-)

    Anyway, give the new DEV version a try and let me know how things go.

    Thanks,

    js.

    P.S. I'll let you decide what a few hours of my time is worth... ;-)

  27. tascam424
    Member
    Posted 1 year ago #

    Hmmm ..

    If i use the FB Debugger it shows my default image regardless of where i am in the site .

    When i post this album link to facebook http://ourniteout.com/bar-retro/ it shows a random image from that page (which i can live with)

    But when i post a link to a Gallery page like so http://ourniteout.com/bar-retro/gallery/bar-retro/24th-december-2012/ it shows my default image or one of my slider images.

    Yet when i post this album link http://ourniteout.com/ollies/ i get default image again.

    I have run the links through the debugger to clear them from facebook cache but still no joy !

  28. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    http://ourniteout.com/bar-retro/

    This is an album page. NGG is including a thumbnail for each gallery. There's no way for NGFB to get an image for each gallery -- there's no identifier I can use:

    <!-- List of galleries -->
    
    	<div class="ngg-album-minimalsm">
    		<div class="ngg-album-minimalsmbox">
    			<div class="ngg-album-link">
    				<a href="http://ourniteout.com/bar-retro/gallery/bar-retro/24th-december-2012">
    					<img alt="24th-december-2012" src="http://ourniteout.com//wp-content/gallery/Bar Retro/24th December 2012/thumbs/thumbs_IMG_7584.jpg"/>
    				</a>
    			</div>
    		</div>
    		<h4><a class="ngg-album-desc" title="24th-december-2012" href="http://ourniteout.com/bar-retro/gallery/bar-retro/24th-december-2012" >24th-december-2012</a></h4>
    		<!--		<p><strong>115</strong> Photos</p>-->
    			</div>

    NGFB is probably skipping the images that are there as well, since it has no way to determine their size. If you uncheck the "Ignore Small Images" NGFB option, it should pickup the thumbnails.

    http://ourniteout.com/bar-retro/gallery/bar-retro/24th-december-2012/

    Looks good to me:

    <!-- og:image:1 --><meta property="og:image" content="http://ourniteout.com//wp-content/gallery/cache/1036_crop_150x150_IMG_7534.jpg" />
    <!-- og:image:1 --><meta property="og:image:height" content="150" />
    <!-- og:image:1 --><meta property="og:image:width" content="150" />

    Image ID #1036 is the first image in the content. NGFB is behaving as it should.

    http://ourniteout.com/ollies/

    That's an album page again. No way to determine NGG image IDs, and the <img> tags there don't include width & height, so no way for NGFB to determine if the images are large enough.

    I'd recommend either:

    - Add width and height info if you can. If your Open Graph image size settings are smaller, then these images will be included.

    - Or uncheck the "Ignore Small Images" NGFB option.

    js.

  29. tascam424
    Member
    Posted 1 year ago #

    Ok so i don't mind at all about the album page .. if it shows a random image that's fine .. i can always get around that by using a featured image on page if necessary ..
    Gallery pages are still not performing correctly and i think i might no why !!

    The example above http://ourniteout.com/bar-retro/gallery/bar-retro/24th-december-2012/

    Looks good from where you are inspecting it ... And if i run it on the debugger i get
    Provided og:image is not big enough. Please use an image that's at least 200x200 and preferably 1500x1500. (Maximum image size is 5MB.) Image 'http://ourniteout.com//wp-content/gallery/cache/885_crop_150x150_IMG_7733.JPG' will be used instead.

    That would be great if it used the crop image but it doesn't ! When i post the link on Facebook it shows my default image and 2 of my slider images .. When i look more closely i notice that facebook is taking the fetched URL and breaking it down to Canonical URL which is http://ourniteout.com/bar-retro/ and off course that is an Album page .. Could this be the problem ?

  30. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    The NGFB tags are correct, though as FB mentions, you should probably choose a larger size than 150x150.

    The debugger also mentions:

    Redirect Path
    original:	http://ourniteout.com/bar-retro/gallery/bar-retro/24th-december-2012/
    og:url:	http://ourniteout.com/bar-retro/
    Final URL is in bold (this is the URL we tried to extract metadata from).

    So yes, I'd say the canonical tag (from the Yoast plugin) is likely the problem.

    js.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.